commit f58951fe2a570b1435816e48f11e9f80dcc3fc35 Author: Melledy <121644117+Melledy@users.noreply.github.com> Date: Mon Oct 27 02:02:26 2025 -0700 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed6de74 --- /dev/null +++ b/.gitignore @@ -0,0 +1,78 @@ +# Compiled class file +*.class + +#idea +*.idea +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.war +*.nar +*.ear +*.zip +*.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build/ +out/ + +# Ignore Gradle properties +gradle.properties + +# Eclipse +.project +.classpath +.settings +.metadata +.properties +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +.loadpath +.recommenders + +# VSCode +.vscode + +# lombok +/.apt_generated/ + +# macOS +.DS_Store +.directory + +# Generated/resource/log/plugins folders +/logs +/plugins +/proto +/resources + +# Compiled +/*.jar +/*.sh + +# Extra +Nebula Handbook.txt +config.json +*.mv +*.exe +*.p12 +BuildConfig.java +Test.java \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0a30dd4 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# Nebula + +A game server emulator for a certain anime game. + +### Notable features +- Basic game features: Logging in, team setup, inventory, characters +- Monoliths +- Mail system + +# Running the server and client + +### Prerequisites +* [Java 25](https://www.oracle.com/java/technologies/javase/jdk25-archive-downloads.html) + +### Recommended +* [MongoDB 4.0+](https://www.mongodb.com/try/download/community) + +### Compiling the server +1. Open your system terminal, and compile the server with `./gradlew jar` +2. Create a folder named `resources` in your server directory +3. Download the `bin`, `language` folders from a repository with datamined game data and place them into your resources folder. +4. Run the server with `java -jar Nebula.jar` from your system terminal. This server comes with a built-in internal MongoDB server for its database, so no Mongodb installation is required. However, it is highly recommended to install Mongodb anyway. + +### Connecting with the client (Fiddler method) +1. **Log in with the client to an official server at least once to download game data.** +2. Install and have [Fiddler Classic](https://www.telerik.com/fiddler) running. +3. Copy and paste the following code into the Fiddlerscript tab of Fiddler Classic. Remember to save the fiddler script after you copy and paste it: + +``` +import System; +import System.Windows.Forms; +import Fiddler; +import System.Text.RegularExpressions; + +class Handlers +{ + static function OnBeforeRequest(oS: Session) { + if (oS.host.EndsWith(".yostarplat.com") || oS.host.EndsWith(".stellasora.global")) { + oS.oRequest.headers.UriScheme = "http"; + oS.host = "localhost"; // This can also be replaced with another IP address. + } + } +}; +``` + +4. If `autoCreateAccount` is set to true in the config, then you can skip this step. Otherwise, type `/account create [account name]` in the server console to create an account. +5. Login with your account name, the password field is ignored by the server and can be set to anything. + +### Server commands +Server commands need to be run in the server console. + +``` +/account {create | delete} [username] (reserved player uid) = Creates or deletes an account. +/give [item id] x[amount] = Gives the targetted player an item. +/mail = Sends the targeted player a system mail. +/reload = Reloads the server config. +``` diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..4e1990b --- /dev/null +++ b/build.gradle @@ -0,0 +1,217 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This generated file contains a sample Java project to get you started. + * For more details take a look at the Java Quickstart chapter in the Gradle + * User Manual available at https://docs.gradle.org/5.6.3/userguide/tutorial_java_projects.html + */ + +plugins { + // Apply the application plugin to add support for building a CLI application + id 'application' + + // Apply the java plugin to add support for Java + id 'java' + + // Protoc plugin + id 'com.google.protobuf' version '0.8.19' + + id 'eclipse' + id 'idea' +} + +compileJava.options.encoding = "UTF-8" +compileTestJava.options.encoding = "UTF-8" + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(25) + } +} + +version = '0.1.0' + +var shouldGenerateProto = System.getenv("GENERATE_PROTO") == "true" +System.out.println(shouldGenerateProto ? "Generating proto files" : "Skipping proto generation") + +repositories { + mavenCentral() + jcenter() +} + +protobuf { + protoc { + artifact = 'com.google.protobuf:protoc:3.25.8' + } + + plugins { + quickbuf { + artifact = 'us.hebi.quickbuf:protoc-gen-quickbuf:1.4' + } + } + + generateProtoTasks { + all().each { task -> + task.builtins { + remove java + } + task.plugins { + quickbuf { + //option 'store_unknown_fields=true' + outputSubDir = '' + } + } + } + } + + generatedFilesBaseDir = "$projectDir/src/generated/" +} + +dependencies { + implementation fileTree(dir: 'lib', include: ['*.jar']) + + implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.17' + implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.5.19' + implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.5.19' + + implementation group: 'it.unimi.dsi', name: 'fastutil-core', version: '8.5.18' + implementation group: 'org.reflections', name: 'reflections', version: '0.10.2' + + implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1' + implementation group: 'us.hebi.quickbuf', name: 'quickbuf-runtime', version: '1.4' + + implementation group: 'io.javalin', name: 'javalin', version: '5.6.3' + + implementation group: 'dev.morphia.morphia', name: 'morphia-core', version: '2.3.9' + implementation group: 'de.bwaldvogel', name: 'mongo-java-server', version: '1.47.0' + implementation group: 'de.bwaldvogel', name: 'mongo-java-server-h2-backend', version: '1.47.0' + + implementation group: 'org.bouncycastle', name: 'bcprov-jdk18on', version: '1.82' + + protobuf files('proto/') + + compileOnly 'org.projectlombok:lombok:1.18.42' + annotationProcessor 'org.projectlombok:lombok:1.18.42' +} + +configurations.all { + exclude group: 'org.slf4j', module: 'slf4j' +} + +clean { + if (shouldGenerateProto) { + delete protobuf.generatedFilesBaseDir + } +} + +application { + // Define the main class for the application + mainClass.set('emu.nebula.Nebula') +} + +run { + // Set the standard input to wait for user input + standardInput = System.in +} + +jar { + dependsOn 'injectGitHash' + + exclude '*.proto' + + exclude 'META-INF/*.SF' + exclude 'META-INF/*.DSA' + exclude 'META-INF/*.RSA' + + manifest { + attributes 'Main-Class': 'emu.nebula.Nebula' + } + + jar { + archiveBaseName = 'Nebula' + archiveVersion = '' + } + + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } + + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + + from('src/main/java') { + include '*.xml' + } + + getDestinationDirectory().set(file(".")) +} + +sourceSets { + main { + proto { + srcDir 'src/generated' + } + java { + srcDir 'src/main/java' + } + } +} + +idea { + module { + // proto files and generated Java files are automatically added as + // source dirs. + // If you have additional sources, add them here: + sourceDirs += file('/proto/') + } +} + +eclipse { + classpath { + file.whenMerged { cp -> + cp.entries.add( new org.gradle.plugins.ide.eclipse.model.SourceFolder('src/generated/main/', null) ) + } + } +} + +tasks.register('injectGitHash') { + def gitCommitHash = { + try { + return 'git rev-parse --verify --short HEAD'.execute().text.trim() + } catch (ignored) { + return '' + } + } + + def gitCommitTime = { + try { + return 'git log -1 --format=%at --date=raw'.execute().text.trim() + } catch (ignored) { + return '0' + } + } + + new File(project.projectDir.getAbsolutePath() + '/src/main/java/emu/nebula/BuildConfig.java').text = """ +package emu.nebula; + +public final class BuildConfig { + public static final String VERSION = \"${version}\"; + public static final String GIT_HASH = \"${gitCommitHash()}\"; + public static final String GIT_TIMESTAMP = \"${gitCommitTime()}\"; +} +""" +} + +task updateProto { + group 'Build' + description 'Cleans generated proto folder and regenerates protos' + + if (shouldGenerateProto) { + dependsOn 'clean' + } + + dependsOn 'generateProto' +} + +processResources { + dependsOn 'generateProto' +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..d64cd49 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..d4081da --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..1aa94a4 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +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 + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..93e3f59 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem 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, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..8a30998 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,10 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user manual at https://docs.gradle.org/5.6.3/userguide/multi_project_builds.html + */ + +rootProject.name = 'Nebula' diff --git a/src/generated/main/emu/nebula/proto/AchievementInfo.java b/src/generated/main/emu/nebula/proto/AchievementInfo.java new file mode 100644 index 0000000..cd00ce9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/AchievementInfo.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class AchievementInfo { +} diff --git a/src/generated/main/emu/nebula/proto/AchievementRewardReceive.java b/src/generated/main/emu/nebula/proto/AchievementRewardReceive.java new file mode 100644 index 0000000..5a8e125 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/AchievementRewardReceive.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class AchievementRewardReceive { + /** + * Protobuf type {@code AchievementRewardReq} + */ + public static final class AchievementRewardReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Ids = 1; + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + private AchievementRewardReq() { + } + + /** + * @return a new empty instance of {@code AchievementRewardReq} + */ + public static AchievementRewardReq newInstance() { + return new AchievementRewardReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AchievementRewardReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AchievementRewardReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AchievementRewardReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AchievementRewardReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Ids = 1; + * @return this + */ + public AchievementRewardReq clearIds() { + bitField0_ &= ~0x00000002; + ids.clear(); + return this; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000002; + return ids; + } + + /** + * repeated uint32 Ids = 1; + * @param value the ids to add + * @return this + */ + public AchievementRewardReq addIds(final int value) { + bitField0_ |= 0x00000002; + ids.add(value); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @param values the ids to add + * @return this + */ + public AchievementRewardReq addAllIds(final int... values) { + bitField0_ |= 0x00000002; + ids.addAll(values); + return this; + } + + @Override + public AchievementRewardReq copyFrom(final AchievementRewardReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + } + return this; + } + + @Override + public AchievementRewardReq mergeFrom(final AchievementRewardReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + return this; + } + + @Override + public AchievementRewardReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public AchievementRewardReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AchievementRewardReq)) { + return false; + } + AchievementRewardReq other = (AchievementRewardReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AchievementRewardReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + output.endObject(); + } + + @Override + public AchievementRewardReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AchievementRewardReq clone() { + return new AchievementRewardReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AchievementRewardReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AchievementRewardReq(), data).checkInitialized(); + } + + public static AchievementRewardReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AchievementRewardReq(), input).checkInitialized(); + } + + public static AchievementRewardReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AchievementRewardReq(), input).checkInitialized(); + } + + /** + * @return factory for creating AchievementRewardReq messages + */ + public static MessageFactory getFactory() { + return AchievementRewardReqFactory.INSTANCE; + } + + private enum AchievementRewardReqFactory implements MessageFactory { + INSTANCE; + + @Override + public AchievementRewardReq create() { + return AchievementRewardReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityAvgRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityAvgRewardReceive.java new file mode 100644 index 0000000..e3dca2a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityAvgRewardReceive.java @@ -0,0 +1,565 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityAvgRewardReceive { + /** + * Protobuf type {@code ActivityAvgRewardReceiveReq} + */ + public static final class ActivityAvgRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 LevelId = 2; + */ + private int levelId; + + /** + * optional .Events Events = 8; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityAvgRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code ActivityAvgRewardReceiveReq} + */ + public static ActivityAvgRewardReceiveReq newInstance() { + return new ActivityAvgRewardReceiveReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityAvgRewardReceiveReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityAvgRewardReceiveReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 LevelId = 2; + * @return this + */ + public ActivityAvgRewardReceiveReq clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 2; + * @param value the levelId to set + * @return this + */ + public ActivityAvgRewardReceiveReq setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * optional .Events Events = 8; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .Events Events = 8; + * @return this + */ + public ActivityAvgRewardReceiveReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * optional .Events Events = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * optional .Events Events = 8; + * @param value the events to set + * @return this + */ + public ActivityAvgRewardReceiveReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityAvgRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityAvgRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityAvgRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityAvgRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityAvgRewardReceiveReq copyFrom(final ActivityAvgRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + levelId = other.levelId; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityAvgRewardReceiveReq mergeFrom(final ActivityAvgRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityAvgRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + levelId = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityAvgRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityAvgRewardReceiveReq)) { + return false; + } + ActivityAvgRewardReceiveReq other = (ActivityAvgRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityAvgRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityAvgRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityAvgRewardReceiveReq clone() { + return new ActivityAvgRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityAvgRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityAvgRewardReceiveReq(), data).checkInitialized(); + } + + public static ActivityAvgRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityAvgRewardReceiveReq(), input).checkInitialized(); + } + + public static ActivityAvgRewardReceiveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityAvgRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityAvgRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return ActivityAvgRewardReceiveReqFactory.INSTANCE; + } + + private enum ActivityAvgRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityAvgRewardReceiveReq create() { + return ActivityAvgRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityCgRead.java b/src/generated/main/emu/nebula/proto/ActivityCgRead.java new file mode 100644 index 0000000..bc47430 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityCgRead.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class ActivityCgRead { +} diff --git a/src/generated/main/emu/nebula/proto/ActivityCookieQuestRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityCookieQuestRewardReceive.java new file mode 100644 index 0000000..43473e2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityCookieQuestRewardReceive.java @@ -0,0 +1,469 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityCookieQuestRewardReceive { + /** + * Protobuf type {@code ActivityCookieQuestRewardReceiveReq} + */ + public static final class ActivityCookieQuestRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 QuestId = 2; + */ + private int questId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityCookieQuestRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code ActivityCookieQuestRewardReceiveReq} + */ + public static ActivityCookieQuestRewardReceiveReq newInstance() { + return new ActivityCookieQuestRewardReceiveReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityCookieQuestRewardReceiveReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityCookieQuestRewardReceiveReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 QuestId = 2; + * @return this + */ + public ActivityCookieQuestRewardReceiveReq clearQuestId() { + bitField0_ &= ~0x00000002; + questId = 0; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return the questId + */ + public int getQuestId() { + return questId; + } + + /** + * optional uint32 QuestId = 2; + * @param value the questId to set + * @return this + */ + public ActivityCookieQuestRewardReceiveReq setQuestId(final int value) { + bitField0_ |= 0x00000002; + questId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityCookieQuestRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityCookieQuestRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityCookieQuestRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityCookieQuestRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityCookieQuestRewardReceiveReq copyFrom( + final ActivityCookieQuestRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + questId = other.questId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCookieQuestRewardReceiveReq mergeFrom( + final ActivityCookieQuestRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasQuestId()) { + setQuestId(other.questId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCookieQuestRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + questId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityCookieQuestRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityCookieQuestRewardReceiveReq)) { + return false; + } + ActivityCookieQuestRewardReceiveReq other = (ActivityCookieQuestRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasQuestId() || questId == other.questId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityCookieQuestRewardReceiveReq mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // questId + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityCookieQuestRewardReceiveReq mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1975187075: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityCookieQuestRewardReceiveReq clone() { + return new ActivityCookieQuestRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityCookieQuestRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityCookieQuestRewardReceiveReq(), data).checkInitialized(); + } + + public static ActivityCookieQuestRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityCookieQuestRewardReceiveReq(), input).checkInitialized(); + } + + public static ActivityCookieQuestRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityCookieQuestRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityCookieQuestRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return ActivityCookieQuestRewardReceiveReqFactory.INSTANCE; + } + + private enum ActivityCookieQuestRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityCookieQuestRewardReceiveReq create() { + return ActivityCookieQuestRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName questId = FieldName.forField("QuestId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityCookieSettle.java b/src/generated/main/emu/nebula/proto/ActivityCookieSettle.java new file mode 100644 index 0000000..5a93fb2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityCookieSettle.java @@ -0,0 +1,863 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityCookieSettle { + /** + * Protobuf type {@code ActivityCookieSettleReq} + */ + public static final class ActivityCookieSettleReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 LevelId = 2; + */ + private int levelId; + + /** + * optional uint32 Score = 3; + */ + private int score; + + /** + * optional uint32 CookieNum = 4; + */ + private int cookieNum; + + /** + * optional uint32 PackageNum = 5; + */ + private int packageNum; + + /** + * optional uint32 PerfectNum = 6; + */ + private int perfectNum; + + /** + * optional uint32 ExcellentNum = 7; + */ + private int excellentNum; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityCookieSettleReq() { + } + + /** + * @return a new empty instance of {@code ActivityCookieSettleReq} + */ + public static ActivityCookieSettleReq newInstance() { + return new ActivityCookieSettleReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityCookieSettleReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityCookieSettleReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 LevelId = 2; + * @return this + */ + public ActivityCookieSettleReq clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 2; + * @param value the levelId to set + * @return this + */ + public ActivityCookieSettleReq setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * optional uint32 Score = 3; + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Score = 3; + * @return this + */ + public ActivityCookieSettleReq clearScore() { + bitField0_ &= ~0x00000004; + score = 0; + return this; + } + + /** + * optional uint32 Score = 3; + * @return the score + */ + public int getScore() { + return score; + } + + /** + * optional uint32 Score = 3; + * @param value the score to set + * @return this + */ + public ActivityCookieSettleReq setScore(final int value) { + bitField0_ |= 0x00000004; + score = value; + return this; + } + + /** + * optional uint32 CookieNum = 4; + * @return whether the cookieNum field is set + */ + public boolean hasCookieNum() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 CookieNum = 4; + * @return this + */ + public ActivityCookieSettleReq clearCookieNum() { + bitField0_ &= ~0x00000008; + cookieNum = 0; + return this; + } + + /** + * optional uint32 CookieNum = 4; + * @return the cookieNum + */ + public int getCookieNum() { + return cookieNum; + } + + /** + * optional uint32 CookieNum = 4; + * @param value the cookieNum to set + * @return this + */ + public ActivityCookieSettleReq setCookieNum(final int value) { + bitField0_ |= 0x00000008; + cookieNum = value; + return this; + } + + /** + * optional uint32 PackageNum = 5; + * @return whether the packageNum field is set + */ + public boolean hasPackageNum() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 PackageNum = 5; + * @return this + */ + public ActivityCookieSettleReq clearPackageNum() { + bitField0_ &= ~0x00000010; + packageNum = 0; + return this; + } + + /** + * optional uint32 PackageNum = 5; + * @return the packageNum + */ + public int getPackageNum() { + return packageNum; + } + + /** + * optional uint32 PackageNum = 5; + * @param value the packageNum to set + * @return this + */ + public ActivityCookieSettleReq setPackageNum(final int value) { + bitField0_ |= 0x00000010; + packageNum = value; + return this; + } + + /** + * optional uint32 PerfectNum = 6; + * @return whether the perfectNum field is set + */ + public boolean hasPerfectNum() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 PerfectNum = 6; + * @return this + */ + public ActivityCookieSettleReq clearPerfectNum() { + bitField0_ &= ~0x00000020; + perfectNum = 0; + return this; + } + + /** + * optional uint32 PerfectNum = 6; + * @return the perfectNum + */ + public int getPerfectNum() { + return perfectNum; + } + + /** + * optional uint32 PerfectNum = 6; + * @param value the perfectNum to set + * @return this + */ + public ActivityCookieSettleReq setPerfectNum(final int value) { + bitField0_ |= 0x00000020; + perfectNum = value; + return this; + } + + /** + * optional uint32 ExcellentNum = 7; + * @return whether the excellentNum field is set + */ + public boolean hasExcellentNum() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional uint32 ExcellentNum = 7; + * @return this + */ + public ActivityCookieSettleReq clearExcellentNum() { + bitField0_ &= ~0x00000040; + excellentNum = 0; + return this; + } + + /** + * optional uint32 ExcellentNum = 7; + * @return the excellentNum + */ + public int getExcellentNum() { + return excellentNum; + } + + /** + * optional uint32 ExcellentNum = 7; + * @param value the excellentNum to set + * @return this + */ + public ActivityCookieSettleReq setExcellentNum(final int value) { + bitField0_ |= 0x00000040; + excellentNum = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityCookieSettleReq clearNextPackage() { + bitField0_ &= ~0x00000080; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000080; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityCookieSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000080; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityCookieSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityCookieSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityCookieSettleReq copyFrom(final ActivityCookieSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + levelId = other.levelId; + score = other.score; + cookieNum = other.cookieNum; + packageNum = other.packageNum; + perfectNum = other.perfectNum; + excellentNum = other.excellentNum; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCookieSettleReq mergeFrom(final ActivityCookieSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasCookieNum()) { + setCookieNum(other.cookieNum); + } + if (other.hasPackageNum()) { + setPackageNum(other.packageNum); + } + if (other.hasPerfectNum()) { + setPerfectNum(other.perfectNum); + } + if (other.hasExcellentNum()) { + setExcellentNum(other.excellentNum); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCookieSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + levelId = 0; + score = 0; + cookieNum = 0; + packageNum = 0; + perfectNum = 0; + excellentNum = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityCookieSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityCookieSettleReq)) { + return false; + } + ActivityCookieSettleReq other = (ActivityCookieSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasScore() || score == other.score) + && (!hasCookieNum() || cookieNum == other.cookieNum) + && (!hasPackageNum() || packageNum == other.packageNum) + && (!hasPerfectNum() || perfectNum == other.perfectNum) + && (!hasExcellentNum() || excellentNum == other.excellentNum) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(cookieNum); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(packageNum); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(perfectNum); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(excellentNum); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(cookieNum); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(packageNum); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(perfectNum); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(excellentNum); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityCookieSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // cookieNum + cookieNum = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // packageNum + packageNum = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // perfectNum + perfectNum = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // excellentNum + excellentNum = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.cookieNum, cookieNum); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.packageNum, packageNum); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.perfectNum, perfectNum); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.excellentNum, excellentNum); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityCookieSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2064875934: { + if (input.isAtField(FieldNames.cookieNum)) { + if (!input.trySkipNullValue()) { + cookieNum = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2022780288: { + if (input.isAtField(FieldNames.packageNum)) { + if (!input.trySkipNullValue()) { + packageNum = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -571000743: { + if (input.isAtField(FieldNames.perfectNum)) { + if (!input.trySkipNullValue()) { + perfectNum = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1405529200: { + if (input.isAtField(FieldNames.excellentNum)) { + if (!input.trySkipNullValue()) { + excellentNum = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityCookieSettleReq clone() { + return new ActivityCookieSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityCookieSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityCookieSettleReq(), data).checkInitialized(); + } + + public static ActivityCookieSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCookieSettleReq(), input).checkInitialized(); + } + + public static ActivityCookieSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCookieSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityCookieSettleReq messages + */ + public static MessageFactory getFactory() { + return ActivityCookieSettleReqFactory.INSTANCE; + } + + private enum ActivityCookieSettleReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityCookieSettleReq create() { + return ActivityCookieSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName cookieNum = FieldName.forField("CookieNum"); + + static final FieldName packageNum = FieldName.forField("PackageNum"); + + static final FieldName perfectNum = FieldName.forField("PerfectNum"); + + static final FieldName excellentNum = FieldName.forField("ExcellentNum"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityDetail.java b/src/generated/main/emu/nebula/proto/ActivityDetail.java new file mode 100644 index 0000000..e727393 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityDetail.java @@ -0,0 +1,1995 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ActivityDetail { + /** + * Protobuf type {@code ActivityMsg} + */ + public static final class ActivityMsg extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional .ActivityPeriodic Periodic = 2; + */ + private final Public.ActivityPeriodic periodic = Public.ActivityPeriodic.newInstance(); + + /** + * optional .ActivityLogin Login = 3; + */ + private final Public.ActivityLogin login = Public.ActivityLogin.newInstance(); + + /** + * optional .ActivityMining Mining = 4; + */ + private final Public.ActivityMining mining = Public.ActivityMining.newInstance(); + + /** + * optional .ActivityJointDrill JointDrill = 5; + */ + private final PublicJointDrill.ActivityJointDrill jointDrill = PublicJointDrill.ActivityJointDrill.newInstance(); + + /** + * optional .ActivityCookie Cookie = 6; + */ + private final Public.ActivityCookie cookie = Public.ActivityCookie.newInstance(); + + /** + * optional .ActivityTowerDefense TowerDefense = 7; + */ + private final Public.ActivityTowerDefense towerDefense = Public.ActivityTowerDefense.newInstance(); + + /** + * optional .ActivityTrial Trial = 8; + */ + private final Public.ActivityTrial trial = Public.ActivityTrial.newInstance(); + + /** + * optional .ActivityCG CG = 9; + */ + private final Public.ActivityCG cG = Public.ActivityCG.newInstance(); + + /** + * optional .ActivityLevels Levels = 10; + */ + private final Public.ActivityLevels levels = Public.ActivityLevels.newInstance(); + + /** + * optional .ActivityAvg Avg = 11; + */ + private final Public.ActivityAvg avg = Public.ActivityAvg.newInstance(); + + /** + * optional .ActivityTask Task = 12; + */ + private final Public.ActivityTask task = Public.ActivityTask.newInstance(); + + /** + * optional .ActivityShop Shop = 13; + */ + private final Public.ActivityShop shop = Public.ActivityShop.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMsg() { + } + + /** + * @return a new empty instance of {@code ActivityMsg} + */ + public static ActivityMsg newInstance() { + return new ActivityMsg(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public ActivityMsg clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public ActivityMsg setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional .ActivityPeriodic Periodic = 2; + * @return whether the periodic field is set + */ + public boolean hasPeriodic() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ActivityPeriodic Periodic = 2; + * @return this + */ + public ActivityMsg clearPeriodic() { + bitField0_ &= ~0x00000002; + periodic.clear(); + return this; + } + + /** + * optional .ActivityPeriodic Periodic = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePeriodic()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityPeriodic getPeriodic() { + return periodic; + } + + /** + * optional .ActivityPeriodic Periodic = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityPeriodic getMutablePeriodic() { + bitField0_ |= 0x00000002; + return periodic; + } + + /** + * optional .ActivityPeriodic Periodic = 2; + * @param value the periodic to set + * @return this + */ + public ActivityMsg setPeriodic(final Public.ActivityPeriodic value) { + bitField0_ |= 0x00000002; + periodic.copyFrom(value); + return this; + } + + /** + * optional .ActivityLogin Login = 3; + * @return whether the login field is set + */ + public boolean hasLogin() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .ActivityLogin Login = 3; + * @return this + */ + public ActivityMsg clearLogin() { + bitField0_ &= ~0x00000004; + login.clear(); + return this; + } + + /** + * optional .ActivityLogin Login = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLogin()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityLogin getLogin() { + return login; + } + + /** + * optional .ActivityLogin Login = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityLogin getMutableLogin() { + bitField0_ |= 0x00000004; + return login; + } + + /** + * optional .ActivityLogin Login = 3; + * @param value the login to set + * @return this + */ + public ActivityMsg setLogin(final Public.ActivityLogin value) { + bitField0_ |= 0x00000004; + login.copyFrom(value); + return this; + } + + /** + * optional .ActivityMining Mining = 4; + * @return whether the mining field is set + */ + public boolean hasMining() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .ActivityMining Mining = 4; + * @return this + */ + public ActivityMsg clearMining() { + bitField0_ &= ~0x00000008; + mining.clear(); + return this; + } + + /** + * optional .ActivityMining Mining = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMining()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityMining getMining() { + return mining; + } + + /** + * optional .ActivityMining Mining = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityMining getMutableMining() { + bitField0_ |= 0x00000008; + return mining; + } + + /** + * optional .ActivityMining Mining = 4; + * @param value the mining to set + * @return this + */ + public ActivityMsg setMining(final Public.ActivityMining value) { + bitField0_ |= 0x00000008; + mining.copyFrom(value); + return this; + } + + /** + * optional .ActivityJointDrill JointDrill = 5; + * @return whether the jointDrill field is set + */ + public boolean hasJointDrill() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional .ActivityJointDrill JointDrill = 5; + * @return this + */ + public ActivityMsg clearJointDrill() { + bitField0_ &= ~0x00000010; + jointDrill.clear(); + return this; + } + + /** + * optional .ActivityJointDrill JointDrill = 5; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableJointDrill()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicJointDrill.ActivityJointDrill getJointDrill() { + return jointDrill; + } + + /** + * optional .ActivityJointDrill JointDrill = 5; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicJointDrill.ActivityJointDrill getMutableJointDrill() { + bitField0_ |= 0x00000010; + return jointDrill; + } + + /** + * optional .ActivityJointDrill JointDrill = 5; + * @param value the jointDrill to set + * @return this + */ + public ActivityMsg setJointDrill(final PublicJointDrill.ActivityJointDrill value) { + bitField0_ |= 0x00000010; + jointDrill.copyFrom(value); + return this; + } + + /** + * optional .ActivityCookie Cookie = 6; + * @return whether the cookie field is set + */ + public boolean hasCookie() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional .ActivityCookie Cookie = 6; + * @return this + */ + public ActivityMsg clearCookie() { + bitField0_ &= ~0x00000020; + cookie.clear(); + return this; + } + + /** + * optional .ActivityCookie Cookie = 6; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCookie()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityCookie getCookie() { + return cookie; + } + + /** + * optional .ActivityCookie Cookie = 6; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityCookie getMutableCookie() { + bitField0_ |= 0x00000020; + return cookie; + } + + /** + * optional .ActivityCookie Cookie = 6; + * @param value the cookie to set + * @return this + */ + public ActivityMsg setCookie(final Public.ActivityCookie value) { + bitField0_ |= 0x00000020; + cookie.copyFrom(value); + return this; + } + + /** + * optional .ActivityTowerDefense TowerDefense = 7; + * @return whether the towerDefense field is set + */ + public boolean hasTowerDefense() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional .ActivityTowerDefense TowerDefense = 7; + * @return this + */ + public ActivityMsg clearTowerDefense() { + bitField0_ &= ~0x00000040; + towerDefense.clear(); + return this; + } + + /** + * optional .ActivityTowerDefense TowerDefense = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTowerDefense()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityTowerDefense getTowerDefense() { + return towerDefense; + } + + /** + * optional .ActivityTowerDefense TowerDefense = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityTowerDefense getMutableTowerDefense() { + bitField0_ |= 0x00000040; + return towerDefense; + } + + /** + * optional .ActivityTowerDefense TowerDefense = 7; + * @param value the towerDefense to set + * @return this + */ + public ActivityMsg setTowerDefense(final Public.ActivityTowerDefense value) { + bitField0_ |= 0x00000040; + towerDefense.copyFrom(value); + return this; + } + + /** + * optional .ActivityTrial Trial = 8; + * @return whether the trial field is set + */ + public boolean hasTrial() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional .ActivityTrial Trial = 8; + * @return this + */ + public ActivityMsg clearTrial() { + bitField0_ &= ~0x00000080; + trial.clear(); + return this; + } + + /** + * optional .ActivityTrial Trial = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTrial()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityTrial getTrial() { + return trial; + } + + /** + * optional .ActivityTrial Trial = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityTrial getMutableTrial() { + bitField0_ |= 0x00000080; + return trial; + } + + /** + * optional .ActivityTrial Trial = 8; + * @param value the trial to set + * @return this + */ + public ActivityMsg setTrial(final Public.ActivityTrial value) { + bitField0_ |= 0x00000080; + trial.copyFrom(value); + return this; + } + + /** + * optional .ActivityCG CG = 9; + * @return whether the cG field is set + */ + public boolean hasCG() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional .ActivityCG CG = 9; + * @return this + */ + public ActivityMsg clearCG() { + bitField0_ &= ~0x00000100; + cG.clear(); + return this; + } + + /** + * optional .ActivityCG CG = 9; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCG()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityCG getCG() { + return cG; + } + + /** + * optional .ActivityCG CG = 9; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityCG getMutableCG() { + bitField0_ |= 0x00000100; + return cG; + } + + /** + * optional .ActivityCG CG = 9; + * @param value the cG to set + * @return this + */ + public ActivityMsg setCG(final Public.ActivityCG value) { + bitField0_ |= 0x00000100; + cG.copyFrom(value); + return this; + } + + /** + * optional .ActivityLevels Levels = 10; + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional .ActivityLevels Levels = 10; + * @return this + */ + public ActivityMsg clearLevels() { + bitField0_ &= ~0x00000200; + levels.clear(); + return this; + } + + /** + * optional .ActivityLevels Levels = 10; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityLevels getLevels() { + return levels; + } + + /** + * optional .ActivityLevels Levels = 10; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityLevels getMutableLevels() { + bitField0_ |= 0x00000200; + return levels; + } + + /** + * optional .ActivityLevels Levels = 10; + * @param value the levels to set + * @return this + */ + public ActivityMsg setLevels(final Public.ActivityLevels value) { + bitField0_ |= 0x00000200; + levels.copyFrom(value); + return this; + } + + /** + * optional .ActivityAvg Avg = 11; + * @return whether the avg field is set + */ + public boolean hasAvg() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * optional .ActivityAvg Avg = 11; + * @return this + */ + public ActivityMsg clearAvg() { + bitField0_ &= ~0x00000400; + avg.clear(); + return this; + } + + /** + * optional .ActivityAvg Avg = 11; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAvg()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityAvg getAvg() { + return avg; + } + + /** + * optional .ActivityAvg Avg = 11; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityAvg getMutableAvg() { + bitField0_ |= 0x00000400; + return avg; + } + + /** + * optional .ActivityAvg Avg = 11; + * @param value the avg to set + * @return this + */ + public ActivityMsg setAvg(final Public.ActivityAvg value) { + bitField0_ |= 0x00000400; + avg.copyFrom(value); + return this; + } + + /** + * optional .ActivityTask Task = 12; + * @return whether the task field is set + */ + public boolean hasTask() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * optional .ActivityTask Task = 12; + * @return this + */ + public ActivityMsg clearTask() { + bitField0_ &= ~0x00000800; + task.clear(); + return this; + } + + /** + * optional .ActivityTask Task = 12; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTask()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityTask getTask() { + return task; + } + + /** + * optional .ActivityTask Task = 12; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityTask getMutableTask() { + bitField0_ |= 0x00000800; + return task; + } + + /** + * optional .ActivityTask Task = 12; + * @param value the task to set + * @return this + */ + public ActivityMsg setTask(final Public.ActivityTask value) { + bitField0_ |= 0x00000800; + task.copyFrom(value); + return this; + } + + /** + * optional .ActivityShop Shop = 13; + * @return whether the shop field is set + */ + public boolean hasShop() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * optional .ActivityShop Shop = 13; + * @return this + */ + public ActivityMsg clearShop() { + bitField0_ &= ~0x00001000; + shop.clear(); + return this; + } + + /** + * optional .ActivityShop Shop = 13; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShop()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ActivityShop getShop() { + return shop; + } + + /** + * optional .ActivityShop Shop = 13; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ActivityShop getMutableShop() { + bitField0_ |= 0x00001000; + return shop; + } + + /** + * optional .ActivityShop Shop = 13; + * @param value the shop to set + * @return this + */ + public ActivityMsg setShop(final Public.ActivityShop value) { + bitField0_ |= 0x00001000; + shop.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMsg clearNextPackage() { + bitField0_ &= ~0x00002000; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00002000; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMsg addNextPackage(final byte value) { + bitField0_ |= 0x00002000; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMsg addAllNextPackage(final byte... values) { + bitField0_ |= 0x00002000; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMsg setNextPackage(final byte... values) { + bitField0_ |= 0x00002000; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMsg copyFrom(final ActivityMsg other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + periodic.copyFrom(other.periodic); + login.copyFrom(other.login); + mining.copyFrom(other.mining); + jointDrill.copyFrom(other.jointDrill); + cookie.copyFrom(other.cookie); + towerDefense.copyFrom(other.towerDefense); + trial.copyFrom(other.trial); + cG.copyFrom(other.cG); + levels.copyFrom(other.levels); + avg.copyFrom(other.avg); + task.copyFrom(other.task); + shop.copyFrom(other.shop); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMsg mergeFrom(final ActivityMsg other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasPeriodic()) { + getMutablePeriodic().mergeFrom(other.periodic); + } + if (other.hasLogin()) { + getMutableLogin().mergeFrom(other.login); + } + if (other.hasMining()) { + getMutableMining().mergeFrom(other.mining); + } + if (other.hasJointDrill()) { + getMutableJointDrill().mergeFrom(other.jointDrill); + } + if (other.hasCookie()) { + getMutableCookie().mergeFrom(other.cookie); + } + if (other.hasTowerDefense()) { + getMutableTowerDefense().mergeFrom(other.towerDefense); + } + if (other.hasTrial()) { + getMutableTrial().mergeFrom(other.trial); + } + if (other.hasCG()) { + getMutableCG().mergeFrom(other.cG); + } + if (other.hasLevels()) { + getMutableLevels().mergeFrom(other.levels); + } + if (other.hasAvg()) { + getMutableAvg().mergeFrom(other.avg); + } + if (other.hasTask()) { + getMutableTask().mergeFrom(other.task); + } + if (other.hasShop()) { + getMutableShop().mergeFrom(other.shop); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMsg clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + periodic.clear(); + login.clear(); + mining.clear(); + jointDrill.clear(); + cookie.clear(); + towerDefense.clear(); + trial.clear(); + cG.clear(); + levels.clear(); + avg.clear(); + task.clear(); + shop.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityMsg clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + periodic.clearQuick(); + login.clearQuick(); + mining.clearQuick(); + jointDrill.clearQuick(); + cookie.clearQuick(); + towerDefense.clearQuick(); + trial.clearQuick(); + cG.clearQuick(); + levels.clearQuick(); + avg.clearQuick(); + task.clearQuick(); + shop.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMsg)) { + return false; + } + ActivityMsg other = (ActivityMsg) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasPeriodic() || periodic.equals(other.periodic)) + && (!hasLogin() || login.equals(other.login)) + && (!hasMining() || mining.equals(other.mining)) + && (!hasJointDrill() || jointDrill.equals(other.jointDrill)) + && (!hasCookie() || cookie.equals(other.cookie)) + && (!hasTowerDefense() || towerDefense.equals(other.towerDefense)) + && (!hasTrial() || trial.equals(other.trial)) + && (!hasCG() || cG.equals(other.cG)) + && (!hasLevels() || levels.equals(other.levels)) + && (!hasAvg() || avg.equals(other.avg)) + && (!hasTask() || task.equals(other.task)) + && (!hasShop() || shop.equals(other.shop)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(periodic); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(login); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(mining); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(jointDrill); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(cookie); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(towerDefense); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(trial); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(cG); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(levels); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(avg); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawByte((byte) 98); + output.writeMessageNoTag(task); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawByte((byte) 106); + output.writeMessageNoTag(shop); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(periodic); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(login); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(mining); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(jointDrill); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(cookie); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(towerDefense); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(trial); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(cG); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(levels); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(avg); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(task); + } + if ((bitField0_ & 0x00001000) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(shop); + } + if ((bitField0_ & 0x00002000) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMsg mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // periodic + input.readMessage(periodic); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // login + input.readMessage(login); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // mining + input.readMessage(mining); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // jointDrill + input.readMessage(jointDrill); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // cookie + input.readMessage(cookie); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // towerDefense + input.readMessage(towerDefense); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // trial + input.readMessage(trial); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // cG + input.readMessage(cG); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // levels + input.readMessage(levels); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 90) { + break; + } + } + case 90: { + // avg + input.readMessage(avg); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 98) { + break; + } + } + case 98: { + // task + input.readMessage(task); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 106) { + break; + } + } + case 106: { + // shop + input.readMessage(shop); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00002000; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.periodic, periodic); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.login, login); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.mining, mining); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.jointDrill, jointDrill); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.cookie, cookie); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeMessage(FieldNames.towerDefense, towerDefense); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeMessage(FieldNames.trial, trial); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeMessage(FieldNames.cG, cG); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeMessage(FieldNames.levels, levels); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeMessage(FieldNames.avg, avg); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeMessage(FieldNames.task, task); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeMessage(FieldNames.shop, shop); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMsg mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 498563771: { + if (input.isAtField(FieldNames.periodic)) { + if (!input.trySkipNullValue()) { + input.readMessage(periodic); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73596745: { + if (input.isAtField(FieldNames.login)) { + if (!input.trySkipNullValue()) { + input.readMessage(login); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1990171536: { + if (input.isAtField(FieldNames.mining)) { + if (!input.trySkipNullValue()) { + input.readMessage(mining); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 118850065: { + if (input.isAtField(FieldNames.jointDrill)) { + if (!input.trySkipNullValue()) { + input.readMessage(jointDrill); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2024076932: { + if (input.isAtField(FieldNames.cookie)) { + if (!input.trySkipNullValue()) { + input.readMessage(cookie); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 606816023: { + if (input.isAtField(FieldNames.towerDefense)) { + if (!input.trySkipNullValue()) { + input.readMessage(towerDefense); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 81075958: { + if (input.isAtField(FieldNames.trial)) { + if (!input.trySkipNullValue()) { + input.readMessage(trial); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2148: { + if (input.isAtField(FieldNames.cG)) { + if (!input.trySkipNullValue()) { + input.readMessage(cG); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022260337: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readMessage(levels); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66226: { + if (input.isAtField(FieldNames.avg)) { + if (!input.trySkipNullValue()) { + input.readMessage(avg); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2599333: { + if (input.isAtField(FieldNames.task)) { + if (!input.trySkipNullValue()) { + input.readMessage(task); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576150: { + if (input.isAtField(FieldNames.shop)) { + if (!input.trySkipNullValue()) { + input.readMessage(shop); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMsg clone() { + return new ActivityMsg().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMsg parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMsg(), data).checkInitialized(); + } + + public static ActivityMsg parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMsg(), input).checkInitialized(); + } + + public static ActivityMsg parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMsg(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMsg messages + */ + public static MessageFactory getFactory() { + return ActivityMsgFactory.INSTANCE; + } + + private enum ActivityMsgFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMsg create() { + return ActivityMsg.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName periodic = FieldName.forField("Periodic"); + + static final FieldName login = FieldName.forField("Login"); + + static final FieldName mining = FieldName.forField("Mining"); + + static final FieldName jointDrill = FieldName.forField("JointDrill"); + + static final FieldName cookie = FieldName.forField("Cookie"); + + static final FieldName towerDefense = FieldName.forField("TowerDefense"); + + static final FieldName trial = FieldName.forField("Trial"); + + static final FieldName cG = FieldName.forField("CG"); + + static final FieldName levels = FieldName.forField("Levels"); + + static final FieldName avg = FieldName.forField("Avg"); + + static final FieldName task = FieldName.forField("Task"); + + static final FieldName shop = FieldName.forField("Shop"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityResp} + */ + public static final class ActivityResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ActivityMsg List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(ActivityMsg.getFactory()); + + private ActivityResp() { + } + + /** + * @return a new empty instance of {@code ActivityResp} + */ + public static ActivityResp newInstance() { + return new ActivityResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ActivityMsg List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .ActivityMsg List = 1; + * @return this + */ + public ActivityResp clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .ActivityMsg List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .ActivityMsg List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .ActivityMsg List = 1; + * @param value the list to add + * @return this + */ + public ActivityResp addList(final ActivityMsg value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .ActivityMsg List = 1; + * @param values the list to add + * @return this + */ + public ActivityResp addAllList(final ActivityMsg... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public ActivityResp copyFrom(final ActivityResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public ActivityResp mergeFrom(final ActivityResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public ActivityResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public ActivityResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityResp)) { + return false; + } + ActivityResp other = (ActivityResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public ActivityResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityResp clone() { + return new ActivityResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityResp(), data).checkInitialized(); + } + + public static ActivityResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityResp(), input).checkInitialized(); + } + + public static ActivityResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityResp messages + */ + public static MessageFactory getFactory() { + return ActivityRespFactory.INSTANCE; + } + + private enum ActivityRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityResp create() { + return ActivityResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityLevelsApply.java b/src/generated/main/emu/nebula/proto/ActivityLevelsApply.java new file mode 100644 index 0000000..eff2730 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityLevelsApply.java @@ -0,0 +1,543 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityLevelsApply { + /** + * Protobuf type {@code ActivityLevelsApplyReq} + */ + public static final class ActivityLevelsApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 3; + */ + private long buildId; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 LevelId = 2; + */ + private int levelId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityLevelsApplyReq() { + } + + /** + * @return a new empty instance of {@code ActivityLevelsApplyReq} + */ + public static ActivityLevelsApplyReq newInstance() { + return new ActivityLevelsApplyReq(); + } + + /** + * optional uint64 BuildId = 3; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 3; + * @return this + */ + public ActivityLevelsApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 3; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 3; + * @param value the buildId to set + * @return this + */ + public ActivityLevelsApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityLevelsApplyReq clearActivityId() { + bitField0_ &= ~0x00000002; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityLevelsApplyReq setActivityId(final int value) { + bitField0_ |= 0x00000002; + activityId = value; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 LevelId = 2; + * @return this + */ + public ActivityLevelsApplyReq clearLevelId() { + bitField0_ &= ~0x00000004; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 2; + * @param value the levelId to set + * @return this + */ + public ActivityLevelsApplyReq setLevelId(final int value) { + bitField0_ |= 0x00000004; + levelId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityLevelsApplyReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityLevelsApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityLevelsApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityLevelsApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityLevelsApplyReq copyFrom(final ActivityLevelsApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + activityId = other.activityId; + levelId = other.levelId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevelsApplyReq mergeFrom(final ActivityLevelsApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevelsApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + activityId = 0; + levelId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityLevelsApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevelsApplyReq)) { + return false; + } + ActivityLevelsApplyReq other = (ActivityLevelsApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasActivityId() || activityId == other.activityId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevelsApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityLevelsApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevelsApplyReq clone() { + return new ActivityLevelsApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevelsApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevelsApplyReq(), data).checkInitialized(); + } + + public static ActivityLevelsApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsApplyReq(), input).checkInitialized(); + } + + public static ActivityLevelsApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevelsApplyReq messages + */ + public static MessageFactory getFactory() { + return ActivityLevelsApplyReqFactory.INSTANCE; + } + + private enum ActivityLevelsApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityLevelsApplyReq create() { + return ActivityLevelsApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityLevelsSettle.java b/src/generated/main/emu/nebula/proto/ActivityLevelsSettle.java new file mode 100644 index 0000000..2722f3a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityLevelsSettle.java @@ -0,0 +1,1260 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ActivityLevelsSettle { + /** + * Protobuf type {@code ActivityLevelsSettleReq} + */ + public static final class ActivityLevelsSettleReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 Star = 2; + */ + private int star; + + /** + * optional .Events Events = 3; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityLevelsSettleReq() { + } + + /** + * @return a new empty instance of {@code ActivityLevelsSettleReq} + */ + public static ActivityLevelsSettleReq newInstance() { + return new ActivityLevelsSettleReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityLevelsSettleReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityLevelsSettleReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 Star = 2; + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Star = 2; + * @return this + */ + public ActivityLevelsSettleReq clearStar() { + bitField0_ &= ~0x00000002; + star = 0; + return this; + } + + /** + * optional uint32 Star = 2; + * @return the star + */ + public int getStar() { + return star; + } + + /** + * optional uint32 Star = 2; + * @param value the star to set + * @return this + */ + public ActivityLevelsSettleReq setStar(final int value) { + bitField0_ |= 0x00000002; + star = value; + return this; + } + + /** + * optional .Events Events = 3; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .Events Events = 3; + * @return this + */ + public ActivityLevelsSettleReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * optional .Events Events = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * optional .Events Events = 3; + * @param value the events to set + * @return this + */ + public ActivityLevelsSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityLevelsSettleReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityLevelsSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityLevelsSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityLevelsSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityLevelsSettleReq copyFrom(final ActivityLevelsSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + star = other.star; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevelsSettleReq mergeFrom(final ActivityLevelsSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevelsSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + star = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityLevelsSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevelsSettleReq)) { + return false; + } + ActivityLevelsSettleReq other = (ActivityLevelsSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasStar() || star == other.star) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevelsSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityLevelsSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevelsSettleReq clone() { + return new ActivityLevelsSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevelsSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevelsSettleReq(), data).checkInitialized(); + } + + public static ActivityLevelsSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSettleReq(), input).checkInitialized(); + } + + public static ActivityLevelsSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevelsSettleReq messages + */ + public static MessageFactory getFactory() { + return ActivityLevelsSettleReqFactory.INSTANCE; + } + + private enum ActivityLevelsSettleReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityLevelsSettleReq create() { + return ActivityLevelsSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityLevelsSettleResp} + */ + public static final class ActivityLevelsSettleResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Exp = 3; + */ + private int exp; + + /** + * optional .ChangeInfo ChangeInfo = 1; + */ + private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl First = 2; + */ + private final RepeatedMessage first = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * repeated .ItemTpl Fixed = 4; + */ + private final RepeatedMessage fixed = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private ActivityLevelsSettleResp() { + } + + /** + * @return a new empty instance of {@code ActivityLevelsSettleResp} + */ + public static ActivityLevelsSettleResp newInstance() { + return new ActivityLevelsSettleResp(); + } + + /** + * optional uint32 Exp = 3; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Exp = 3; + * @return this + */ + public ActivityLevelsSettleResp clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 3; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 3; + * @param value the exp to set + * @return this + */ + public ActivityLevelsSettleResp setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @return whether the changeInfo field is set + */ + public boolean hasChangeInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @return this + */ + public ActivityLevelsSettleResp clearChangeInfo() { + bitField0_ &= ~0x00000002; + changeInfo.clear(); + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChangeInfo() { + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChangeInfo() { + bitField0_ |= 0x00000002; + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @param value the changeInfo to set + * @return this + */ + public ActivityLevelsSettleResp setChangeInfo(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + changeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityLevelsSettleResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityLevelsSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityLevelsSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityLevelsSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl First = 2; + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .ItemTpl First = 2; + * @return this + */ + public ActivityLevelsSettleResp clearFirst() { + bitField0_ &= ~0x00000008; + first.clear(); + return this; + } + + /** + * repeated .ItemTpl First = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFirst()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFirst() { + return first; + } + + /** + * repeated .ItemTpl First = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFirst() { + bitField0_ |= 0x00000008; + return first; + } + + /** + * repeated .ItemTpl First = 2; + * @param value the first to add + * @return this + */ + public ActivityLevelsSettleResp addFirst(final Public.ItemTpl value) { + bitField0_ |= 0x00000008; + first.add(value); + return this; + } + + /** + * repeated .ItemTpl First = 2; + * @param values the first to add + * @return this + */ + public ActivityLevelsSettleResp addAllFirst(final Public.ItemTpl... values) { + bitField0_ |= 0x00000008; + first.addAll(values); + return this; + } + + /** + * repeated .ItemTpl Fixed = 4; + * @return whether the fixed field is set + */ + public boolean hasFixed() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .ItemTpl Fixed = 4; + * @return this + */ + public ActivityLevelsSettleResp clearFixed() { + bitField0_ &= ~0x00000010; + fixed.clear(); + return this; + } + + /** + * repeated .ItemTpl Fixed = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFixed()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFixed() { + return fixed; + } + + /** + * repeated .ItemTpl Fixed = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFixed() { + bitField0_ |= 0x00000010; + return fixed; + } + + /** + * repeated .ItemTpl Fixed = 4; + * @param value the fixed to add + * @return this + */ + public ActivityLevelsSettleResp addFixed(final Public.ItemTpl value) { + bitField0_ |= 0x00000010; + fixed.add(value); + return this; + } + + /** + * repeated .ItemTpl Fixed = 4; + * @param values the fixed to add + * @return this + */ + public ActivityLevelsSettleResp addAllFixed(final Public.ItemTpl... values) { + bitField0_ |= 0x00000010; + fixed.addAll(values); + return this; + } + + @Override + public ActivityLevelsSettleResp copyFrom(final ActivityLevelsSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + changeInfo.copyFrom(other.changeInfo); + nextPackage.copyFrom(other.nextPackage); + first.copyFrom(other.first); + fixed.copyFrom(other.fixed); + } + return this; + } + + @Override + public ActivityLevelsSettleResp mergeFrom(final ActivityLevelsSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasChangeInfo()) { + getMutableChangeInfo().mergeFrom(other.changeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasFirst()) { + getMutableFirst().addAll(other.first); + } + if (other.hasFixed()) { + getMutableFixed().addAll(other.fixed); + } + return this; + } + + @Override + public ActivityLevelsSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + changeInfo.clear(); + nextPackage.clear(); + first.clear(); + fixed.clear(); + return this; + } + + @Override + public ActivityLevelsSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clearQuick(); + nextPackage.clear(); + first.clearQuick(); + fixed.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevelsSettleResp)) { + return false; + } + ActivityLevelsSettleResp other = (ActivityLevelsSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasFirst() || first.equals(other.first)) + && (!hasFixed() || fixed.equals(other.fixed)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(changeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < first.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(first.get(i)); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < fixed.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(fixed.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(changeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * first.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(first); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * fixed.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(fixed); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevelsSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // changeInfo + input.readMessage(changeInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // first + tag = input.readRepeatedMessage(first, tag); + bitField0_ |= 0x00000008; + if (tag != 34) { + break; + } + } + case 34: { + // fixed + tag = input.readRepeatedMessage(fixed, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.changeInfo, changeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.first, first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.fixed, fixed); + } + output.endObject(); + } + + @Override + public ActivityLevelsSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -138776418: { + if (input.isAtField(FieldNames.changeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(changeInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(first); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67893076: { + if (input.isAtField(FieldNames.fixed)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(fixed); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevelsSettleResp clone() { + return new ActivityLevelsSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevelsSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevelsSettleResp(), data).checkInitialized(); + } + + public static ActivityLevelsSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSettleResp(), input).checkInitialized(); + } + + public static ActivityLevelsSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevelsSettleResp messages + */ + public static MessageFactory getFactory() { + return ActivityLevelsSettleRespFactory.INSTANCE; + } + + private enum ActivityLevelsSettleRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityLevelsSettleResp create() { + return ActivityLevelsSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName changeInfo = FieldName.forField("ChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName fixed = FieldName.forField("Fixed"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityLevelsSweep.java b/src/generated/main/emu/nebula/proto/ActivityLevelsSweep.java new file mode 100644 index 0000000..a7855f2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityLevelsSweep.java @@ -0,0 +1,1628 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ActivityLevelsSweep { + /** + * Protobuf type {@code ActivityLevelsSweepReq} + */ + public static final class ActivityLevelsSweepReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 LevelId = 2; + */ + private int levelId; + + /** + * optional uint32 Times = 3; + */ + private int times; + + /** + * optional .Events Events = 15; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityLevelsSweepReq() { + } + + /** + * @return a new empty instance of {@code ActivityLevelsSweepReq} + */ + public static ActivityLevelsSweepReq newInstance() { + return new ActivityLevelsSweepReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityLevelsSweepReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityLevelsSweepReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 LevelId = 2; + * @return this + */ + public ActivityLevelsSweepReq clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 2; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 2; + * @param value the levelId to set + * @return this + */ + public ActivityLevelsSweepReq setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * optional uint32 Times = 3; + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Times = 3; + * @return this + */ + public ActivityLevelsSweepReq clearTimes() { + bitField0_ &= ~0x00000004; + times = 0; + return this; + } + + /** + * optional uint32 Times = 3; + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * optional uint32 Times = 3; + * @param value the times to set + * @return this + */ + public ActivityLevelsSweepReq setTimes(final int value) { + bitField0_ |= 0x00000004; + times = value; + return this; + } + + /** + * optional .Events Events = 15; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .Events Events = 15; + * @return this + */ + public ActivityLevelsSweepReq clearEvents() { + bitField0_ &= ~0x00000008; + events.clear(); + return this; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000008; + return events; + } + + /** + * optional .Events Events = 15; + * @param value the events to set + * @return this + */ + public ActivityLevelsSweepReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000008; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityLevelsSweepReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityLevelsSweepReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityLevelsSweepReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityLevelsSweepReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityLevelsSweepReq copyFrom(final ActivityLevelsSweepReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + levelId = other.levelId; + times = other.times; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevelsSweepReq mergeFrom(final ActivityLevelsSweepReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevelsSweepReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + levelId = 0; + times = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityLevelsSweepReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevelsSweepReq)) { + return false; + } + ActivityLevelsSweepReq other = (ActivityLevelsSweepReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasTimes() || times == other.times) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevelsSweepReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityLevelsSweepReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevelsSweepReq clone() { + return new ActivityLevelsSweepReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevelsSweepReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepReq(), data).checkInitialized(); + } + + public static ActivityLevelsSweepReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepReq(), input).checkInitialized(); + } + + public static ActivityLevelsSweepReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevelsSweepReq messages + */ + public static MessageFactory getFactory() { + return ActivityLevelsSweepReqFactory.INSTANCE; + } + + private enum ActivityLevelsSweepReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityLevelsSweepReq create() { + return ActivityLevelsSweepReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName times = FieldName.forField("Times"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityLevelsSweepReward} + */ + public static final class ActivityLevelsSweepReward extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Exp = 2; + */ + private int exp; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl AwardItems = 1; + */ + private final RepeatedMessage awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private ActivityLevelsSweepReward() { + } + + /** + * @return a new empty instance of {@code ActivityLevelsSweepReward} + */ + public static ActivityLevelsSweepReward newInstance() { + return new ActivityLevelsSweepReward(); + } + + /** + * optional uint32 Exp = 2; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Exp = 2; + * @return this + */ + public ActivityLevelsSweepReward clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 2; + * @param value the exp to set + * @return this + */ + public ActivityLevelsSweepReward setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityLevelsSweepReward clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityLevelsSweepReward addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityLevelsSweepReward addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityLevelsSweepReward setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @return this + */ + public ActivityLevelsSweepReward clearAwardItems() { + bitField0_ &= ~0x00000004; + awardItems.clear(); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getAwardItems() { + return awardItems; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableAwardItems() { + bitField0_ |= 0x00000004; + return awardItems; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @param value the awardItems to add + * @return this + */ + public ActivityLevelsSweepReward addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + awardItems.add(value); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @param values the awardItems to add + * @return this + */ + public ActivityLevelsSweepReward addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + awardItems.addAll(values); + return this; + } + + @Override + public ActivityLevelsSweepReward copyFrom(final ActivityLevelsSweepReward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + } + return this; + } + + @Override + public ActivityLevelsSweepReward mergeFrom(final ActivityLevelsSweepReward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + return this; + } + + @Override + public ActivityLevelsSweepReward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + nextPackage.clear(); + awardItems.clear(); + return this; + } + + @Override + public ActivityLevelsSweepReward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + awardItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevelsSweepReward)) { + return false; + } + ActivityLevelsSweepReward other = (ActivityLevelsSweepReward) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(awardItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevelsSweepReward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + output.endObject(); + } + + @Override + public ActivityLevelsSweepReward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevelsSweepReward clone() { + return new ActivityLevelsSweepReward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevelsSweepReward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepReward(), data).checkInitialized(); + } + + public static ActivityLevelsSweepReward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepReward(), input).checkInitialized(); + } + + public static ActivityLevelsSweepReward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepReward(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevelsSweepReward messages + */ + public static MessageFactory getFactory() { + return ActivityLevelsSweepRewardFactory.INSTANCE; + } + + private enum ActivityLevelsSweepRewardFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityLevelsSweepReward create() { + return ActivityLevelsSweepReward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + } + } + + /** + * Protobuf type {@code ActivityLevelsSweepResp} + */ + public static final class ActivityLevelsSweepResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo ChangeInfo = 1; + */ + private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ActivityLevelsSweepReward Rewards = 2; + */ + private final RepeatedMessage rewards = RepeatedMessage.newEmptyInstance(ActivityLevelsSweepReward.getFactory()); + + private ActivityLevelsSweepResp() { + } + + /** + * @return a new empty instance of {@code ActivityLevelsSweepResp} + */ + public static ActivityLevelsSweepResp newInstance() { + return new ActivityLevelsSweepResp(); + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @return whether the changeInfo field is set + */ + public boolean hasChangeInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @return this + */ + public ActivityLevelsSweepResp clearChangeInfo() { + bitField0_ &= ~0x00000001; + changeInfo.clear(); + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChangeInfo() { + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChangeInfo() { + bitField0_ |= 0x00000001; + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @param value the changeInfo to set + * @return this + */ + public ActivityLevelsSweepResp setChangeInfo(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + changeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityLevelsSweepResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityLevelsSweepResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityLevelsSweepResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityLevelsSweepResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ActivityLevelsSweepReward Rewards = 2; + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ActivityLevelsSweepReward Rewards = 2; + * @return this + */ + public ActivityLevelsSweepResp clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * repeated .ActivityLevelsSweepReward Rewards = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewards() { + return rewards; + } + + /** + * repeated .ActivityLevelsSweepReward Rewards = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * repeated .ActivityLevelsSweepReward Rewards = 2; + * @param value the rewards to add + * @return this + */ + public ActivityLevelsSweepResp addRewards(final ActivityLevelsSweepReward value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * repeated .ActivityLevelsSweepReward Rewards = 2; + * @param values the rewards to add + * @return this + */ + public ActivityLevelsSweepResp addAllRewards(final ActivityLevelsSweepReward... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public ActivityLevelsSweepResp copyFrom(final ActivityLevelsSweepResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + changeInfo.copyFrom(other.changeInfo); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public ActivityLevelsSweepResp mergeFrom(final ActivityLevelsSweepResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChangeInfo()) { + getMutableChangeInfo().mergeFrom(other.changeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public ActivityLevelsSweepResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public ActivityLevelsSweepResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevelsSweepResp)) { + return false; + } + ActivityLevelsSweepResp other = (ActivityLevelsSweepResp) o; + return bitField0_ == other.bitField0_ + && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevelsSweepResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // changeInfo + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.changeInfo, changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public ActivityLevelsSweepResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -138776418: { + if (input.isAtField(FieldNames.changeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevelsSweepResp clone() { + return new ActivityLevelsSweepResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevelsSweepResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepResp(), data).checkInitialized(); + } + + public static ActivityLevelsSweepResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepResp(), input).checkInitialized(); + } + + public static ActivityLevelsSweepResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevelsSweepResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevelsSweepResp messages + */ + public static MessageFactory getFactory() { + return ActivityLevelsSweepRespFactory.INSTANCE; + } + + private enum ActivityLevelsSweepRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityLevelsSweepResp create() { + return ActivityLevelsSweepResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName changeInfo = FieldName.forField("ChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityLoginRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityLoginRewardReceive.java new file mode 100644 index 0000000..62d9bec --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityLoginRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class ActivityLoginRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/ActivityMiningApply.java b/src/generated/main/emu/nebula/proto/ActivityMiningApply.java new file mode 100644 index 0000000..c5077d1 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityMiningApply.java @@ -0,0 +1,873 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityMiningApply { + /** + * Protobuf type {@code ActivityMiningApplyReq} + */ + public static final class ActivityMiningApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningApplyReq() { + } + + /** + * @return a new empty instance of {@code ActivityMiningApplyReq} + */ + public static ActivityMiningApplyReq newInstance() { + return new ActivityMiningApplyReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityMiningApplyReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityMiningApplyReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningApplyReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningApplyReq copyFrom(final ActivityMiningApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningApplyReq mergeFrom(final ActivityMiningApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningApplyReq)) { + return false; + } + ActivityMiningApplyReq other = (ActivityMiningApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningApplyReq clone() { + return new ActivityMiningApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningApplyReq(), data).checkInitialized(); + } + + public static ActivityMiningApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningApplyReq(), input).checkInitialized(); + } + + public static ActivityMiningApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningApplyReq messages + */ + public static MessageFactory getFactory() { + return ActivityMiningApplyReqFactory.INSTANCE; + } + + private enum ActivityMiningApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningApplyReq create() { + return ActivityMiningApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityMiningApplyResp} + */ + public static final class ActivityMiningApplyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .MiningLayer Layer = 1; + */ + private final PublicMining.MiningLayer layer = PublicMining.MiningLayer.newInstance(); + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + */ + private final PublicMining.MiningChangeInfo miningChangeInfo = PublicMining.MiningChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningApplyResp() { + } + + /** + * @return a new empty instance of {@code ActivityMiningApplyResp} + */ + public static ActivityMiningApplyResp newInstance() { + return new ActivityMiningApplyResp(); + } + + /** + * optional .MiningLayer Layer = 1; + * @return whether the layer field is set + */ + public boolean hasLayer() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .MiningLayer Layer = 1; + * @return this + */ + public ActivityMiningApplyResp clearLayer() { + bitField0_ &= ~0x00000001; + layer.clear(); + return this; + } + + /** + * optional .MiningLayer Layer = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLayer()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicMining.MiningLayer getLayer() { + return layer; + } + + /** + * optional .MiningLayer Layer = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicMining.MiningLayer getMutableLayer() { + bitField0_ |= 0x00000001; + return layer; + } + + /** + * optional .MiningLayer Layer = 1; + * @param value the layer to set + * @return this + */ + public ActivityMiningApplyResp setLayer(final PublicMining.MiningLayer value) { + bitField0_ |= 0x00000001; + layer.copyFrom(value); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return whether the miningChangeInfo field is set + */ + public boolean hasMiningChangeInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return this + */ + public ActivityMiningApplyResp clearMiningChangeInfo() { + bitField0_ &= ~0x00000002; + miningChangeInfo.clear(); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMiningChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicMining.MiningChangeInfo getMiningChangeInfo() { + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicMining.MiningChangeInfo getMutableMiningChangeInfo() { + bitField0_ |= 0x00000002; + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @param value the miningChangeInfo to set + * @return this + */ + public ActivityMiningApplyResp setMiningChangeInfo(final PublicMining.MiningChangeInfo value) { + bitField0_ |= 0x00000002; + miningChangeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningApplyResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningApplyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningApplyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningApplyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningApplyResp copyFrom(final ActivityMiningApplyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + layer.copyFrom(other.layer); + miningChangeInfo.copyFrom(other.miningChangeInfo); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningApplyResp mergeFrom(final ActivityMiningApplyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLayer()) { + getMutableLayer().mergeFrom(other.layer); + } + if (other.hasMiningChangeInfo()) { + getMutableMiningChangeInfo().mergeFrom(other.miningChangeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningApplyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + layer.clear(); + miningChangeInfo.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningApplyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + layer.clearQuick(); + miningChangeInfo.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningApplyResp)) { + return false; + } + ActivityMiningApplyResp other = (ActivityMiningApplyResp) o; + return bitField0_ == other.bitField0_ + && (!hasLayer() || layer.equals(other.layer)) + && (!hasMiningChangeInfo() || miningChangeInfo.equals(other.miningChangeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningApplyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // layer + input.readMessage(layer); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // miningChangeInfo + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.layer, layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.miningChangeInfo, miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningApplyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73196849: { + if (input.isAtField(FieldNames.layer)) { + if (!input.trySkipNullValue()) { + input.readMessage(layer); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1023670002: { + if (input.isAtField(FieldNames.miningChangeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningApplyResp clone() { + return new ActivityMiningApplyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningApplyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningApplyResp(), data).checkInitialized(); + } + + public static ActivityMiningApplyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningApplyResp(), input).checkInitialized(); + } + + public static ActivityMiningApplyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningApplyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningApplyResp messages + */ + public static MessageFactory getFactory() { + return ActivityMiningApplyRespFactory.INSTANCE; + } + + private enum ActivityMiningApplyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningApplyResp create() { + return ActivityMiningApplyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName layer = FieldName.forField("Layer"); + + static final FieldName miningChangeInfo = FieldName.forField("MiningChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityMiningDig.java b/src/generated/main/emu/nebula/proto/ActivityMiningDig.java new file mode 100644 index 0000000..1812d34 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityMiningDig.java @@ -0,0 +1,953 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityMiningDig { + /** + * Protobuf type {@code ActivityMiningDigReq} + */ + public static final class ActivityMiningDigReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 GridId = 2; + */ + private int gridId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningDigReq() { + } + + /** + * @return a new empty instance of {@code ActivityMiningDigReq} + */ + public static ActivityMiningDigReq newInstance() { + return new ActivityMiningDigReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityMiningDigReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityMiningDigReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 GridId = 2; + * @return whether the gridId field is set + */ + public boolean hasGridId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 GridId = 2; + * @return this + */ + public ActivityMiningDigReq clearGridId() { + bitField0_ &= ~0x00000002; + gridId = 0; + return this; + } + + /** + * optional uint32 GridId = 2; + * @return the gridId + */ + public int getGridId() { + return gridId; + } + + /** + * optional uint32 GridId = 2; + * @param value the gridId to set + * @return this + */ + public ActivityMiningDigReq setGridId(final int value) { + bitField0_ |= 0x00000002; + gridId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningDigReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningDigReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningDigReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningDigReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningDigReq copyFrom(final ActivityMiningDigReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + gridId = other.gridId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningDigReq mergeFrom(final ActivityMiningDigReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasGridId()) { + setGridId(other.gridId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningDigReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + gridId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningDigReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningDigReq)) { + return false; + } + ActivityMiningDigReq other = (ActivityMiningDigReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasGridId() || gridId == other.gridId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(gridId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(gridId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningDigReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // gridId + gridId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.gridId, gridId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningDigReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2141177633: { + if (input.isAtField(FieldNames.gridId)) { + if (!input.trySkipNullValue()) { + gridId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningDigReq clone() { + return new ActivityMiningDigReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningDigReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningDigReq(), data).checkInitialized(); + } + + public static ActivityMiningDigReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningDigReq(), input).checkInitialized(); + } + + public static ActivityMiningDigReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningDigReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningDigReq messages + */ + public static MessageFactory getFactory() { + return ActivityMiningDigReqFactory.INSTANCE; + } + + private enum ActivityMiningDigReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningDigReq create() { + return ActivityMiningDigReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName gridId = FieldName.forField("GridId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityMiningDigResp} + */ + public static final class ActivityMiningDigResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo ChangeInfo = 1; + */ + private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + */ + private final PublicMining.MiningChangeInfo miningChangeInfo = PublicMining.MiningChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningDigResp() { + } + + /** + * @return a new empty instance of {@code ActivityMiningDigResp} + */ + public static ActivityMiningDigResp newInstance() { + return new ActivityMiningDigResp(); + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @return whether the changeInfo field is set + */ + public boolean hasChangeInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @return this + */ + public ActivityMiningDigResp clearChangeInfo() { + bitField0_ &= ~0x00000001; + changeInfo.clear(); + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChangeInfo() { + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChangeInfo() { + bitField0_ |= 0x00000001; + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 1; + * @param value the changeInfo to set + * @return this + */ + public ActivityMiningDigResp setChangeInfo(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + changeInfo.copyFrom(value); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return whether the miningChangeInfo field is set + */ + public boolean hasMiningChangeInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return this + */ + public ActivityMiningDigResp clearMiningChangeInfo() { + bitField0_ &= ~0x00000002; + miningChangeInfo.clear(); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMiningChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicMining.MiningChangeInfo getMiningChangeInfo() { + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicMining.MiningChangeInfo getMutableMiningChangeInfo() { + bitField0_ |= 0x00000002; + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @param value the miningChangeInfo to set + * @return this + */ + public ActivityMiningDigResp setMiningChangeInfo(final PublicMining.MiningChangeInfo value) { + bitField0_ |= 0x00000002; + miningChangeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningDigResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningDigResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningDigResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningDigResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningDigResp copyFrom(final ActivityMiningDigResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + changeInfo.copyFrom(other.changeInfo); + miningChangeInfo.copyFrom(other.miningChangeInfo); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningDigResp mergeFrom(final ActivityMiningDigResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChangeInfo()) { + getMutableChangeInfo().mergeFrom(other.changeInfo); + } + if (other.hasMiningChangeInfo()) { + getMutableMiningChangeInfo().mergeFrom(other.miningChangeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningDigResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clear(); + miningChangeInfo.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningDigResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clearQuick(); + miningChangeInfo.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningDigResp)) { + return false; + } + ActivityMiningDigResp other = (ActivityMiningDigResp) o; + return bitField0_ == other.bitField0_ + && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) + && (!hasMiningChangeInfo() || miningChangeInfo.equals(other.miningChangeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningDigResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // changeInfo + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // miningChangeInfo + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.changeInfo, changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.miningChangeInfo, miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningDigResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -138776418: { + if (input.isAtField(FieldNames.changeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1023670002: { + if (input.isAtField(FieldNames.miningChangeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningDigResp clone() { + return new ActivityMiningDigResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningDigResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningDigResp(), data).checkInitialized(); + } + + public static ActivityMiningDigResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningDigResp(), input).checkInitialized(); + } + + public static ActivityMiningDigResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMiningDigResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningDigResp messages + */ + public static MessageFactory getFactory() { + return ActivityMiningDigRespFactory.INSTANCE; + } + + private enum ActivityMiningDigRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningDigResp create() { + return ActivityMiningDigResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName changeInfo = FieldName.forField("ChangeInfo"); + + static final FieldName miningChangeInfo = FieldName.forField("MiningChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityMiningMoveToNextLayer.java b/src/generated/main/emu/nebula/proto/ActivityMiningMoveToNextLayer.java new file mode 100644 index 0000000..c15ff18 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityMiningMoveToNextLayer.java @@ -0,0 +1,881 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityMiningMoveToNextLayer { + /** + * Protobuf type {@code ActivityMiningMoveToNextLayerReq} + */ + public static final class ActivityMiningMoveToNextLayerReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningMoveToNextLayerReq() { + } + + /** + * @return a new empty instance of {@code ActivityMiningMoveToNextLayerReq} + */ + public static ActivityMiningMoveToNextLayerReq newInstance() { + return new ActivityMiningMoveToNextLayerReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityMiningMoveToNextLayerReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityMiningMoveToNextLayerReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningMoveToNextLayerReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningMoveToNextLayerReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningMoveToNextLayerReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningMoveToNextLayerReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningMoveToNextLayerReq copyFrom(final ActivityMiningMoveToNextLayerReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningMoveToNextLayerReq mergeFrom( + final ActivityMiningMoveToNextLayerReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningMoveToNextLayerReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningMoveToNextLayerReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningMoveToNextLayerReq)) { + return false; + } + ActivityMiningMoveToNextLayerReq other = (ActivityMiningMoveToNextLayerReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningMoveToNextLayerReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningMoveToNextLayerReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningMoveToNextLayerReq clone() { + return new ActivityMiningMoveToNextLayerReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningMoveToNextLayerReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningMoveToNextLayerReq(), data).checkInitialized(); + } + + public static ActivityMiningMoveToNextLayerReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningMoveToNextLayerReq(), input).checkInitialized(); + } + + public static ActivityMiningMoveToNextLayerReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningMoveToNextLayerReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningMoveToNextLayerReq messages + */ + public static MessageFactory getFactory() { + return ActivityMiningMoveToNextLayerReqFactory.INSTANCE; + } + + private enum ActivityMiningMoveToNextLayerReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningMoveToNextLayerReq create() { + return ActivityMiningMoveToNextLayerReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityMiningMoveToNextLayerResp} + */ + public static final class ActivityMiningMoveToNextLayerResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .MiningLayer Layer = 1; + */ + private final PublicMining.MiningLayer layer = PublicMining.MiningLayer.newInstance(); + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + */ + private final PublicMining.MiningChangeInfo miningChangeInfo = PublicMining.MiningChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningMoveToNextLayerResp() { + } + + /** + * @return a new empty instance of {@code ActivityMiningMoveToNextLayerResp} + */ + public static ActivityMiningMoveToNextLayerResp newInstance() { + return new ActivityMiningMoveToNextLayerResp(); + } + + /** + * optional .MiningLayer Layer = 1; + * @return whether the layer field is set + */ + public boolean hasLayer() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .MiningLayer Layer = 1; + * @return this + */ + public ActivityMiningMoveToNextLayerResp clearLayer() { + bitField0_ &= ~0x00000001; + layer.clear(); + return this; + } + + /** + * optional .MiningLayer Layer = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLayer()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicMining.MiningLayer getLayer() { + return layer; + } + + /** + * optional .MiningLayer Layer = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicMining.MiningLayer getMutableLayer() { + bitField0_ |= 0x00000001; + return layer; + } + + /** + * optional .MiningLayer Layer = 1; + * @param value the layer to set + * @return this + */ + public ActivityMiningMoveToNextLayerResp setLayer(final PublicMining.MiningLayer value) { + bitField0_ |= 0x00000001; + layer.copyFrom(value); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return whether the miningChangeInfo field is set + */ + public boolean hasMiningChangeInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return this + */ + public ActivityMiningMoveToNextLayerResp clearMiningChangeInfo() { + bitField0_ &= ~0x00000002; + miningChangeInfo.clear(); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMiningChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicMining.MiningChangeInfo getMiningChangeInfo() { + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicMining.MiningChangeInfo getMutableMiningChangeInfo() { + bitField0_ |= 0x00000002; + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @param value the miningChangeInfo to set + * @return this + */ + public ActivityMiningMoveToNextLayerResp setMiningChangeInfo( + final PublicMining.MiningChangeInfo value) { + bitField0_ |= 0x00000002; + miningChangeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningMoveToNextLayerResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningMoveToNextLayerResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningMoveToNextLayerResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningMoveToNextLayerResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningMoveToNextLayerResp copyFrom( + final ActivityMiningMoveToNextLayerResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + layer.copyFrom(other.layer); + miningChangeInfo.copyFrom(other.miningChangeInfo); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningMoveToNextLayerResp mergeFrom( + final ActivityMiningMoveToNextLayerResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLayer()) { + getMutableLayer().mergeFrom(other.layer); + } + if (other.hasMiningChangeInfo()) { + getMutableMiningChangeInfo().mergeFrom(other.miningChangeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningMoveToNextLayerResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + layer.clear(); + miningChangeInfo.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningMoveToNextLayerResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + layer.clearQuick(); + miningChangeInfo.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningMoveToNextLayerResp)) { + return false; + } + ActivityMiningMoveToNextLayerResp other = (ActivityMiningMoveToNextLayerResp) o; + return bitField0_ == other.bitField0_ + && (!hasLayer() || layer.equals(other.layer)) + && (!hasMiningChangeInfo() || miningChangeInfo.equals(other.miningChangeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningMoveToNextLayerResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // layer + input.readMessage(layer); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // miningChangeInfo + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.layer, layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.miningChangeInfo, miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningMoveToNextLayerResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73196849: { + if (input.isAtField(FieldNames.layer)) { + if (!input.trySkipNullValue()) { + input.readMessage(layer); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1023670002: { + if (input.isAtField(FieldNames.miningChangeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningMoveToNextLayerResp clone() { + return new ActivityMiningMoveToNextLayerResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningMoveToNextLayerResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningMoveToNextLayerResp(), data).checkInitialized(); + } + + public static ActivityMiningMoveToNextLayerResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningMoveToNextLayerResp(), input).checkInitialized(); + } + + public static ActivityMiningMoveToNextLayerResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningMoveToNextLayerResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningMoveToNextLayerResp messages + */ + public static MessageFactory getFactory() { + return ActivityMiningMoveToNextLayerRespFactory.INSTANCE; + } + + private enum ActivityMiningMoveToNextLayerRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningMoveToNextLayerResp create() { + return ActivityMiningMoveToNextLayerResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName layer = FieldName.forField("Layer"); + + static final FieldName miningChangeInfo = FieldName.forField("MiningChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityMiningQuestRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityMiningQuestRewardReceive.java new file mode 100644 index 0000000..92c00a3 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityMiningQuestRewardReceive.java @@ -0,0 +1,978 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ActivityMiningQuestRewardReceive { + /** + * Protobuf type {@code ActivityMiningQuestRewardReceiveReq} + */ + public static final class ActivityMiningQuestRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 QuestId = 2; + */ + private int questId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningQuestRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code ActivityMiningQuestRewardReceiveReq} + */ + public static ActivityMiningQuestRewardReceiveReq newInstance() { + return new ActivityMiningQuestRewardReceiveReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityMiningQuestRewardReceiveReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityMiningQuestRewardReceiveReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 QuestId = 2; + * @return this + */ + public ActivityMiningQuestRewardReceiveReq clearQuestId() { + bitField0_ &= ~0x00000002; + questId = 0; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return the questId + */ + public int getQuestId() { + return questId; + } + + /** + * optional uint32 QuestId = 2; + * @param value the questId to set + * @return this + */ + public ActivityMiningQuestRewardReceiveReq setQuestId(final int value) { + bitField0_ |= 0x00000002; + questId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningQuestRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningQuestRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningQuestRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningQuestRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveReq copyFrom( + final ActivityMiningQuestRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + questId = other.questId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveReq mergeFrom( + final ActivityMiningQuestRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasQuestId()) { + setQuestId(other.questId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + questId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningQuestRewardReceiveReq)) { + return false; + } + ActivityMiningQuestRewardReceiveReq other = (ActivityMiningQuestRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasQuestId() || questId == other.questId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningQuestRewardReceiveReq mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // questId + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningQuestRewardReceiveReq mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1975187075: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveReq clone() { + return new ActivityMiningQuestRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningQuestRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningQuestRewardReceiveReq(), data).checkInitialized(); + } + + public static ActivityMiningQuestRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningQuestRewardReceiveReq(), input).checkInitialized(); + } + + public static ActivityMiningQuestRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningQuestRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningQuestRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return ActivityMiningQuestRewardReceiveReqFactory.INSTANCE; + } + + private enum ActivityMiningQuestRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningQuestRewardReceiveReq create() { + return ActivityMiningQuestRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName questId = FieldName.forField("QuestId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityMiningQuestRewardReceiveResp} + */ + public static final class ActivityMiningQuestRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo ChangeInfo = 2; + */ + private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl QuestRewards = 1; + */ + private final RepeatedMessage questRewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private ActivityMiningQuestRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code ActivityMiningQuestRewardReceiveResp} + */ + public static ActivityMiningQuestRewardReceiveResp newInstance() { + return new ActivityMiningQuestRewardReceiveResp(); + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @return whether the changeInfo field is set + */ + public boolean hasChangeInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @return this + */ + public ActivityMiningQuestRewardReceiveResp clearChangeInfo() { + bitField0_ &= ~0x00000001; + changeInfo.clear(); + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChangeInfo() { + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChangeInfo() { + bitField0_ |= 0x00000001; + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @param value the changeInfo to set + * @return this + */ + public ActivityMiningQuestRewardReceiveResp setChangeInfo(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + changeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningQuestRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningQuestRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningQuestRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningQuestRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl QuestRewards = 1; + * @return whether the questRewards field is set + */ + public boolean hasQuestRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl QuestRewards = 1; + * @return this + */ + public ActivityMiningQuestRewardReceiveResp clearQuestRewards() { + bitField0_ &= ~0x00000004; + questRewards.clear(); + return this; + } + + /** + * repeated .ItemTpl QuestRewards = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuestRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getQuestRewards() { + return questRewards; + } + + /** + * repeated .ItemTpl QuestRewards = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableQuestRewards() { + bitField0_ |= 0x00000004; + return questRewards; + } + + /** + * repeated .ItemTpl QuestRewards = 1; + * @param value the questRewards to add + * @return this + */ + public ActivityMiningQuestRewardReceiveResp addQuestRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + questRewards.add(value); + return this; + } + + /** + * repeated .ItemTpl QuestRewards = 1; + * @param values the questRewards to add + * @return this + */ + public ActivityMiningQuestRewardReceiveResp addAllQuestRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + questRewards.addAll(values); + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveResp copyFrom( + final ActivityMiningQuestRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + changeInfo.copyFrom(other.changeInfo); + nextPackage.copyFrom(other.nextPackage); + questRewards.copyFrom(other.questRewards); + } + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveResp mergeFrom( + final ActivityMiningQuestRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChangeInfo()) { + getMutableChangeInfo().mergeFrom(other.changeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasQuestRewards()) { + getMutableQuestRewards().addAll(other.questRewards); + } + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clear(); + nextPackage.clear(); + questRewards.clear(); + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clearQuick(); + nextPackage.clear(); + questRewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningQuestRewardReceiveResp)) { + return false; + } + ActivityMiningQuestRewardReceiveResp other = (ActivityMiningQuestRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasQuestRewards() || questRewards.equals(other.questRewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < questRewards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(questRewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * questRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(questRewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningQuestRewardReceiveResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // changeInfo + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // questRewards + tag = input.readRepeatedMessage(questRewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.changeInfo, changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.questRewards, questRewards); + } + output.endObject(); + } + + @Override + public ActivityMiningQuestRewardReceiveResp mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -138776418: { + if (input.isAtField(FieldNames.changeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 776865794: { + if (input.isAtField(FieldNames.questRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(questRewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningQuestRewardReceiveResp clone() { + return new ActivityMiningQuestRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningQuestRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningQuestRewardReceiveResp(), data).checkInitialized(); + } + + public static ActivityMiningQuestRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningQuestRewardReceiveResp(), input).checkInitialized(); + } + + public static ActivityMiningQuestRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningQuestRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningQuestRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return ActivityMiningQuestRewardReceiveRespFactory.INSTANCE; + } + + private enum ActivityMiningQuestRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningQuestRewardReceiveResp create() { + return ActivityMiningQuestRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName changeInfo = FieldName.forField("ChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName questRewards = FieldName.forField("QuestRewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityMiningStoryRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityMiningStoryRewardReceive.java new file mode 100644 index 0000000..42a55b0 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityMiningStoryRewardReceive.java @@ -0,0 +1,469 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityMiningStoryRewardReceive { + /** + * Protobuf type {@code ActivityMiningStoryRewardReceiveReq} + */ + public static final class ActivityMiningStoryRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 StoryId = 2; + */ + private int storyId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningStoryRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code ActivityMiningStoryRewardReceiveReq} + */ + public static ActivityMiningStoryRewardReceiveReq newInstance() { + return new ActivityMiningStoryRewardReceiveReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityMiningStoryRewardReceiveReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityMiningStoryRewardReceiveReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 StoryId = 2; + * @return whether the storyId field is set + */ + public boolean hasStoryId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 StoryId = 2; + * @return this + */ + public ActivityMiningStoryRewardReceiveReq clearStoryId() { + bitField0_ &= ~0x00000002; + storyId = 0; + return this; + } + + /** + * optional uint32 StoryId = 2; + * @return the storyId + */ + public int getStoryId() { + return storyId; + } + + /** + * optional uint32 StoryId = 2; + * @param value the storyId to set + * @return this + */ + public ActivityMiningStoryRewardReceiveReq setStoryId(final int value) { + bitField0_ |= 0x00000002; + storyId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningStoryRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningStoryRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningStoryRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningStoryRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningStoryRewardReceiveReq copyFrom( + final ActivityMiningStoryRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + storyId = other.storyId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningStoryRewardReceiveReq mergeFrom( + final ActivityMiningStoryRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasStoryId()) { + setStoryId(other.storyId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningStoryRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + storyId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningStoryRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningStoryRewardReceiveReq)) { + return false; + } + ActivityMiningStoryRewardReceiveReq other = (ActivityMiningStoryRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasStoryId() || storyId == other.storyId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(storyId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(storyId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningStoryRewardReceiveReq mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // storyId + storyId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.storyId, storyId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningStoryRewardReceiveReq mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -219598640: { + if (input.isAtField(FieldNames.storyId)) { + if (!input.trySkipNullValue()) { + storyId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningStoryRewardReceiveReq clone() { + return new ActivityMiningStoryRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningStoryRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningStoryRewardReceiveReq(), data).checkInitialized(); + } + + public static ActivityMiningStoryRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningStoryRewardReceiveReq(), input).checkInitialized(); + } + + public static ActivityMiningStoryRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningStoryRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningStoryRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return ActivityMiningStoryRewardReceiveReqFactory.INSTANCE; + } + + private enum ActivityMiningStoryRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningStoryRewardReceiveReq create() { + return ActivityMiningStoryRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName storyId = FieldName.forField("StoryId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityPeriodicFinalRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityPeriodicFinalRewardReceive.java new file mode 100644 index 0000000..4df40af --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityPeriodicFinalRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class ActivityPeriodicFinalRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/ActivityPeriodicRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityPeriodicRewardReceive.java new file mode 100644 index 0000000..0a4c31c --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityPeriodicRewardReceive.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityPeriodicRewardReceive { + /** + * Protobuf type {@code ActivityPeriodicRewardReq} + */ + public static final class ActivityPeriodicRewardReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 QuestId = 2; + */ + private int questId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityPeriodicRewardReq() { + } + + /** + * @return a new empty instance of {@code ActivityPeriodicRewardReq} + */ + public static ActivityPeriodicRewardReq newInstance() { + return new ActivityPeriodicRewardReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityPeriodicRewardReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityPeriodicRewardReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 QuestId = 2; + * @return this + */ + public ActivityPeriodicRewardReq clearQuestId() { + bitField0_ &= ~0x00000002; + questId = 0; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return the questId + */ + public int getQuestId() { + return questId; + } + + /** + * optional uint32 QuestId = 2; + * @param value the questId to set + * @return this + */ + public ActivityPeriodicRewardReq setQuestId(final int value) { + bitField0_ |= 0x00000002; + questId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityPeriodicRewardReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityPeriodicRewardReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityPeriodicRewardReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityPeriodicRewardReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityPeriodicRewardReq copyFrom(final ActivityPeriodicRewardReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + questId = other.questId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityPeriodicRewardReq mergeFrom(final ActivityPeriodicRewardReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasQuestId()) { + setQuestId(other.questId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityPeriodicRewardReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + questId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityPeriodicRewardReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityPeriodicRewardReq)) { + return false; + } + ActivityPeriodicRewardReq other = (ActivityPeriodicRewardReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasQuestId() || questId == other.questId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityPeriodicRewardReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // questId + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityPeriodicRewardReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1975187075: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityPeriodicRewardReq clone() { + return new ActivityPeriodicRewardReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityPeriodicRewardReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityPeriodicRewardReq(), data).checkInitialized(); + } + + public static ActivityPeriodicRewardReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityPeriodicRewardReq(), input).checkInitialized(); + } + + public static ActivityPeriodicRewardReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityPeriodicRewardReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityPeriodicRewardReq messages + */ + public static MessageFactory getFactory() { + return ActivityPeriodicRewardReqFactory.INSTANCE; + } + + private enum ActivityPeriodicRewardReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityPeriodicRewardReq create() { + return ActivityPeriodicRewardReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName questId = FieldName.forField("QuestId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityShopPurchase.java b/src/generated/main/emu/nebula/proto/ActivityShopPurchase.java new file mode 100644 index 0000000..850b054 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityShopPurchase.java @@ -0,0 +1,1353 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityShopPurchase { + /** + * Protobuf type {@code ActivityShopPurchaseReq} + */ + public static final class ActivityShopPurchaseReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 RefreshTime = 3; + */ + private long refreshTime; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 ShopId = 2; + */ + private int shopId; + + /** + * optional uint32 GoodsId = 4; + */ + private int goodsId; + + /** + * optional uint32 Number = 5; + */ + private int number; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityShopPurchaseReq() { + } + + /** + * @return a new empty instance of {@code ActivityShopPurchaseReq} + */ + public static ActivityShopPurchaseReq newInstance() { + return new ActivityShopPurchaseReq(); + } + + /** + * optional int64 RefreshTime = 3; + * @return whether the refreshTime field is set + */ + public boolean hasRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 RefreshTime = 3; + * @return this + */ + public ActivityShopPurchaseReq clearRefreshTime() { + bitField0_ &= ~0x00000001; + refreshTime = 0L; + return this; + } + + /** + * optional int64 RefreshTime = 3; + * @return the refreshTime + */ + public long getRefreshTime() { + return refreshTime; + } + + /** + * optional int64 RefreshTime = 3; + * @param value the refreshTime to set + * @return this + */ + public ActivityShopPurchaseReq setRefreshTime(final long value) { + bitField0_ |= 0x00000001; + refreshTime = value; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityShopPurchaseReq clearActivityId() { + bitField0_ &= ~0x00000002; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityShopPurchaseReq setActivityId(final int value) { + bitField0_ |= 0x00000002; + activityId = value; + return this; + } + + /** + * optional uint32 ShopId = 2; + * @return whether the shopId field is set + */ + public boolean hasShopId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 ShopId = 2; + * @return this + */ + public ActivityShopPurchaseReq clearShopId() { + bitField0_ &= ~0x00000004; + shopId = 0; + return this; + } + + /** + * optional uint32 ShopId = 2; + * @return the shopId + */ + public int getShopId() { + return shopId; + } + + /** + * optional uint32 ShopId = 2; + * @param value the shopId to set + * @return this + */ + public ActivityShopPurchaseReq setShopId(final int value) { + bitField0_ |= 0x00000004; + shopId = value; + return this; + } + + /** + * optional uint32 GoodsId = 4; + * @return whether the goodsId field is set + */ + public boolean hasGoodsId() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 GoodsId = 4; + * @return this + */ + public ActivityShopPurchaseReq clearGoodsId() { + bitField0_ &= ~0x00000008; + goodsId = 0; + return this; + } + + /** + * optional uint32 GoodsId = 4; + * @return the goodsId + */ + public int getGoodsId() { + return goodsId; + } + + /** + * optional uint32 GoodsId = 4; + * @param value the goodsId to set + * @return this + */ + public ActivityShopPurchaseReq setGoodsId(final int value) { + bitField0_ |= 0x00000008; + goodsId = value; + return this; + } + + /** + * optional uint32 Number = 5; + * @return whether the number field is set + */ + public boolean hasNumber() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 Number = 5; + * @return this + */ + public ActivityShopPurchaseReq clearNumber() { + bitField0_ &= ~0x00000010; + number = 0; + return this; + } + + /** + * optional uint32 Number = 5; + * @return the number + */ + public int getNumber() { + return number; + } + + /** + * optional uint32 Number = 5; + * @param value the number to set + * @return this + */ + public ActivityShopPurchaseReq setNumber(final int value) { + bitField0_ |= 0x00000010; + number = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityShopPurchaseReq clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityShopPurchaseReq addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityShopPurchaseReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityShopPurchaseReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityShopPurchaseReq copyFrom(final ActivityShopPurchaseReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + refreshTime = other.refreshTime; + activityId = other.activityId; + shopId = other.shopId; + goodsId = other.goodsId; + number = other.number; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityShopPurchaseReq mergeFrom(final ActivityShopPurchaseReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRefreshTime()) { + setRefreshTime(other.refreshTime); + } + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasShopId()) { + setShopId(other.shopId); + } + if (other.hasGoodsId()) { + setGoodsId(other.goodsId); + } + if (other.hasNumber()) { + setNumber(other.number); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityShopPurchaseReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + refreshTime = 0L; + activityId = 0; + shopId = 0; + goodsId = 0; + number = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityShopPurchaseReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityShopPurchaseReq)) { + return false; + } + ActivityShopPurchaseReq other = (ActivityShopPurchaseReq) o; + return bitField0_ == other.bitField0_ + && (!hasRefreshTime() || refreshTime == other.refreshTime) + && (!hasActivityId() || activityId == other.activityId) + && (!hasShopId() || shopId == other.shopId) + && (!hasGoodsId() || goodsId == other.goodsId) + && (!hasNumber() || number == other.number) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(shopId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(goodsId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(number); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(shopId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsId); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(number); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityShopPurchaseReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // refreshTime + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // shopId + shopId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // goodsId + goodsId = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // number + number = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.refreshTime, refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.shopId, shopId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.goodsId, goodsId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.number, number); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityShopPurchaseReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 280566824: { + if (input.isAtField(FieldNames.refreshTime)) { + if (!input.trySkipNullValue()) { + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1819284783: { + if (input.isAtField(FieldNames.shopId)) { + if (!input.trySkipNullValue()) { + shopId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1871690481: { + if (input.isAtField(FieldNames.goodsId)) { + if (!input.trySkipNullValue()) { + goodsId = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1950496919: { + if (input.isAtField(FieldNames.number)) { + if (!input.trySkipNullValue()) { + number = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityShopPurchaseReq clone() { + return new ActivityShopPurchaseReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityShopPurchaseReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityShopPurchaseReq(), data).checkInitialized(); + } + + public static ActivityShopPurchaseReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityShopPurchaseReq(), input).checkInitialized(); + } + + public static ActivityShopPurchaseReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityShopPurchaseReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityShopPurchaseReq messages + */ + public static MessageFactory getFactory() { + return ActivityShopPurchaseReqFactory.INSTANCE; + } + + private enum ActivityShopPurchaseReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityShopPurchaseReq create() { + return ActivityShopPurchaseReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName refreshTime = FieldName.forField("RefreshTime"); + + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName shopId = FieldName.forField("ShopId"); + + static final FieldName goodsId = FieldName.forField("GoodsId"); + + static final FieldName number = FieldName.forField("Number"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityShopPurchaseResp} + */ + public static final class ActivityShopPurchaseResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 PurchasedNumber = 3; + */ + private int purchasedNumber; + + /** + * optional bool IsRefresh = 1; + */ + private boolean isRefresh; + + /** + * optional .ResidentShop Shop = 2; + */ + private final Public.ResidentShop shop = Public.ResidentShop.newInstance(); + + /** + * optional .ChangeInfo Change = 4; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityShopPurchaseResp() { + } + + /** + * @return a new empty instance of {@code ActivityShopPurchaseResp} + */ + public static ActivityShopPurchaseResp newInstance() { + return new ActivityShopPurchaseResp(); + } + + /** + * optional uint32 PurchasedNumber = 3; + * @return whether the purchasedNumber field is set + */ + public boolean hasPurchasedNumber() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 PurchasedNumber = 3; + * @return this + */ + public ActivityShopPurchaseResp clearPurchasedNumber() { + bitField0_ &= ~0x00000001; + purchasedNumber = 0; + return this; + } + + /** + * optional uint32 PurchasedNumber = 3; + * @return the purchasedNumber + */ + public int getPurchasedNumber() { + return purchasedNumber; + } + + /** + * optional uint32 PurchasedNumber = 3; + * @param value the purchasedNumber to set + * @return this + */ + public ActivityShopPurchaseResp setPurchasedNumber(final int value) { + bitField0_ |= 0x00000001; + purchasedNumber = value; + return this; + } + + /** + * optional bool IsRefresh = 1; + * @return whether the isRefresh field is set + */ + public boolean hasIsRefresh() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bool IsRefresh = 1; + * @return this + */ + public ActivityShopPurchaseResp clearIsRefresh() { + bitField0_ &= ~0x00000002; + isRefresh = false; + return this; + } + + /** + * optional bool IsRefresh = 1; + * @return the isRefresh + */ + public boolean getIsRefresh() { + return isRefresh; + } + + /** + * optional bool IsRefresh = 1; + * @param value the isRefresh to set + * @return this + */ + public ActivityShopPurchaseResp setIsRefresh(final boolean value) { + bitField0_ |= 0x00000002; + isRefresh = value; + return this; + } + + /** + * optional .ResidentShop Shop = 2; + * @return whether the shop field is set + */ + public boolean hasShop() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .ResidentShop Shop = 2; + * @return this + */ + public ActivityShopPurchaseResp clearShop() { + bitField0_ &= ~0x00000004; + shop.clear(); + return this; + } + + /** + * optional .ResidentShop Shop = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShop()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ResidentShop getShop() { + return shop; + } + + /** + * optional .ResidentShop Shop = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ResidentShop getMutableShop() { + bitField0_ |= 0x00000004; + return shop; + } + + /** + * optional .ResidentShop Shop = 2; + * @param value the shop to set + * @return this + */ + public ActivityShopPurchaseResp setShop(final Public.ResidentShop value) { + bitField0_ |= 0x00000004; + shop.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo Change = 4; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .ChangeInfo Change = 4; + * @return this + */ + public ActivityShopPurchaseResp clearChange() { + bitField0_ &= ~0x00000008; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000008; + return change; + } + + /** + * optional .ChangeInfo Change = 4; + * @param value the change to set + * @return this + */ + public ActivityShopPurchaseResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000008; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityShopPurchaseResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityShopPurchaseResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityShopPurchaseResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityShopPurchaseResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityShopPurchaseResp copyFrom(final ActivityShopPurchaseResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + purchasedNumber = other.purchasedNumber; + isRefresh = other.isRefresh; + shop.copyFrom(other.shop); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityShopPurchaseResp mergeFrom(final ActivityShopPurchaseResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPurchasedNumber()) { + setPurchasedNumber(other.purchasedNumber); + } + if (other.hasIsRefresh()) { + setIsRefresh(other.isRefresh); + } + if (other.hasShop()) { + getMutableShop().mergeFrom(other.shop); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityShopPurchaseResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + purchasedNumber = 0; + isRefresh = false; + shop.clear(); + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityShopPurchaseResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + shop.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityShopPurchaseResp)) { + return false; + } + ActivityShopPurchaseResp other = (ActivityShopPurchaseResp) o; + return bitField0_ == other.bitField0_ + && (!hasPurchasedNumber() || purchasedNumber == other.purchasedNumber) + && (!hasIsRefresh() || isRefresh == other.isRefresh) + && (!hasShop() || shop.equals(other.shop)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(purchasedNumber); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(isRefresh); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(shop); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(purchasedNumber); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(shop); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityShopPurchaseResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // purchasedNumber + purchasedNumber = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // isRefresh + isRefresh = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // shop + input.readMessage(shop); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // change + input.readMessage(change); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.purchasedNumber, purchasedNumber); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.isRefresh, isRefresh); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.shop, shop); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityShopPurchaseResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1475882124: { + if (input.isAtField(FieldNames.purchasedNumber)) { + if (!input.trySkipNullValue()) { + purchasedNumber = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1785333199: { + if (input.isAtField(FieldNames.isRefresh)) { + if (!input.trySkipNullValue()) { + isRefresh = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576150: { + if (input.isAtField(FieldNames.shop)) { + if (!input.trySkipNullValue()) { + input.readMessage(shop); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityShopPurchaseResp clone() { + return new ActivityShopPurchaseResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityShopPurchaseResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityShopPurchaseResp(), data).checkInitialized(); + } + + public static ActivityShopPurchaseResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityShopPurchaseResp(), input).checkInitialized(); + } + + public static ActivityShopPurchaseResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityShopPurchaseResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityShopPurchaseResp messages + */ + public static MessageFactory getFactory() { + return ActivityShopPurchaseRespFactory.INSTANCE; + } + + private enum ActivityShopPurchaseRespFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityShopPurchaseResp create() { + return ActivityShopPurchaseResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName purchasedNumber = FieldName.forField("PurchasedNumber"); + + static final FieldName isRefresh = FieldName.forField("IsRefresh"); + + static final FieldName shop = FieldName.forField("Shop"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityTaskGroupRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityTaskGroupRewardReceive.java new file mode 100644 index 0000000..42d8ae0 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityTaskGroupRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class ActivityTaskGroupRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/ActivityTaskRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityTaskRewardReceive.java new file mode 100644 index 0000000..afbcaa7 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityTaskRewardReceive.java @@ -0,0 +1,545 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityTaskRewardReceive { + /** + * Protobuf type {@code ActivityTaskRewardReceiveReq} + */ + public static final class ActivityTaskRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 GroupId = 1; + */ + private int groupId; + + /** + * optional uint32 TabType = 2; + */ + private int tabType; + + /** + * optional uint32 QuestId = 3; + */ + private int questId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityTaskRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code ActivityTaskRewardReceiveReq} + */ + public static ActivityTaskRewardReceiveReq newInstance() { + return new ActivityTaskRewardReceiveReq(); + } + + /** + * optional uint32 GroupId = 1; + * @return whether the groupId field is set + */ + public boolean hasGroupId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 GroupId = 1; + * @return this + */ + public ActivityTaskRewardReceiveReq clearGroupId() { + bitField0_ &= ~0x00000001; + groupId = 0; + return this; + } + + /** + * optional uint32 GroupId = 1; + * @return the groupId + */ + public int getGroupId() { + return groupId; + } + + /** + * optional uint32 GroupId = 1; + * @param value the groupId to set + * @return this + */ + public ActivityTaskRewardReceiveReq setGroupId(final int value) { + bitField0_ |= 0x00000001; + groupId = value; + return this; + } + + /** + * optional uint32 TabType = 2; + * @return whether the tabType field is set + */ + public boolean hasTabType() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 TabType = 2; + * @return this + */ + public ActivityTaskRewardReceiveReq clearTabType() { + bitField0_ &= ~0x00000002; + tabType = 0; + return this; + } + + /** + * optional uint32 TabType = 2; + * @return the tabType + */ + public int getTabType() { + return tabType; + } + + /** + * optional uint32 TabType = 2; + * @param value the tabType to set + * @return this + */ + public ActivityTaskRewardReceiveReq setTabType(final int value) { + bitField0_ |= 0x00000002; + tabType = value; + return this; + } + + /** + * optional uint32 QuestId = 3; + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 QuestId = 3; + * @return this + */ + public ActivityTaskRewardReceiveReq clearQuestId() { + bitField0_ &= ~0x00000004; + questId = 0; + return this; + } + + /** + * optional uint32 QuestId = 3; + * @return the questId + */ + public int getQuestId() { + return questId; + } + + /** + * optional uint32 QuestId = 3; + * @param value the questId to set + * @return this + */ + public ActivityTaskRewardReceiveReq setQuestId(final int value) { + bitField0_ |= 0x00000004; + questId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityTaskRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityTaskRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityTaskRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityTaskRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityTaskRewardReceiveReq copyFrom(final ActivityTaskRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + groupId = other.groupId; + tabType = other.tabType; + questId = other.questId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTaskRewardReceiveReq mergeFrom(final ActivityTaskRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGroupId()) { + setGroupId(other.groupId); + } + if (other.hasTabType()) { + setTabType(other.tabType); + } + if (other.hasQuestId()) { + setQuestId(other.questId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTaskRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + groupId = 0; + tabType = 0; + questId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityTaskRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTaskRewardReceiveReq)) { + return false; + } + ActivityTaskRewardReceiveReq other = (ActivityTaskRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasGroupId() || groupId == other.groupId) + && (!hasTabType() || tabType == other.tabType) + && (!hasQuestId() || questId == other.questId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(tabType); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(questId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tabType); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTaskRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // groupId + groupId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // tabType + tabType = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // questId + questId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.groupId, groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tabType, tabType); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityTaskRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1958081498: { + if (input.isAtField(FieldNames.groupId)) { + if (!input.trySkipNullValue()) { + groupId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 111052879: { + if (input.isAtField(FieldNames.tabType)) { + if (!input.trySkipNullValue()) { + tabType = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1975187075: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + questId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTaskRewardReceiveReq clone() { + return new ActivityTaskRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTaskRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTaskRewardReceiveReq(), data).checkInitialized(); + } + + public static ActivityTaskRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTaskRewardReceiveReq(), input).checkInitialized(); + } + + public static ActivityTaskRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTaskRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTaskRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return ActivityTaskRewardReceiveReqFactory.INSTANCE; + } + + private enum ActivityTaskRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityTaskRewardReceiveReq create() { + return ActivityTaskRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName groupId = FieldName.forField("GroupId"); + + static final FieldName tabType = FieldName.forField("TabType"); + + static final FieldName questId = FieldName.forField("QuestId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityTowerDefenseLevelApply.java b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseLevelApply.java new file mode 100644 index 0000000..c0a70ec --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseLevelApply.java @@ -0,0 +1,588 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class ActivityTowerDefenseLevelApply { + /** + * Protobuf type {@code ActivityTowerDefenseLevelApplyReq} + */ + public static final class ActivityTowerDefenseLevelApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Level = 1; + */ + private int level; + + /** + * optional uint32 ItemId = 3; + */ + private int itemId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Characters = 2; + */ + private final RepeatedInt characters = RepeatedInt.newEmptyInstance(); + + private ActivityTowerDefenseLevelApplyReq() { + } + + /** + * @return a new empty instance of {@code ActivityTowerDefenseLevelApplyReq} + */ + public static ActivityTowerDefenseLevelApplyReq newInstance() { + return new ActivityTowerDefenseLevelApplyReq(); + } + + /** + * optional uint32 Level = 1; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Level = 1; + * @return this + */ + public ActivityTowerDefenseLevelApplyReq clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * optional uint32 Level = 1; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 1; + * @param value the level to set + * @return this + */ + public ActivityTowerDefenseLevelApplyReq setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * optional uint32 ItemId = 3; + * @return whether the itemId field is set + */ + public boolean hasItemId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 ItemId = 3; + * @return this + */ + public ActivityTowerDefenseLevelApplyReq clearItemId() { + bitField0_ &= ~0x00000002; + itemId = 0; + return this; + } + + /** + * optional uint32 ItemId = 3; + * @return the itemId + */ + public int getItemId() { + return itemId; + } + + /** + * optional uint32 ItemId = 3; + * @param value the itemId to set + * @return this + */ + public ActivityTowerDefenseLevelApplyReq setItemId(final int value) { + bitField0_ |= 0x00000002; + itemId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityTowerDefenseLevelApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityTowerDefenseLevelApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityTowerDefenseLevelApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityTowerDefenseLevelApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Characters = 2; + * @return whether the characters field is set + */ + public boolean hasCharacters() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated uint32 Characters = 2; + * @return this + */ + public ActivityTowerDefenseLevelApplyReq clearCharacters() { + bitField0_ &= ~0x00000008; + characters.clear(); + return this; + } + + /** + * repeated uint32 Characters = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharacters()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharacters() { + return characters; + } + + /** + * repeated uint32 Characters = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharacters() { + bitField0_ |= 0x00000008; + return characters; + } + + /** + * repeated uint32 Characters = 2; + * @param value the characters to add + * @return this + */ + public ActivityTowerDefenseLevelApplyReq addCharacters(final int value) { + bitField0_ |= 0x00000008; + characters.add(value); + return this; + } + + /** + * repeated uint32 Characters = 2; + * @param values the characters to add + * @return this + */ + public ActivityTowerDefenseLevelApplyReq addAllCharacters(final int... values) { + bitField0_ |= 0x00000008; + characters.addAll(values); + return this; + } + + @Override + public ActivityTowerDefenseLevelApplyReq copyFrom( + final ActivityTowerDefenseLevelApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + itemId = other.itemId; + nextPackage.copyFrom(other.nextPackage); + characters.copyFrom(other.characters); + } + return this; + } + + @Override + public ActivityTowerDefenseLevelApplyReq mergeFrom( + final ActivityTowerDefenseLevelApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasItemId()) { + setItemId(other.itemId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharacters()) { + getMutableCharacters().addAll(other.characters); + } + return this; + } + + @Override + public ActivityTowerDefenseLevelApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + itemId = 0; + nextPackage.clear(); + characters.clear(); + return this; + } + + @Override + public ActivityTowerDefenseLevelApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + characters.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTowerDefenseLevelApplyReq)) { + return false; + } + ActivityTowerDefenseLevelApplyReq other = (ActivityTowerDefenseLevelApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasItemId() || itemId == other.itemId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharacters() || characters.equals(other.characters)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(itemId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < characters.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(characters.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(itemId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * characters.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(characters); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTowerDefenseLevelApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // itemId + itemId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // characters [packed=true] + input.readPackedUInt32(characters, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // characters [packed=false] + tag = input.readRepeatedUInt32(characters, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.itemId, itemId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.characters, characters); + } + output.endObject(); + } + + @Override + public ActivityTowerDefenseLevelApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2094794834: { + if (input.isAtField(FieldNames.itemId)) { + if (!input.trySkipNullValue()) { + itemId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1056078198: { + if (input.isAtField(FieldNames.characters)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(characters); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTowerDefenseLevelApplyReq clone() { + return new ActivityTowerDefenseLevelApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTowerDefenseLevelApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevelApplyReq(), data).checkInitialized(); + } + + public static ActivityTowerDefenseLevelApplyReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevelApplyReq(), input).checkInitialized(); + } + + public static ActivityTowerDefenseLevelApplyReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevelApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTowerDefenseLevelApplyReq messages + */ + public static MessageFactory getFactory() { + return ActivityTowerDefenseLevelApplyReqFactory.INSTANCE; + } + + private enum ActivityTowerDefenseLevelApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityTowerDefenseLevelApplyReq create() { + return ActivityTowerDefenseLevelApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName itemId = FieldName.forField("ItemId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName characters = FieldName.forField("Characters"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityTowerDefenseLevelSettle.java b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseLevelSettle.java new file mode 100644 index 0000000..5828c34 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseLevelSettle.java @@ -0,0 +1,468 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityTowerDefenseLevelSettle { + /** + * Protobuf type {@code ActivityTowerDefenseLevelSettleReq} + */ + public static final class ActivityTowerDefenseLevelSettleReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 LevelId = 1; + */ + private int levelId; + + /** + * optional uint32 Star = 2; + */ + private int star; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityTowerDefenseLevelSettleReq() { + } + + /** + * @return a new empty instance of {@code ActivityTowerDefenseLevelSettleReq} + */ + public static ActivityTowerDefenseLevelSettleReq newInstance() { + return new ActivityTowerDefenseLevelSettleReq(); + } + + /** + * optional uint32 LevelId = 1; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 LevelId = 1; + * @return this + */ + public ActivityTowerDefenseLevelSettleReq clearLevelId() { + bitField0_ &= ~0x00000001; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 1; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 1; + * @param value the levelId to set + * @return this + */ + public ActivityTowerDefenseLevelSettleReq setLevelId(final int value) { + bitField0_ |= 0x00000001; + levelId = value; + return this; + } + + /** + * optional uint32 Star = 2; + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Star = 2; + * @return this + */ + public ActivityTowerDefenseLevelSettleReq clearStar() { + bitField0_ &= ~0x00000002; + star = 0; + return this; + } + + /** + * optional uint32 Star = 2; + * @return the star + */ + public int getStar() { + return star; + } + + /** + * optional uint32 Star = 2; + * @param value the star to set + * @return this + */ + public ActivityTowerDefenseLevelSettleReq setStar(final int value) { + bitField0_ |= 0x00000002; + star = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityTowerDefenseLevelSettleReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityTowerDefenseLevelSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityTowerDefenseLevelSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityTowerDefenseLevelSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityTowerDefenseLevelSettleReq copyFrom( + final ActivityTowerDefenseLevelSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + levelId = other.levelId; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTowerDefenseLevelSettleReq mergeFrom( + final ActivityTowerDefenseLevelSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTowerDefenseLevelSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + levelId = 0; + star = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityTowerDefenseLevelSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTowerDefenseLevelSettleReq)) { + return false; + } + ActivityTowerDefenseLevelSettleReq other = (ActivityTowerDefenseLevelSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasLevelId() || levelId == other.levelId) + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTowerDefenseLevelSettleReq mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityTowerDefenseLevelSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTowerDefenseLevelSettleReq clone() { + return new ActivityTowerDefenseLevelSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTowerDefenseLevelSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevelSettleReq(), data).checkInitialized(); + } + + public static ActivityTowerDefenseLevelSettleReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevelSettleReq(), input).checkInitialized(); + } + + public static ActivityTowerDefenseLevelSettleReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevelSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTowerDefenseLevelSettleReq messages + */ + public static MessageFactory getFactory() { + return ActivityTowerDefenseLevelSettleReqFactory.INSTANCE; + } + + private enum ActivityTowerDefenseLevelSettleReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityTowerDefenseLevelSettleReq create() { + return ActivityTowerDefenseLevelSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityTowerDefenseQuestRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseQuestRewardReceive.java new file mode 100644 index 0000000..e33ce61 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseQuestRewardReceive.java @@ -0,0 +1,549 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityTowerDefenseQuestRewardReceive { + /** + * Protobuf type {@code ActivityTowerDefenseQuestReceiveReq} + */ + public static final class ActivityTowerDefenseQuestReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 QuestId = 2; + */ + private int questId; + + /** + * optional uint32 GroupId = 3; + */ + private int groupId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityTowerDefenseQuestReceiveReq() { + } + + /** + * @return a new empty instance of {@code ActivityTowerDefenseQuestReceiveReq} + */ + public static ActivityTowerDefenseQuestReceiveReq newInstance() { + return new ActivityTowerDefenseQuestReceiveReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 QuestId = 2; + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq clearQuestId() { + bitField0_ &= ~0x00000002; + questId = 0; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return the questId + */ + public int getQuestId() { + return questId; + } + + /** + * optional uint32 QuestId = 2; + * @param value the questId to set + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq setQuestId(final int value) { + bitField0_ |= 0x00000002; + questId = value; + return this; + } + + /** + * optional uint32 GroupId = 3; + * @return whether the groupId field is set + */ + public boolean hasGroupId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 GroupId = 3; + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq clearGroupId() { + bitField0_ &= ~0x00000004; + groupId = 0; + return this; + } + + /** + * optional uint32 GroupId = 3; + * @return the groupId + */ + public int getGroupId() { + return groupId; + } + + /** + * optional uint32 GroupId = 3; + * @param value the groupId to set + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq setGroupId(final int value) { + bitField0_ |= 0x00000004; + groupId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityTowerDefenseQuestReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityTowerDefenseQuestReceiveReq copyFrom( + final ActivityTowerDefenseQuestReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + questId = other.questId; + groupId = other.groupId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTowerDefenseQuestReceiveReq mergeFrom( + final ActivityTowerDefenseQuestReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasQuestId()) { + setQuestId(other.questId); + } + if (other.hasGroupId()) { + setGroupId(other.groupId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTowerDefenseQuestReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + questId = 0; + groupId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityTowerDefenseQuestReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTowerDefenseQuestReceiveReq)) { + return false; + } + ActivityTowerDefenseQuestReceiveReq other = (ActivityTowerDefenseQuestReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasQuestId() || questId == other.questId) + && (!hasGroupId() || groupId == other.groupId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(groupId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTowerDefenseQuestReceiveReq mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // questId + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // groupId + groupId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.groupId, groupId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityTowerDefenseQuestReceiveReq mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1975187075: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1958081498: { + if (input.isAtField(FieldNames.groupId)) { + if (!input.trySkipNullValue()) { + groupId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTowerDefenseQuestReceiveReq clone() { + return new ActivityTowerDefenseQuestReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTowerDefenseQuestReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseQuestReceiveReq(), data).checkInitialized(); + } + + public static ActivityTowerDefenseQuestReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseQuestReceiveReq(), input).checkInitialized(); + } + + public static ActivityTowerDefenseQuestReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseQuestReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTowerDefenseQuestReceiveReq messages + */ + public static MessageFactory getFactory() { + return ActivityTowerDefenseQuestReceiveReqFactory.INSTANCE; + } + + private enum ActivityTowerDefenseQuestReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityTowerDefenseQuestReceiveReq create() { + return ActivityTowerDefenseQuestReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName questId = FieldName.forField("QuestId"); + + static final FieldName groupId = FieldName.forField("GroupId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ActivityTowerDefenseStoryRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseStoryRewardReceive.java new file mode 100644 index 0000000..18ca7de --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityTowerDefenseStoryRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class ActivityTowerDefenseStoryRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/ActivityTrialRewardReceive.java b/src/generated/main/emu/nebula/proto/ActivityTrialRewardReceive.java new file mode 100644 index 0000000..e6d14de --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ActivityTrialRewardReceive.java @@ -0,0 +1,465 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ActivityTrialRewardReceive { + /** + * Protobuf type {@code ActivityTrialRewardReceiveReq} + */ + public static final class ActivityTrialRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ActivityId = 1; + */ + private int activityId; + + /** + * optional uint32 GroupId = 2; + */ + private int groupId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityTrialRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code ActivityTrialRewardReceiveReq} + */ + public static ActivityTrialRewardReceiveReq newInstance() { + return new ActivityTrialRewardReceiveReq(); + } + + /** + * optional uint32 ActivityId = 1; + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ActivityId = 1; + * @return this + */ + public ActivityTrialRewardReceiveReq clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * optional uint32 ActivityId = 1; + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * optional uint32 ActivityId = 1; + * @param value the activityId to set + * @return this + */ + public ActivityTrialRewardReceiveReq setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * optional uint32 GroupId = 2; + * @return whether the groupId field is set + */ + public boolean hasGroupId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 GroupId = 2; + * @return this + */ + public ActivityTrialRewardReceiveReq clearGroupId() { + bitField0_ &= ~0x00000002; + groupId = 0; + return this; + } + + /** + * optional uint32 GroupId = 2; + * @return the groupId + */ + public int getGroupId() { + return groupId; + } + + /** + * optional uint32 GroupId = 2; + * @param value the groupId to set + * @return this + */ + public ActivityTrialRewardReceiveReq setGroupId(final int value) { + bitField0_ |= 0x00000002; + groupId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityTrialRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityTrialRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityTrialRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityTrialRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityTrialRewardReceiveReq copyFrom(final ActivityTrialRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + groupId = other.groupId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTrialRewardReceiveReq mergeFrom(final ActivityTrialRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasGroupId()) { + setGroupId(other.groupId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTrialRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + groupId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityTrialRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTrialRewardReceiveReq)) { + return false; + } + ActivityTrialRewardReceiveReq other = (ActivityTrialRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasGroupId() || groupId == other.groupId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTrialRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // groupId + groupId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.groupId, groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityTrialRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1958081498: { + if (input.isAtField(FieldNames.groupId)) { + if (!input.trySkipNullValue()) { + groupId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTrialRewardReceiveReq clone() { + return new ActivityTrialRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTrialRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTrialRewardReceiveReq(), data).checkInitialized(); + } + + public static ActivityTrialRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTrialRewardReceiveReq(), input).checkInitialized(); + } + + public static ActivityTrialRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityTrialRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTrialRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return ActivityTrialRewardReceiveReqFactory.INSTANCE; + } + + private enum ActivityTrialRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityTrialRewardReceiveReq create() { + return ActivityTrialRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName groupId = FieldName.forField("GroupId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/AgentApply.java b/src/generated/main/emu/nebula/proto/AgentApply.java new file mode 100644 index 0000000..0d799e5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/AgentApply.java @@ -0,0 +1,1913 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class AgentApply { + /** + * Protobuf type {@code AgentApplyReq} + */ + public static final class AgentApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .AgentApplyInfo Apply = 1; + */ + private final RepeatedMessage apply = RepeatedMessage.newEmptyInstance(AgentApplyInfo.getFactory()); + + private AgentApplyReq() { + } + + /** + * @return a new empty instance of {@code AgentApplyReq} + */ + public static AgentApplyReq newInstance() { + return new AgentApplyReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentApplyReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .AgentApplyInfo Apply = 1; + * @return whether the apply field is set + */ + public boolean hasApply() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .AgentApplyInfo Apply = 1; + * @return this + */ + public AgentApplyReq clearApply() { + bitField0_ &= ~0x00000002; + apply.clear(); + return this; + } + + /** + * repeated .AgentApplyInfo Apply = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableApply()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getApply() { + return apply; + } + + /** + * repeated .AgentApplyInfo Apply = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableApply() { + bitField0_ |= 0x00000002; + return apply; + } + + /** + * repeated .AgentApplyInfo Apply = 1; + * @param value the apply to add + * @return this + */ + public AgentApplyReq addApply(final AgentApplyInfo value) { + bitField0_ |= 0x00000002; + apply.add(value); + return this; + } + + /** + * repeated .AgentApplyInfo Apply = 1; + * @param values the apply to add + * @return this + */ + public AgentApplyReq addAllApply(final AgentApplyInfo... values) { + bitField0_ |= 0x00000002; + apply.addAll(values); + return this; + } + + @Override + public AgentApplyReq copyFrom(final AgentApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + apply.copyFrom(other.apply); + } + return this; + } + + @Override + public AgentApplyReq mergeFrom(final AgentApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasApply()) { + getMutableApply().addAll(other.apply); + } + return this; + } + + @Override + public AgentApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + apply.clear(); + return this; + } + + @Override + public AgentApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + apply.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentApplyReq)) { + return false; + } + AgentApplyReq other = (AgentApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasApply() || apply.equals(other.apply)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < apply.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(apply.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * apply.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(apply); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // apply + tag = input.readRepeatedMessage(apply, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.apply, apply); + } + output.endObject(); + } + + @Override + public AgentApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 63476558: { + if (input.isAtField(FieldNames.apply)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(apply); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentApplyReq clone() { + return new AgentApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentApplyReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentApplyReq(), data).checkInitialized(); + } + + public static AgentApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentApplyReq(), input).checkInitialized(); + } + + public static AgentApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentApplyReq messages + */ + public static MessageFactory getFactory() { + return AgentApplyReqFactory.INSTANCE; + } + + private enum AgentApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentApplyReq create() { + return AgentApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName apply = FieldName.forField("Apply"); + } + } + + /** + * Protobuf type {@code AgentApplyInfo} + */ + public static final class AgentApplyInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 4; + */ + private long buildId; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 ProcessTime = 2; + */ + private int processTime; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 CharIds = 3; + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + private AgentApplyInfo() { + } + + /** + * @return a new empty instance of {@code AgentApplyInfo} + */ + public static AgentApplyInfo newInstance() { + return new AgentApplyInfo(); + } + + /** + * optional uint64 BuildId = 4; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 4; + * @return this + */ + public AgentApplyInfo clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 4; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 4; + * @param value the buildId to set + * @return this + */ + public AgentApplyInfo setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public AgentApplyInfo clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public AgentApplyInfo setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 ProcessTime = 2; + * @return whether the processTime field is set + */ + public boolean hasProcessTime() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 ProcessTime = 2; + * @return this + */ + public AgentApplyInfo clearProcessTime() { + bitField0_ &= ~0x00000004; + processTime = 0; + return this; + } + + /** + * optional uint32 ProcessTime = 2; + * @return the processTime + */ + public int getProcessTime() { + return processTime; + } + + /** + * optional uint32 ProcessTime = 2; + * @param value the processTime to set + * @return this + */ + public AgentApplyInfo setProcessTime(final int value) { + bitField0_ |= 0x00000004; + processTime = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentApplyInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentApplyInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentApplyInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentApplyInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 CharIds = 3; + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated uint32 CharIds = 3; + * @return this + */ + public AgentApplyInfo clearCharIds() { + bitField0_ &= ~0x00000010; + charIds.clear(); + return this; + } + + /** + * repeated uint32 CharIds = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * repeated uint32 CharIds = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000010; + return charIds; + } + + /** + * repeated uint32 CharIds = 3; + * @param value the charIds to add + * @return this + */ + public AgentApplyInfo addCharIds(final int value) { + bitField0_ |= 0x00000010; + charIds.add(value); + return this; + } + + /** + * repeated uint32 CharIds = 3; + * @param values the charIds to add + * @return this + */ + public AgentApplyInfo addAllCharIds(final int... values) { + bitField0_ |= 0x00000010; + charIds.addAll(values); + return this; + } + + @Override + public AgentApplyInfo copyFrom(final AgentApplyInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + processTime = other.processTime; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + } + return this; + } + + @Override + public AgentApplyInfo mergeFrom(final AgentApplyInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasProcessTime()) { + setProcessTime(other.processTime); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + return this; + } + + @Override + public AgentApplyInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + processTime = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public AgentApplyInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentApplyInfo)) { + return false; + } + AgentApplyInfo other = (AgentApplyInfo) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasProcessTime() || processTime == other.processTime) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(processTime); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(processTime); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentApplyInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // processTime + processTime = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.processTime, processTime); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + output.endObject(); + } + + @Override + public AgentApplyInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1870380476: { + if (input.isAtField(FieldNames.processTime)) { + if (!input.trySkipNullValue()) { + processTime = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentApplyInfo clone() { + return new AgentApplyInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentApplyInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentApplyInfo(), data).checkInitialized(); + } + + public static AgentApplyInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentApplyInfo(), input).checkInitialized(); + } + + public static AgentApplyInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentApplyInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentApplyInfo messages + */ + public static MessageFactory getFactory() { + return AgentApplyInfoFactory.INSTANCE; + } + + private enum AgentApplyInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentApplyInfo create() { + return AgentApplyInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName processTime = FieldName.forField("ProcessTime"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + } + } + + /** + * Protobuf type {@code AgentApplyResp} + */ + public static final class AgentApplyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .AgentRespInfo Infos = 1; + */ + private final RepeatedMessage infos = RepeatedMessage.newEmptyInstance(AgentRespInfo.getFactory()); + + private AgentApplyResp() { + } + + /** + * @return a new empty instance of {@code AgentApplyResp} + */ + public static AgentApplyResp newInstance() { + return new AgentApplyResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentApplyResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentApplyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentApplyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentApplyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .AgentRespInfo Infos = 1; + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .AgentRespInfo Infos = 1; + * @return this + */ + public AgentApplyResp clearInfos() { + bitField0_ &= ~0x00000002; + infos.clear(); + return this; + } + + /** + * repeated .AgentRespInfo Infos = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInfos() { + return infos; + } + + /** + * repeated .AgentRespInfo Infos = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInfos() { + bitField0_ |= 0x00000002; + return infos; + } + + /** + * repeated .AgentRespInfo Infos = 1; + * @param value the infos to add + * @return this + */ + public AgentApplyResp addInfos(final AgentRespInfo value) { + bitField0_ |= 0x00000002; + infos.add(value); + return this; + } + + /** + * repeated .AgentRespInfo Infos = 1; + * @param values the infos to add + * @return this + */ + public AgentApplyResp addAllInfos(final AgentRespInfo... values) { + bitField0_ |= 0x00000002; + infos.addAll(values); + return this; + } + + @Override + public AgentApplyResp copyFrom(final AgentApplyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public AgentApplyResp mergeFrom(final AgentApplyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public AgentApplyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clear(); + return this; + } + + @Override + public AgentApplyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentApplyResp)) { + return false; + } + AgentApplyResp other = (AgentApplyResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentApplyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public AgentApplyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentApplyResp clone() { + return new AgentApplyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentApplyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentApplyResp(), data).checkInitialized(); + } + + public static AgentApplyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentApplyResp(), input).checkInitialized(); + } + + public static AgentApplyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentApplyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentApplyResp messages + */ + public static MessageFactory getFactory() { + return AgentApplyRespFactory.INSTANCE; + } + + private enum AgentApplyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentApplyResp create() { + return AgentApplyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code AgentRespInfo} + */ + public static final class AgentRespInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 BeginTime = 2; + */ + private long beginTime; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private AgentRespInfo() { + } + + /** + * @return a new empty instance of {@code AgentRespInfo} + */ + public static AgentRespInfo newInstance() { + return new AgentRespInfo(); + } + + /** + * optional int64 BeginTime = 2; + * @return whether the beginTime field is set + */ + public boolean hasBeginTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 BeginTime = 2; + * @return this + */ + public AgentRespInfo clearBeginTime() { + bitField0_ &= ~0x00000001; + beginTime = 0L; + return this; + } + + /** + * optional int64 BeginTime = 2; + * @return the beginTime + */ + public long getBeginTime() { + return beginTime; + } + + /** + * optional int64 BeginTime = 2; + * @param value the beginTime to set + * @return this + */ + public AgentRespInfo setBeginTime(final long value) { + bitField0_ |= 0x00000001; + beginTime = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public AgentRespInfo clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public AgentRespInfo setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentRespInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentRespInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentRespInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentRespInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public AgentRespInfo copyFrom(final AgentRespInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + beginTime = other.beginTime; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AgentRespInfo mergeFrom(final AgentRespInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBeginTime()) { + setBeginTime(other.beginTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AgentRespInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + beginTime = 0L; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public AgentRespInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentRespInfo)) { + return false; + } + AgentRespInfo other = (AgentRespInfo) o; + return bitField0_ == other.bitField0_ + && (!hasBeginTime() || beginTime == other.beginTime) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(beginTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(beginTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentRespInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // beginTime + beginTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.beginTime, beginTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public AgentRespInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 931128054: { + if (input.isAtField(FieldNames.beginTime)) { + if (!input.trySkipNullValue()) { + beginTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentRespInfo clone() { + return new AgentRespInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentRespInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentRespInfo(), data).checkInitialized(); + } + + public static AgentRespInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRespInfo(), input).checkInitialized(); + } + + public static AgentRespInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRespInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentRespInfo messages + */ + public static MessageFactory getFactory() { + return AgentRespInfoFactory.INSTANCE; + } + + private enum AgentRespInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentRespInfo create() { + return AgentRespInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName beginTime = FieldName.forField("BeginTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/AgentGiveUp.java b/src/generated/main/emu/nebula/proto/AgentGiveUp.java new file mode 100644 index 0000000..d637666 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/AgentGiveUp.java @@ -0,0 +1,872 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class AgentGiveUp { + /** + * Protobuf type {@code AgentGiveUpReq} + */ + public static final class AgentGiveUpReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private AgentGiveUpReq() { + } + + /** + * @return a new empty instance of {@code AgentGiveUpReq} + */ + public static AgentGiveUpReq newInstance() { + return new AgentGiveUpReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public AgentGiveUpReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public AgentGiveUpReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentGiveUpReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentGiveUpReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentGiveUpReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentGiveUpReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public AgentGiveUpReq copyFrom(final AgentGiveUpReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AgentGiveUpReq mergeFrom(final AgentGiveUpReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AgentGiveUpReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public AgentGiveUpReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentGiveUpReq)) { + return false; + } + AgentGiveUpReq other = (AgentGiveUpReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentGiveUpReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public AgentGiveUpReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentGiveUpReq clone() { + return new AgentGiveUpReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentGiveUpReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentGiveUpReq(), data).checkInitialized(); + } + + public static AgentGiveUpReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentGiveUpReq(), input).checkInitialized(); + } + + public static AgentGiveUpReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentGiveUpReq(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentGiveUpReq messages + */ + public static MessageFactory getFactory() { + return AgentGiveUpReqFactory.INSTANCE; + } + + private enum AgentGiveUpReqFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentGiveUpReq create() { + return AgentGiveUpReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code AgentGiveUpResp} + */ + public static final class AgentGiveUpResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 2; + */ + private long buildId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 CharIds = 1; + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + private AgentGiveUpResp() { + } + + /** + * @return a new empty instance of {@code AgentGiveUpResp} + */ + public static AgentGiveUpResp newInstance() { + return new AgentGiveUpResp(); + } + + /** + * optional uint64 BuildId = 2; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 2; + * @return this + */ + public AgentGiveUpResp clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 2; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 2; + * @param value the buildId to set + * @return this + */ + public AgentGiveUpResp setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentGiveUpResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentGiveUpResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentGiveUpResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentGiveUpResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 CharIds = 1; + * @return this + */ + public AgentGiveUpResp clearCharIds() { + bitField0_ &= ~0x00000004; + charIds.clear(); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000004; + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * @param value the charIds to add + * @return this + */ + public AgentGiveUpResp addCharIds(final int value) { + bitField0_ |= 0x00000004; + charIds.add(value); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @param values the charIds to add + * @return this + */ + public AgentGiveUpResp addAllCharIds(final int... values) { + bitField0_ |= 0x00000004; + charIds.addAll(values); + return this; + } + + @Override + public AgentGiveUpResp copyFrom(final AgentGiveUpResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + } + return this; + } + + @Override + public AgentGiveUpResp mergeFrom(final AgentGiveUpResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + return this; + } + + @Override + public AgentGiveUpResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public AgentGiveUpResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentGiveUpResp)) { + return false; + } + AgentGiveUpResp other = (AgentGiveUpResp) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentGiveUpResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + output.endObject(); + } + + @Override + public AgentGiveUpResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentGiveUpResp clone() { + return new AgentGiveUpResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentGiveUpResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentGiveUpResp(), data).checkInitialized(); + } + + public static AgentGiveUpResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentGiveUpResp(), input).checkInitialized(); + } + + public static AgentGiveUpResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentGiveUpResp(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentGiveUpResp messages + */ + public static MessageFactory getFactory() { + return AgentGiveUpRespFactory.INSTANCE; + } + + private enum AgentGiveUpRespFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentGiveUpResp create() { + return AgentGiveUpResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/AgentRewardReceive.java b/src/generated/main/emu/nebula/proto/AgentRewardReceive.java new file mode 100644 index 0000000..b76f1dd --- /dev/null +++ b/src/generated/main/emu/nebula/proto/AgentRewardReceive.java @@ -0,0 +1,1835 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedLong; +import us.hebi.quickbuf.RepeatedMessage; + +public final class AgentRewardReceive { + /** + * Protobuf type {@code AgentRewardReceiveReq} + */ + public static final class AgentRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private AgentRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code AgentRewardReceiveReq} + */ + public static AgentRewardReceiveReq newInstance() { + return new AgentRewardReceiveReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public AgentRewardReceiveReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public AgentRewardReceiveReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public AgentRewardReceiveReq copyFrom(final AgentRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AgentRewardReceiveReq mergeFrom(final AgentRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AgentRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public AgentRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentRewardReceiveReq)) { + return false; + } + AgentRewardReceiveReq other = (AgentRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public AgentRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentRewardReceiveReq clone() { + return new AgentRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentRewardReceiveReq(), data).checkInitialized(); + } + + public static AgentRewardReceiveReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRewardReceiveReq(), input).checkInitialized(); + } + + public static AgentRewardReceiveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return AgentRewardReceiveReqFactory.INSTANCE; + } + + private enum AgentRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentRewardReceiveReq create() { + return AgentRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code AgentRewardReceiveResp} + */ + public static final class AgentRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 4; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint64 BuildIds = 2; + */ + private final RepeatedLong buildIds = RepeatedLong.newEmptyInstance(); + + /** + * repeated uint32 CharIds = 1; + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated .AgentRewardShow RewardShows = 3; + */ + private final RepeatedMessage rewardShows = RepeatedMessage.newEmptyInstance(AgentRewardShow.getFactory()); + + private AgentRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code AgentRewardReceiveResp} + */ + public static AgentRewardReceiveResp newInstance() { + return new AgentRewardReceiveResp(); + } + + /** + * optional .ChangeInfo Change = 4; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 4; + * @return this + */ + public AgentRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 4; + * @param value the change to set + * @return this + */ + public AgentRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint64 BuildIds = 2; + * @return whether the buildIds field is set + */ + public boolean hasBuildIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint64 BuildIds = 2; + * @return this + */ + public AgentRewardReceiveResp clearBuildIds() { + bitField0_ &= ~0x00000004; + buildIds.clear(); + return this; + } + + /** + * repeated uint64 BuildIds = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBuildIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getBuildIds() { + return buildIds; + } + + /** + * repeated uint64 BuildIds = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableBuildIds() { + bitField0_ |= 0x00000004; + return buildIds; + } + + /** + * repeated uint64 BuildIds = 2; + * @param value the buildIds to add + * @return this + */ + public AgentRewardReceiveResp addBuildIds(final long value) { + bitField0_ |= 0x00000004; + buildIds.add(value); + return this; + } + + /** + * repeated uint64 BuildIds = 2; + * @param values the buildIds to add + * @return this + */ + public AgentRewardReceiveResp addAllBuildIds(final long... values) { + bitField0_ |= 0x00000004; + buildIds.addAll(values); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated uint32 CharIds = 1; + * @return this + */ + public AgentRewardReceiveResp clearCharIds() { + bitField0_ &= ~0x00000008; + charIds.clear(); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000008; + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * @param value the charIds to add + * @return this + */ + public AgentRewardReceiveResp addCharIds(final int value) { + bitField0_ |= 0x00000008; + charIds.add(value); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @param values the charIds to add + * @return this + */ + public AgentRewardReceiveResp addAllCharIds(final int... values) { + bitField0_ |= 0x00000008; + charIds.addAll(values); + return this; + } + + /** + * repeated .AgentRewardShow RewardShows = 3; + * @return whether the rewardShows field is set + */ + public boolean hasRewardShows() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .AgentRewardShow RewardShows = 3; + * @return this + */ + public AgentRewardReceiveResp clearRewardShows() { + bitField0_ &= ~0x00000010; + rewardShows.clear(); + return this; + } + + /** + * repeated .AgentRewardShow RewardShows = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewardShows()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewardShows() { + return rewardShows; + } + + /** + * repeated .AgentRewardShow RewardShows = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewardShows() { + bitField0_ |= 0x00000010; + return rewardShows; + } + + /** + * repeated .AgentRewardShow RewardShows = 3; + * @param value the rewardShows to add + * @return this + */ + public AgentRewardReceiveResp addRewardShows(final AgentRewardShow value) { + bitField0_ |= 0x00000010; + rewardShows.add(value); + return this; + } + + /** + * repeated .AgentRewardShow RewardShows = 3; + * @param values the rewardShows to add + * @return this + */ + public AgentRewardReceiveResp addAllRewardShows(final AgentRewardShow... values) { + bitField0_ |= 0x00000010; + rewardShows.addAll(values); + return this; + } + + @Override + public AgentRewardReceiveResp copyFrom(final AgentRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + buildIds.copyFrom(other.buildIds); + charIds.copyFrom(other.charIds); + rewardShows.copyFrom(other.rewardShows); + } + return this; + } + + @Override + public AgentRewardReceiveResp mergeFrom(final AgentRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBuildIds()) { + getMutableBuildIds().addAll(other.buildIds); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + if (other.hasRewardShows()) { + getMutableRewardShows().addAll(other.rewardShows); + } + return this; + } + + @Override + public AgentRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + buildIds.clear(); + charIds.clear(); + rewardShows.clear(); + return this; + } + + @Override + public AgentRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + buildIds.clear(); + charIds.clear(); + rewardShows.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentRewardReceiveResp)) { + return false; + } + AgentRewardReceiveResp other = (AgentRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBuildIds() || buildIds.equals(other.buildIds)) + && (!hasCharIds() || charIds.equals(other.charIds)) + && (!hasRewardShows() || rewardShows.equals(other.rewardShows)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < buildIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildIds.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < rewardShows.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(rewardShows.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * buildIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(buildIds); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * rewardShows.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewardShows); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentRewardReceiveResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 34: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // buildIds [packed=true] + input.readPackedUInt64(buildIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // rewardShows + tag = input.readRepeatedMessage(rewardShows, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // buildIds [packed=false] + tag = input.readRepeatedUInt64(buildIds, tag); + bitField0_ |= 0x00000004; + break; + } + case 8: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt64(FieldNames.buildIds, buildIds); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.rewardShows, rewardShows); + } + output.endObject(); + } + + @Override + public AgentRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1366033014: { + if (input.isAtField(FieldNames.buildIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(buildIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1739975929: { + if (input.isAtField(FieldNames.rewardShows)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewardShows); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentRewardReceiveResp clone() { + return new AgentRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentRewardReceiveResp(), data).checkInitialized(); + } + + public static AgentRewardReceiveResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRewardReceiveResp(), input).checkInitialized(); + } + + public static AgentRewardReceiveResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return AgentRewardReceiveRespFactory.INSTANCE; + } + + private enum AgentRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentRewardReceiveResp create() { + return AgentRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName buildIds = FieldName.forField("BuildIds"); + + static final FieldName charIds = FieldName.forField("CharIds"); + + static final FieldName rewardShows = FieldName.forField("RewardShows"); + } + } + + /** + * Protobuf type {@code AgentRewardShow} + */ + public static final class AgentRewardShow extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Rewards = 2; + */ + private final RepeatedMessage rewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * repeated .ItemTpl Bonus = 3; + */ + private final RepeatedMessage bonus = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * repeated .ItemTpl SpecialRewards = 4; + */ + private final RepeatedMessage specialRewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private AgentRewardShow() { + } + + /** + * @return a new empty instance of {@code AgentRewardShow} + */ + public static AgentRewardShow newInstance() { + return new AgentRewardShow(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public AgentRewardShow clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public AgentRewardShow setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentRewardShow clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentRewardShow addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentRewardShow addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentRewardShow setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @return this + */ + public AgentRewardShow clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * repeated .ItemTpl Rewards = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewards() { + return rewards; + } + + /** + * repeated .ItemTpl Rewards = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @param value the rewards to add + * @return this + */ + public AgentRewardShow addRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @param values the rewards to add + * @return this + */ + public AgentRewardShow addAllRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + /** + * repeated .ItemTpl Bonus = 3; + * @return whether the bonus field is set + */ + public boolean hasBonus() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .ItemTpl Bonus = 3; + * @return this + */ + public AgentRewardShow clearBonus() { + bitField0_ &= ~0x00000008; + bonus.clear(); + return this; + } + + /** + * repeated .ItemTpl Bonus = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBonus()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getBonus() { + return bonus; + } + + /** + * repeated .ItemTpl Bonus = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableBonus() { + bitField0_ |= 0x00000008; + return bonus; + } + + /** + * repeated .ItemTpl Bonus = 3; + * @param value the bonus to add + * @return this + */ + public AgentRewardShow addBonus(final Public.ItemTpl value) { + bitField0_ |= 0x00000008; + bonus.add(value); + return this; + } + + /** + * repeated .ItemTpl Bonus = 3; + * @param values the bonus to add + * @return this + */ + public AgentRewardShow addAllBonus(final Public.ItemTpl... values) { + bitField0_ |= 0x00000008; + bonus.addAll(values); + return this; + } + + /** + * repeated .ItemTpl SpecialRewards = 4; + * @return whether the specialRewards field is set + */ + public boolean hasSpecialRewards() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .ItemTpl SpecialRewards = 4; + * @return this + */ + public AgentRewardShow clearSpecialRewards() { + bitField0_ &= ~0x00000010; + specialRewards.clear(); + return this; + } + + /** + * repeated .ItemTpl SpecialRewards = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSpecialRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getSpecialRewards() { + return specialRewards; + } + + /** + * repeated .ItemTpl SpecialRewards = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableSpecialRewards() { + bitField0_ |= 0x00000010; + return specialRewards; + } + + /** + * repeated .ItemTpl SpecialRewards = 4; + * @param value the specialRewards to add + * @return this + */ + public AgentRewardShow addSpecialRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000010; + specialRewards.add(value); + return this; + } + + /** + * repeated .ItemTpl SpecialRewards = 4; + * @param values the specialRewards to add + * @return this + */ + public AgentRewardShow addAllSpecialRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000010; + specialRewards.addAll(values); + return this; + } + + @Override + public AgentRewardShow copyFrom(final AgentRewardShow other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + bonus.copyFrom(other.bonus); + specialRewards.copyFrom(other.specialRewards); + } + return this; + } + + @Override + public AgentRewardShow mergeFrom(final AgentRewardShow other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + if (other.hasBonus()) { + getMutableBonus().addAll(other.bonus); + } + if (other.hasSpecialRewards()) { + getMutableSpecialRewards().addAll(other.specialRewards); + } + return this; + } + + @Override + public AgentRewardShow clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + rewards.clear(); + bonus.clear(); + specialRewards.clear(); + return this; + } + + @Override + public AgentRewardShow clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + rewards.clearQuick(); + bonus.clearQuick(); + specialRewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentRewardShow)) { + return false; + } + AgentRewardShow other = (AgentRewardShow) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)) + && (!hasBonus() || bonus.equals(other.bonus)) + && (!hasSpecialRewards() || specialRewards.equals(other.specialRewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rewards.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < bonus.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(bonus.get(i)); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < specialRewards.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(specialRewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * bonus.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(bonus); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * specialRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(specialRewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentRewardShow mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // bonus + tag = input.readRepeatedMessage(bonus, tag); + bitField0_ |= 0x00000008; + if (tag != 34) { + break; + } + } + case 34: { + // specialRewards + tag = input.readRepeatedMessage(specialRewards, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.bonus, bonus); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.specialRewards, specialRewards); + } + output.endObject(); + } + + @Override + public AgentRewardShow mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64368639: { + if (input.isAtField(FieldNames.bonus)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(bonus); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 161622091: { + if (input.isAtField(FieldNames.specialRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(specialRewards); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentRewardShow clone() { + return new AgentRewardShow().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentRewardShow parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentRewardShow(), data).checkInitialized(); + } + + public static AgentRewardShow parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRewardShow(), input).checkInitialized(); + } + + public static AgentRewardShow parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentRewardShow(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentRewardShow messages + */ + public static MessageFactory getFactory() { + return AgentRewardShowFactory.INSTANCE; + } + + private enum AgentRewardShowFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentRewardShow create() { + return AgentRewardShow.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + + static final FieldName bonus = FieldName.forField("Bonus"); + + static final FieldName specialRewards = FieldName.forField("SpecialRewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/AnyOuterClass.java b/src/generated/main/emu/nebula/proto/AnyOuterClass.java new file mode 100644 index 0000000..ec0d029 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/AnyOuterClass.java @@ -0,0 +1,536 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class AnyOuterClass { + /** + * Protobuf type {@code Any} + */ + public static final class Any extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes value = 2; + */ + private final RepeatedByte value_ = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string type_url = 1; + */ + private final Utf8String typeUrl = Utf8String.newEmptyInstance(); + + private Any() { + } + + /** + * @return a new empty instance of {@code Any} + */ + public static Any newInstance() { + return new Any(); + } + + /** + * optional bytes value = 2; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes value = 2; + * @return this + */ + public Any clearValue() { + bitField0_ &= ~0x00000001; + value_.clear(); + return this; + } + + /** + * optional bytes value = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableValue()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getValue() { + return value_; + } + + /** + * optional bytes value = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableValue() { + bitField0_ |= 0x00000001; + return value_; + } + + /** + * optional bytes value = 2; + * @param value the value_ to add + * @return this + */ + public Any addValue(final byte value) { + bitField0_ |= 0x00000001; + value_.add(value); + return this; + } + + /** + * optional bytes value = 2; + * @param values the value_ to add + * @return this + */ + public Any addAllValue(final byte... values) { + bitField0_ |= 0x00000001; + value_.addAll(values); + return this; + } + + /** + * optional bytes value = 2; + * @param values the value_ to set + * @return this + */ + public Any setValue(final byte... values) { + bitField0_ |= 0x00000001; + value_.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Any clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Any addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Any addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Any setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string type_url = 1; + * @return whether the typeUrl field is set + */ + public boolean hasTypeUrl() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string type_url = 1; + * @return this + */ + public Any clearTypeUrl() { + bitField0_ &= ~0x00000004; + typeUrl.clear(); + return this; + } + + /** + * optional string type_url = 1; + * @return the typeUrl + */ + public String getTypeUrl() { + return typeUrl.getString(); + } + + /** + * optional string type_url = 1; + * @return internal {@code Utf8String} representation of typeUrl for reading + */ + public Utf8String getTypeUrlBytes() { + return this.typeUrl; + } + + /** + * optional string type_url = 1; + * @return internal {@code Utf8String} representation of typeUrl for modifications + */ + public Utf8String getMutableTypeUrlBytes() { + bitField0_ |= 0x00000004; + return this.typeUrl; + } + + /** + * optional string type_url = 1; + * @param value the typeUrl to set + * @return this + */ + public Any setTypeUrl(final CharSequence value) { + bitField0_ |= 0x00000004; + typeUrl.copyFrom(value); + return this; + } + + /** + * optional string type_url = 1; + * @param value the typeUrl to set + * @return this + */ + public Any setTypeUrl(final Utf8String value) { + bitField0_ |= 0x00000004; + typeUrl.copyFrom(value); + return this; + } + + @Override + public Any copyFrom(final Any other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_.copyFrom(other.value_); + nextPackage.copyFrom(other.nextPackage); + typeUrl.copyFrom(other.typeUrl); + } + return this; + } + + @Override + public Any mergeFrom(final Any other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + getMutableValue().copyFrom(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasTypeUrl()) { + getMutableTypeUrlBytes().copyFrom(other.typeUrl); + } + return this; + } + + @Override + public Any clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_.clear(); + nextPackage.clear(); + typeUrl.clear(); + return this; + } + + @Override + public Any clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_.clear(); + nextPackage.clear(); + typeUrl.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Any)) { + return false; + } + Any other = (Any) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_.equals(other.value_)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasTypeUrl() || typeUrl.equals(other.typeUrl)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeBytesNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(typeUrl); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(typeUrl); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Any mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // value_ + input.readBytes(value_); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // typeUrl + input.readString(typeUrl); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.typeUrl, typeUrl); + } + output.endObject(); + } + + @Override + public Any mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 111972721: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + input.readBytes(value_); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -853099563: + case -675981590: { + if (input.isAtField(FieldNames.typeUrl)) { + if (!input.trySkipNullValue()) { + input.readString(typeUrl); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Any clone() { + return new Any().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Any parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Any(), data).checkInitialized(); + } + + public static Any parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Any(), input).checkInitialized(); + } + + public static Any parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Any(), input).checkInitialized(); + } + + /** + * @return factory for creating Any messages + */ + public static MessageFactory getFactory() { + return AnyFactory.INSTANCE; + } + + private enum AnyFactory implements MessageFactory { + INSTANCE; + + @Override + public Any create() { + return Any.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName typeUrl = FieldName.forField("typeUrl", "type_url"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/BattlePassInfoOuterClass.java b/src/generated/main/emu/nebula/proto/BattlePassInfoOuterClass.java new file mode 100644 index 0000000..96b1fab --- /dev/null +++ b/src/generated/main/emu/nebula/proto/BattlePassInfoOuterClass.java @@ -0,0 +1,1311 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class BattlePassInfoOuterClass { + /** + * Protobuf type {@code BattlePassInfo} + */ + public static final class BattlePassInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Deadline = 4; + */ + private long deadline; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Mode = 2; + */ + private int mode; + + /** + * optional uint32 Version = 3; + */ + private int version; + + /** + * optional uint32 Level = 5; + */ + private int level; + + /** + * optional uint32 Exp = 6; + */ + private int exp; + + /** + * optional uint32 ExpThisWeek = 7; + */ + private int expThisWeek; + + /** + * optional .Quests DailyQuests = 10; + */ + private final Public.Quests dailyQuests = Public.Quests.newInstance(); + + /** + * optional .Quests WeeklyQuests = 11; + */ + private final Public.Quests weeklyQuests = Public.Quests.newInstance(); + + /** + * optional bytes BasicReward = 8; + */ + private final RepeatedByte basicReward = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes PremiumReward = 9; + */ + private final RepeatedByte premiumReward = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassInfo() { + } + + /** + * @return a new empty instance of {@code BattlePassInfo} + */ + public static BattlePassInfo newInstance() { + return new BattlePassInfo(); + } + + /** + * optional int64 Deadline = 4; + * @return whether the deadline field is set + */ + public boolean hasDeadline() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Deadline = 4; + * @return this + */ + public BattlePassInfo clearDeadline() { + bitField0_ &= ~0x00000001; + deadline = 0L; + return this; + } + + /** + * optional int64 Deadline = 4; + * @return the deadline + */ + public long getDeadline() { + return deadline; + } + + /** + * optional int64 Deadline = 4; + * @param value the deadline to set + * @return this + */ + public BattlePassInfo setDeadline(final long value) { + bitField0_ |= 0x00000001; + deadline = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public BattlePassInfo clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public BattlePassInfo setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 Mode = 2; + * @return whether the mode field is set + */ + public boolean hasMode() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Mode = 2; + * @return this + */ + public BattlePassInfo clearMode() { + bitField0_ &= ~0x00000004; + mode = 0; + return this; + } + + /** + * optional uint32 Mode = 2; + * @return the mode + */ + public int getMode() { + return mode; + } + + /** + * optional uint32 Mode = 2; + * @param value the mode to set + * @return this + */ + public BattlePassInfo setMode(final int value) { + bitField0_ |= 0x00000004; + mode = value; + return this; + } + + /** + * optional uint32 Version = 3; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 Version = 3; + * @return this + */ + public BattlePassInfo clearVersion() { + bitField0_ &= ~0x00000008; + version = 0; + return this; + } + + /** + * optional uint32 Version = 3; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 3; + * @param value the version to set + * @return this + */ + public BattlePassInfo setVersion(final int value) { + bitField0_ |= 0x00000008; + version = value; + return this; + } + + /** + * optional uint32 Level = 5; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 Level = 5; + * @return this + */ + public BattlePassInfo clearLevel() { + bitField0_ &= ~0x00000010; + level = 0; + return this; + } + + /** + * optional uint32 Level = 5; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 5; + * @param value the level to set + * @return this + */ + public BattlePassInfo setLevel(final int value) { + bitField0_ |= 0x00000010; + level = value; + return this; + } + + /** + * optional uint32 Exp = 6; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 Exp = 6; + * @return this + */ + public BattlePassInfo clearExp() { + bitField0_ &= ~0x00000020; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 6; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 6; + * @param value the exp to set + * @return this + */ + public BattlePassInfo setExp(final int value) { + bitField0_ |= 0x00000020; + exp = value; + return this; + } + + /** + * optional uint32 ExpThisWeek = 7; + * @return whether the expThisWeek field is set + */ + public boolean hasExpThisWeek() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional uint32 ExpThisWeek = 7; + * @return this + */ + public BattlePassInfo clearExpThisWeek() { + bitField0_ &= ~0x00000040; + expThisWeek = 0; + return this; + } + + /** + * optional uint32 ExpThisWeek = 7; + * @return the expThisWeek + */ + public int getExpThisWeek() { + return expThisWeek; + } + + /** + * optional uint32 ExpThisWeek = 7; + * @param value the expThisWeek to set + * @return this + */ + public BattlePassInfo setExpThisWeek(final int value) { + bitField0_ |= 0x00000040; + expThisWeek = value; + return this; + } + + /** + * optional .Quests DailyQuests = 10; + * @return whether the dailyQuests field is set + */ + public boolean hasDailyQuests() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional .Quests DailyQuests = 10; + * @return this + */ + public BattlePassInfo clearDailyQuests() { + bitField0_ &= ~0x00000080; + dailyQuests.clear(); + return this; + } + + /** + * optional .Quests DailyQuests = 10; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDailyQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Quests getDailyQuests() { + return dailyQuests; + } + + /** + * optional .Quests DailyQuests = 10; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Quests getMutableDailyQuests() { + bitField0_ |= 0x00000080; + return dailyQuests; + } + + /** + * optional .Quests DailyQuests = 10; + * @param value the dailyQuests to set + * @return this + */ + public BattlePassInfo setDailyQuests(final Public.Quests value) { + bitField0_ |= 0x00000080; + dailyQuests.copyFrom(value); + return this; + } + + /** + * optional .Quests WeeklyQuests = 11; + * @return whether the weeklyQuests field is set + */ + public boolean hasWeeklyQuests() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional .Quests WeeklyQuests = 11; + * @return this + */ + public BattlePassInfo clearWeeklyQuests() { + bitField0_ &= ~0x00000100; + weeklyQuests.clear(); + return this; + } + + /** + * optional .Quests WeeklyQuests = 11; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableWeeklyQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Quests getWeeklyQuests() { + return weeklyQuests; + } + + /** + * optional .Quests WeeklyQuests = 11; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Quests getMutableWeeklyQuests() { + bitField0_ |= 0x00000100; + return weeklyQuests; + } + + /** + * optional .Quests WeeklyQuests = 11; + * @param value the weeklyQuests to set + * @return this + */ + public BattlePassInfo setWeeklyQuests(final Public.Quests value) { + bitField0_ |= 0x00000100; + weeklyQuests.copyFrom(value); + return this; + } + + /** + * optional bytes BasicReward = 8; + * @return whether the basicReward field is set + */ + public boolean hasBasicReward() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional bytes BasicReward = 8; + * @return this + */ + public BattlePassInfo clearBasicReward() { + bitField0_ &= ~0x00000200; + basicReward.clear(); + return this; + } + + /** + * optional bytes BasicReward = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBasicReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getBasicReward() { + return basicReward; + } + + /** + * optional bytes BasicReward = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableBasicReward() { + bitField0_ |= 0x00000200; + return basicReward; + } + + /** + * optional bytes BasicReward = 8; + * @param value the basicReward to add + * @return this + */ + public BattlePassInfo addBasicReward(final byte value) { + bitField0_ |= 0x00000200; + basicReward.add(value); + return this; + } + + /** + * optional bytes BasicReward = 8; + * @param values the basicReward to add + * @return this + */ + public BattlePassInfo addAllBasicReward(final byte... values) { + bitField0_ |= 0x00000200; + basicReward.addAll(values); + return this; + } + + /** + * optional bytes BasicReward = 8; + * @param values the basicReward to set + * @return this + */ + public BattlePassInfo setBasicReward(final byte... values) { + bitField0_ |= 0x00000200; + basicReward.copyFrom(values); + return this; + } + + /** + * optional bytes PremiumReward = 9; + * @return whether the premiumReward field is set + */ + public boolean hasPremiumReward() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * optional bytes PremiumReward = 9; + * @return this + */ + public BattlePassInfo clearPremiumReward() { + bitField0_ &= ~0x00000400; + premiumReward.clear(); + return this; + } + + /** + * optional bytes PremiumReward = 9; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePremiumReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getPremiumReward() { + return premiumReward; + } + + /** + * optional bytes PremiumReward = 9; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutablePremiumReward() { + bitField0_ |= 0x00000400; + return premiumReward; + } + + /** + * optional bytes PremiumReward = 9; + * @param value the premiumReward to add + * @return this + */ + public BattlePassInfo addPremiumReward(final byte value) { + bitField0_ |= 0x00000400; + premiumReward.add(value); + return this; + } + + /** + * optional bytes PremiumReward = 9; + * @param values the premiumReward to add + * @return this + */ + public BattlePassInfo addAllPremiumReward(final byte... values) { + bitField0_ |= 0x00000400; + premiumReward.addAll(values); + return this; + } + + /** + * optional bytes PremiumReward = 9; + * @param values the premiumReward to set + * @return this + */ + public BattlePassInfo setPremiumReward(final byte... values) { + bitField0_ |= 0x00000400; + premiumReward.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassInfo clearNextPackage() { + bitField0_ &= ~0x00000800; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000800; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000800; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000800; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000800; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassInfo copyFrom(final BattlePassInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + deadline = other.deadline; + id = other.id; + mode = other.mode; + version = other.version; + level = other.level; + exp = other.exp; + expThisWeek = other.expThisWeek; + dailyQuests.copyFrom(other.dailyQuests); + weeklyQuests.copyFrom(other.weeklyQuests); + basicReward.copyFrom(other.basicReward); + premiumReward.copyFrom(other.premiumReward); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassInfo mergeFrom(final BattlePassInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDeadline()) { + setDeadline(other.deadline); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasMode()) { + setMode(other.mode); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasExpThisWeek()) { + setExpThisWeek(other.expThisWeek); + } + if (other.hasDailyQuests()) { + getMutableDailyQuests().mergeFrom(other.dailyQuests); + } + if (other.hasWeeklyQuests()) { + getMutableWeeklyQuests().mergeFrom(other.weeklyQuests); + } + if (other.hasBasicReward()) { + getMutableBasicReward().copyFrom(other.basicReward); + } + if (other.hasPremiumReward()) { + getMutablePremiumReward().copyFrom(other.premiumReward); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + deadline = 0L; + id = 0; + mode = 0; + version = 0; + level = 0; + exp = 0; + expThisWeek = 0; + dailyQuests.clear(); + weeklyQuests.clear(); + basicReward.clear(); + premiumReward.clear(); + nextPackage.clear(); + return this; + } + + @Override + public BattlePassInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + dailyQuests.clearQuick(); + weeklyQuests.clearQuick(); + basicReward.clear(); + premiumReward.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassInfo)) { + return false; + } + BattlePassInfo other = (BattlePassInfo) o; + return bitField0_ == other.bitField0_ + && (!hasDeadline() || deadline == other.deadline) + && (!hasId() || id == other.id) + && (!hasMode() || mode == other.mode) + && (!hasVersion() || version == other.version) + && (!hasLevel() || level == other.level) + && (!hasExp() || exp == other.exp) + && (!hasExpThisWeek() || expThisWeek == other.expThisWeek) + && (!hasDailyQuests() || dailyQuests.equals(other.dailyQuests)) + && (!hasWeeklyQuests() || weeklyQuests.equals(other.weeklyQuests)) + && (!hasBasicReward() || basicReward.equals(other.basicReward)) + && (!hasPremiumReward() || premiumReward.equals(other.premiumReward)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeInt64NoTag(deadline); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(mode); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(expThisWeek); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(dailyQuests); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(weeklyQuests); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 66); + output.writeBytesNoTag(basicReward); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 74); + output.writeBytesNoTag(premiumReward); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(deadline); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mode); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(expThisWeek); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(dailyQuests); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(weeklyQuests); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(basicReward); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(premiumReward); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // deadline + deadline = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // mode + mode = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // expThisWeek + expThisWeek = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // dailyQuests + input.readMessage(dailyQuests); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 90) { + break; + } + } + case 90: { + // weeklyQuests + input.readMessage(weeklyQuests); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // basicReward + input.readBytes(basicReward); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // premiumReward + input.readBytes(premiumReward); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.deadline, deadline); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.mode, mode); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.expThisWeek, expThisWeek); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeMessage(FieldNames.dailyQuests, dailyQuests); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeMessage(FieldNames.weeklyQuests, weeklyQuests); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeBytes(FieldNames.basicReward, basicReward); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeBytes(FieldNames.premiumReward, premiumReward); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 568278648: { + if (input.isAtField(FieldNames.deadline)) { + if (!input.trySkipNullValue()) { + deadline = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2403779: { + if (input.isAtField(FieldNames.mode)) { + if (!input.trySkipNullValue()) { + mode = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -820572977: { + if (input.isAtField(FieldNames.expThisWeek)) { + if (!input.trySkipNullValue()) { + expThisWeek = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1364115242: { + if (input.isAtField(FieldNames.dailyQuests)) { + if (!input.trySkipNullValue()) { + input.readMessage(dailyQuests); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 433561554: { + if (input.isAtField(FieldNames.weeklyQuests)) { + if (!input.trySkipNullValue()) { + input.readMessage(weeklyQuests); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 799038685: { + if (input.isAtField(FieldNames.basicReward)) { + if (!input.trySkipNullValue()) { + input.readBytes(basicReward); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 423877702: { + if (input.isAtField(FieldNames.premiumReward)) { + if (!input.trySkipNullValue()) { + input.readBytes(premiumReward); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassInfo clone() { + return new BattlePassInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassInfo(), data).checkInitialized(); + } + + public static BattlePassInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassInfo(), input).checkInitialized(); + } + + public static BattlePassInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassInfo messages + */ + public static MessageFactory getFactory() { + return BattlePassInfoFactory.INSTANCE; + } + + private enum BattlePassInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassInfo create() { + return BattlePassInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName deadline = FieldName.forField("Deadline"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName mode = FieldName.forField("Mode"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName expThisWeek = FieldName.forField("ExpThisWeek"); + + static final FieldName dailyQuests = FieldName.forField("DailyQuests"); + + static final FieldName weeklyQuests = FieldName.forField("WeeklyQuests"); + + static final FieldName basicReward = FieldName.forField("BasicReward"); + + static final FieldName premiumReward = FieldName.forField("PremiumReward"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/BattlePassLevelBuy.java b/src/generated/main/emu/nebula/proto/BattlePassLevelBuy.java new file mode 100644 index 0000000..96f6e44 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/BattlePassLevelBuy.java @@ -0,0 +1,484 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class BattlePassLevelBuy { + /** + * Protobuf type {@code BattlePassLevelBuyResp} + */ + public static final class BattlePassLevelBuyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Level = 2; + */ + private int level; + + /** + * optional .ChangeInfo Change = 1; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassLevelBuyResp() { + } + + /** + * @return a new empty instance of {@code BattlePassLevelBuyResp} + */ + public static BattlePassLevelBuyResp newInstance() { + return new BattlePassLevelBuyResp(); + } + + /** + * optional uint32 Level = 2; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Level = 2; + * @return this + */ + public BattlePassLevelBuyResp clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * optional uint32 Level = 2; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 2; + * @param value the level to set + * @return this + */ + public BattlePassLevelBuyResp setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 1; + * @return this + */ + public BattlePassLevelBuyResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * @param value the change to set + * @return this + */ + public BattlePassLevelBuyResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassLevelBuyResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassLevelBuyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassLevelBuyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassLevelBuyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassLevelBuyResp copyFrom(final BattlePassLevelBuyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassLevelBuyResp mergeFrom(final BattlePassLevelBuyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassLevelBuyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public BattlePassLevelBuyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassLevelBuyResp)) { + return false; + } + BattlePassLevelBuyResp other = (BattlePassLevelBuyResp) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassLevelBuyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassLevelBuyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassLevelBuyResp clone() { + return new BattlePassLevelBuyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassLevelBuyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassLevelBuyResp(), data).checkInitialized(); + } + + public static BattlePassLevelBuyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassLevelBuyResp(), input).checkInitialized(); + } + + public static BattlePassLevelBuyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassLevelBuyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassLevelBuyResp messages + */ + public static MessageFactory getFactory() { + return BattlePassLevelBuyRespFactory.INSTANCE; + } + + private enum BattlePassLevelBuyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassLevelBuyResp create() { + return BattlePassLevelBuyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/BattlePassOrder.java b/src/generated/main/emu/nebula/proto/BattlePassOrder.java new file mode 100644 index 0000000..9f02125 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/BattlePassOrder.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class BattlePassOrder { + /** + * Protobuf type {@code BattlePassOrderReq} + */ + public static final class BattlePassOrderReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Mode = 1; + */ + private int mode; + + /** + * optional uint32 Version = 2; + */ + private int version; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassOrderReq() { + } + + /** + * @return a new empty instance of {@code BattlePassOrderReq} + */ + public static BattlePassOrderReq newInstance() { + return new BattlePassOrderReq(); + } + + /** + * optional uint32 Mode = 1; + * @return whether the mode field is set + */ + public boolean hasMode() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Mode = 1; + * @return this + */ + public BattlePassOrderReq clearMode() { + bitField0_ &= ~0x00000001; + mode = 0; + return this; + } + + /** + * optional uint32 Mode = 1; + * @return the mode + */ + public int getMode() { + return mode; + } + + /** + * optional uint32 Mode = 1; + * @param value the mode to set + * @return this + */ + public BattlePassOrderReq setMode(final int value) { + bitField0_ |= 0x00000001; + mode = value; + return this; + } + + /** + * optional uint32 Version = 2; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Version = 2; + * @return this + */ + public BattlePassOrderReq clearVersion() { + bitField0_ &= ~0x00000002; + version = 0; + return this; + } + + /** + * optional uint32 Version = 2; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 2; + * @param value the version to set + * @return this + */ + public BattlePassOrderReq setVersion(final int value) { + bitField0_ |= 0x00000002; + version = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassOrderReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassOrderReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassOrderReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassOrderReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassOrderReq copyFrom(final BattlePassOrderReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + mode = other.mode; + version = other.version; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassOrderReq mergeFrom(final BattlePassOrderReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMode()) { + setMode(other.mode); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassOrderReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + mode = 0; + version = 0; + nextPackage.clear(); + return this; + } + + @Override + public BattlePassOrderReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassOrderReq)) { + return false; + } + BattlePassOrderReq other = (BattlePassOrderReq) o; + return bitField0_ == other.bitField0_ + && (!hasMode() || mode == other.mode) + && (!hasVersion() || version == other.version) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(mode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mode); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassOrderReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // mode + mode = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.mode, mode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassOrderReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2403779: { + if (input.isAtField(FieldNames.mode)) { + if (!input.trySkipNullValue()) { + mode = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassOrderReq clone() { + return new BattlePassOrderReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassOrderReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassOrderReq(), data).checkInitialized(); + } + + public static BattlePassOrderReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassOrderReq(), input).checkInitialized(); + } + + public static BattlePassOrderReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassOrderReq(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassOrderReq messages + */ + public static MessageFactory getFactory() { + return BattlePassOrderReqFactory.INSTANCE; + } + + private enum BattlePassOrderReqFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassOrderReq create() { + return BattlePassOrderReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName mode = FieldName.forField("Mode"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/BattlePassOrderCollect.java b/src/generated/main/emu/nebula/proto/BattlePassOrderCollect.java new file mode 100644 index 0000000..88d07b4 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/BattlePassOrderCollect.java @@ -0,0 +1,644 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class BattlePassOrderCollect { + /** + * Protobuf type {@code BattlePassOrderCollectResp} + */ + public static final class BattlePassOrderCollectResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Mode = 2; + */ + private int mode; + + /** + * optional uint32 Level = 3; + */ + private int level; + + /** + * optional uint32 Version = 4; + */ + private int version; + + /** + * optional .CollectResp CollectResp = 1; + */ + private final Public.CollectResp collectResp = Public.CollectResp.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassOrderCollectResp() { + } + + /** + * @return a new empty instance of {@code BattlePassOrderCollectResp} + */ + public static BattlePassOrderCollectResp newInstance() { + return new BattlePassOrderCollectResp(); + } + + /** + * optional uint32 Mode = 2; + * @return whether the mode field is set + */ + public boolean hasMode() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Mode = 2; + * @return this + */ + public BattlePassOrderCollectResp clearMode() { + bitField0_ &= ~0x00000001; + mode = 0; + return this; + } + + /** + * optional uint32 Mode = 2; + * @return the mode + */ + public int getMode() { + return mode; + } + + /** + * optional uint32 Mode = 2; + * @param value the mode to set + * @return this + */ + public BattlePassOrderCollectResp setMode(final int value) { + bitField0_ |= 0x00000001; + mode = value; + return this; + } + + /** + * optional uint32 Level = 3; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Level = 3; + * @return this + */ + public BattlePassOrderCollectResp clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * optional uint32 Level = 3; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 3; + * @param value the level to set + * @return this + */ + public BattlePassOrderCollectResp setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * optional uint32 Version = 4; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Version = 4; + * @return this + */ + public BattlePassOrderCollectResp clearVersion() { + bitField0_ &= ~0x00000004; + version = 0; + return this; + } + + /** + * optional uint32 Version = 4; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 4; + * @param value the version to set + * @return this + */ + public BattlePassOrderCollectResp setVersion(final int value) { + bitField0_ |= 0x00000004; + version = value; + return this; + } + + /** + * optional .CollectResp CollectResp = 1; + * @return whether the collectResp field is set + */ + public boolean hasCollectResp() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .CollectResp CollectResp = 1; + * @return this + */ + public BattlePassOrderCollectResp clearCollectResp() { + bitField0_ &= ~0x00000008; + collectResp.clear(); + return this; + } + + /** + * optional .CollectResp CollectResp = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCollectResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.CollectResp getCollectResp() { + return collectResp; + } + + /** + * optional .CollectResp CollectResp = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.CollectResp getMutableCollectResp() { + bitField0_ |= 0x00000008; + return collectResp; + } + + /** + * optional .CollectResp CollectResp = 1; + * @param value the collectResp to set + * @return this + */ + public BattlePassOrderCollectResp setCollectResp(final Public.CollectResp value) { + bitField0_ |= 0x00000008; + collectResp.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassOrderCollectResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassOrderCollectResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassOrderCollectResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassOrderCollectResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassOrderCollectResp copyFrom(final BattlePassOrderCollectResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + mode = other.mode; + level = other.level; + version = other.version; + collectResp.copyFrom(other.collectResp); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassOrderCollectResp mergeFrom(final BattlePassOrderCollectResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMode()) { + setMode(other.mode); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasCollectResp()) { + getMutableCollectResp().mergeFrom(other.collectResp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassOrderCollectResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + mode = 0; + level = 0; + version = 0; + collectResp.clear(); + nextPackage.clear(); + return this; + } + + @Override + public BattlePassOrderCollectResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + collectResp.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassOrderCollectResp)) { + return false; + } + BattlePassOrderCollectResp other = (BattlePassOrderCollectResp) o; + return bitField0_ == other.bitField0_ + && (!hasMode() || mode == other.mode) + && (!hasLevel() || level == other.level) + && (!hasVersion() || version == other.version) + && (!hasCollectResp() || collectResp.equals(other.collectResp)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(mode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(collectResp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mode); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(collectResp); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassOrderCollectResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // mode + mode = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // collectResp + input.readMessage(collectResp); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.mode, mode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.collectResp, collectResp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassOrderCollectResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2403779: { + if (input.isAtField(FieldNames.mode)) { + if (!input.trySkipNullValue()) { + mode = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -773901318: { + if (input.isAtField(FieldNames.collectResp)) { + if (!input.trySkipNullValue()) { + input.readMessage(collectResp); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassOrderCollectResp clone() { + return new BattlePassOrderCollectResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassOrderCollectResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassOrderCollectResp(), data).checkInitialized(); + } + + public static BattlePassOrderCollectResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassOrderCollectResp(), input).checkInitialized(); + } + + public static BattlePassOrderCollectResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassOrderCollectResp(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassOrderCollectResp messages + */ + public static MessageFactory getFactory() { + return BattlePassOrderCollectRespFactory.INSTANCE; + } + + private enum BattlePassOrderCollectRespFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassOrderCollectResp create() { + return BattlePassOrderCollectResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName mode = FieldName.forField("Mode"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName collectResp = FieldName.forField("CollectResp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/BattlePassQuestRewardReceive.java b/src/generated/main/emu/nebula/proto/BattlePassQuestRewardReceive.java new file mode 100644 index 0000000..1f94060 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/BattlePassQuestRewardReceive.java @@ -0,0 +1,543 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class BattlePassQuestRewardReceive { + /** + * Protobuf type {@code BattlePassQuestRewardResp} + */ + public static final class BattlePassQuestRewardResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Level = 1; + */ + private int level; + + /** + * optional uint32 Exp = 2; + */ + private int exp; + + /** + * optional uint32 ExpThisWeek = 3; + */ + private int expThisWeek; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassQuestRewardResp() { + } + + /** + * @return a new empty instance of {@code BattlePassQuestRewardResp} + */ + public static BattlePassQuestRewardResp newInstance() { + return new BattlePassQuestRewardResp(); + } + + /** + * optional uint32 Level = 1; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Level = 1; + * @return this + */ + public BattlePassQuestRewardResp clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * optional uint32 Level = 1; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 1; + * @param value the level to set + * @return this + */ + public BattlePassQuestRewardResp setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Exp = 2; + * @return this + */ + public BattlePassQuestRewardResp clearExp() { + bitField0_ &= ~0x00000002; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 2; + * @param value the exp to set + * @return this + */ + public BattlePassQuestRewardResp setExp(final int value) { + bitField0_ |= 0x00000002; + exp = value; + return this; + } + + /** + * optional uint32 ExpThisWeek = 3; + * @return whether the expThisWeek field is set + */ + public boolean hasExpThisWeek() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 ExpThisWeek = 3; + * @return this + */ + public BattlePassQuestRewardResp clearExpThisWeek() { + bitField0_ &= ~0x00000004; + expThisWeek = 0; + return this; + } + + /** + * optional uint32 ExpThisWeek = 3; + * @return the expThisWeek + */ + public int getExpThisWeek() { + return expThisWeek; + } + + /** + * optional uint32 ExpThisWeek = 3; + * @param value the expThisWeek to set + * @return this + */ + public BattlePassQuestRewardResp setExpThisWeek(final int value) { + bitField0_ |= 0x00000004; + expThisWeek = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassQuestRewardResp clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassQuestRewardResp addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassQuestRewardResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassQuestRewardResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassQuestRewardResp copyFrom(final BattlePassQuestRewardResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + exp = other.exp; + expThisWeek = other.expThisWeek; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassQuestRewardResp mergeFrom(final BattlePassQuestRewardResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasExpThisWeek()) { + setExpThisWeek(other.expThisWeek); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassQuestRewardResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + exp = 0; + expThisWeek = 0; + nextPackage.clear(); + return this; + } + + @Override + public BattlePassQuestRewardResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassQuestRewardResp)) { + return false; + } + BattlePassQuestRewardResp other = (BattlePassQuestRewardResp) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasExp() || exp == other.exp) + && (!hasExpThisWeek() || expThisWeek == other.expThisWeek) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(expThisWeek); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(expThisWeek); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassQuestRewardResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // expThisWeek + expThisWeek = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.expThisWeek, expThisWeek); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassQuestRewardResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -820572977: { + if (input.isAtField(FieldNames.expThisWeek)) { + if (!input.trySkipNullValue()) { + expThisWeek = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassQuestRewardResp clone() { + return new BattlePassQuestRewardResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassQuestRewardResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassQuestRewardResp(), data).checkInitialized(); + } + + public static BattlePassQuestRewardResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassQuestRewardResp(), input).checkInitialized(); + } + + public static BattlePassQuestRewardResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassQuestRewardResp(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassQuestRewardResp messages + */ + public static MessageFactory getFactory() { + return BattlePassQuestRewardRespFactory.INSTANCE; + } + + private enum BattlePassQuestRewardRespFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassQuestRewardResp create() { + return BattlePassQuestRewardResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName expThisWeek = FieldName.forField("ExpThisWeek"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/BattlePassRewardReceive.java b/src/generated/main/emu/nebula/proto/BattlePassRewardReceive.java new file mode 100644 index 0000000..6df403b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/BattlePassRewardReceive.java @@ -0,0 +1,1280 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class BattlePassRewardReceive { + /** + * Protobuf type {@code BattlePassRewardReceiveReq} + */ + public static final class BattlePassRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Basic = 2; + */ + private int basic; + + /** + * optional uint32 Premium = 3; + */ + private int premium; + + /** + * optional uint32 Version = 4; + */ + private int version; + + /** + * optional .Nil All = 1; + */ + private final Public.Nil all = Public.Nil.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code BattlePassRewardReceiveReq} + */ + public static BattlePassRewardReceiveReq newInstance() { + return new BattlePassRewardReceiveReq(); + } + + /** + * optional uint32 Basic = 2; + * @return whether the basic field is set + */ + public boolean hasBasic() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Basic = 2; + * @return this + */ + public BattlePassRewardReceiveReq clearBasic() { + bitField0_ &= ~0x00000001; + basic = 0; + return this; + } + + /** + * optional uint32 Basic = 2; + * @return the basic + */ + public int getBasic() { + return basic; + } + + /** + * optional uint32 Basic = 2; + * @param value the basic to set + * @return this + */ + public BattlePassRewardReceiveReq setBasic(final int value) { + bitField0_ |= 0x00000001; + basic = value; + return this; + } + + /** + * optional uint32 Premium = 3; + * @return whether the premium field is set + */ + public boolean hasPremium() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Premium = 3; + * @return this + */ + public BattlePassRewardReceiveReq clearPremium() { + bitField0_ &= ~0x00000002; + premium = 0; + return this; + } + + /** + * optional uint32 Premium = 3; + * @return the premium + */ + public int getPremium() { + return premium; + } + + /** + * optional uint32 Premium = 3; + * @param value the premium to set + * @return this + */ + public BattlePassRewardReceiveReq setPremium(final int value) { + bitField0_ |= 0x00000002; + premium = value; + return this; + } + + /** + * optional uint32 Version = 4; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Version = 4; + * @return this + */ + public BattlePassRewardReceiveReq clearVersion() { + bitField0_ &= ~0x00000004; + version = 0; + return this; + } + + /** + * optional uint32 Version = 4; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 4; + * @param value the version to set + * @return this + */ + public BattlePassRewardReceiveReq setVersion(final int value) { + bitField0_ |= 0x00000004; + version = value; + return this; + } + + /** + * optional .Nil All = 1; + * @return whether the all field is set + */ + public boolean hasAll() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .Nil All = 1; + * @return this + */ + public BattlePassRewardReceiveReq clearAll() { + bitField0_ &= ~0x00000008; + all.clear(); + return this; + } + + /** + * optional .Nil All = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAll()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Nil getAll() { + return all; + } + + /** + * optional .Nil All = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Nil getMutableAll() { + bitField0_ |= 0x00000008; + return all; + } + + /** + * optional .Nil All = 1; + * @param value the all to set + * @return this + */ + public BattlePassRewardReceiveReq setAll(final Public.Nil value) { + bitField0_ |= 0x00000008; + all.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassRewardReceiveReq copyFrom(final BattlePassRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + basic = other.basic; + premium = other.premium; + version = other.version; + all.copyFrom(other.all); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassRewardReceiveReq mergeFrom(final BattlePassRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBasic()) { + setBasic(other.basic); + } + if (other.hasPremium()) { + setPremium(other.premium); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasAll()) { + getMutableAll().mergeFrom(other.all); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + basic = 0; + premium = 0; + version = 0; + all.clear(); + nextPackage.clear(); + return this; + } + + @Override + public BattlePassRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + all.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassRewardReceiveReq)) { + return false; + } + BattlePassRewardReceiveReq other = (BattlePassRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasBasic() || basic == other.basic) + && (!hasPremium() || premium == other.premium) + && (!hasVersion() || version == other.version) + && (!hasAll() || all.equals(other.all)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(basic); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(premium); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(all); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(basic); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(premium); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(all); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // basic + basic = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // premium + premium = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // all + input.readMessage(all); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.basic, basic); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.premium, premium); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.all, all); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 63955982: { + if (input.isAtField(FieldNames.basic)) { + if (!input.trySkipNullValue()) { + basic = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1346201143: { + if (input.isAtField(FieldNames.premium)) { + if (!input.trySkipNullValue()) { + premium = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65921: { + if (input.isAtField(FieldNames.all)) { + if (!input.trySkipNullValue()) { + input.readMessage(all); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassRewardReceiveReq clone() { + return new BattlePassRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassRewardReceiveReq(), data).checkInitialized(); + } + + public static BattlePassRewardReceiveReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassRewardReceiveReq(), input).checkInitialized(); + } + + public static BattlePassRewardReceiveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return BattlePassRewardReceiveReqFactory.INSTANCE; + } + + private enum BattlePassRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassRewardReceiveReq create() { + return BattlePassRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName basic = FieldName.forField("Basic"); + + static final FieldName premium = FieldName.forField("Premium"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName all = FieldName.forField("All"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code BattlePassRewardReceiveResp} + */ + public static final class BattlePassRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 3; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes BasicReward = 1; + */ + private final RepeatedByte basicReward = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes PremiumReward = 2; + */ + private final RepeatedByte premiumReward = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code BattlePassRewardReceiveResp} + */ + public static BattlePassRewardReceiveResp newInstance() { + return new BattlePassRewardReceiveResp(); + } + + /** + * optional .ChangeInfo Change = 3; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 3; + * @return this + */ + public BattlePassRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * @param value the change to set + * @return this + */ + public BattlePassRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes BasicReward = 1; + * @return whether the basicReward field is set + */ + public boolean hasBasicReward() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes BasicReward = 1; + * @return this + */ + public BattlePassRewardReceiveResp clearBasicReward() { + bitField0_ &= ~0x00000002; + basicReward.clear(); + return this; + } + + /** + * optional bytes BasicReward = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBasicReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getBasicReward() { + return basicReward; + } + + /** + * optional bytes BasicReward = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableBasicReward() { + bitField0_ |= 0x00000002; + return basicReward; + } + + /** + * optional bytes BasicReward = 1; + * @param value the basicReward to add + * @return this + */ + public BattlePassRewardReceiveResp addBasicReward(final byte value) { + bitField0_ |= 0x00000002; + basicReward.add(value); + return this; + } + + /** + * optional bytes BasicReward = 1; + * @param values the basicReward to add + * @return this + */ + public BattlePassRewardReceiveResp addAllBasicReward(final byte... values) { + bitField0_ |= 0x00000002; + basicReward.addAll(values); + return this; + } + + /** + * optional bytes BasicReward = 1; + * @param values the basicReward to set + * @return this + */ + public BattlePassRewardReceiveResp setBasicReward(final byte... values) { + bitField0_ |= 0x00000002; + basicReward.copyFrom(values); + return this; + } + + /** + * optional bytes PremiumReward = 2; + * @return whether the premiumReward field is set + */ + public boolean hasPremiumReward() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes PremiumReward = 2; + * @return this + */ + public BattlePassRewardReceiveResp clearPremiumReward() { + bitField0_ &= ~0x00000004; + premiumReward.clear(); + return this; + } + + /** + * optional bytes PremiumReward = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePremiumReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getPremiumReward() { + return premiumReward; + } + + /** + * optional bytes PremiumReward = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutablePremiumReward() { + bitField0_ |= 0x00000004; + return premiumReward; + } + + /** + * optional bytes PremiumReward = 2; + * @param value the premiumReward to add + * @return this + */ + public BattlePassRewardReceiveResp addPremiumReward(final byte value) { + bitField0_ |= 0x00000004; + premiumReward.add(value); + return this; + } + + /** + * optional bytes PremiumReward = 2; + * @param values the premiumReward to add + * @return this + */ + public BattlePassRewardReceiveResp addAllPremiumReward(final byte... values) { + bitField0_ |= 0x00000004; + premiumReward.addAll(values); + return this; + } + + /** + * optional bytes PremiumReward = 2; + * @param values the premiumReward to set + * @return this + */ + public BattlePassRewardReceiveResp setPremiumReward(final byte... values) { + bitField0_ |= 0x00000004; + premiumReward.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassRewardReceiveResp copyFrom(final BattlePassRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + basicReward.copyFrom(other.basicReward); + premiumReward.copyFrom(other.premiumReward); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassRewardReceiveResp mergeFrom(final BattlePassRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasBasicReward()) { + getMutableBasicReward().copyFrom(other.basicReward); + } + if (other.hasPremiumReward()) { + getMutablePremiumReward().copyFrom(other.premiumReward); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + basicReward.clear(); + premiumReward.clear(); + nextPackage.clear(); + return this; + } + + @Override + public BattlePassRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + basicReward.clear(); + premiumReward.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassRewardReceiveResp)) { + return false; + } + BattlePassRewardReceiveResp other = (BattlePassRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasBasicReward() || basicReward.equals(other.basicReward)) + && (!hasPremiumReward() || premiumReward.equals(other.premiumReward)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeBytesNoTag(basicReward); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeBytesNoTag(premiumReward); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(basicReward); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(premiumReward); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassRewardReceiveResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // basicReward + input.readBytes(basicReward); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // premiumReward + input.readBytes(premiumReward); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.basicReward, basicReward); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.premiumReward, premiumReward); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 799038685: { + if (input.isAtField(FieldNames.basicReward)) { + if (!input.trySkipNullValue()) { + input.readBytes(basicReward); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 423877702: { + if (input.isAtField(FieldNames.premiumReward)) { + if (!input.trySkipNullValue()) { + input.readBytes(premiumReward); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassRewardReceiveResp clone() { + return new BattlePassRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassRewardReceiveResp(), data).checkInitialized(); + } + + public static BattlePassRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new BattlePassRewardReceiveResp(), input).checkInitialized(); + } + + public static BattlePassRewardReceiveResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return BattlePassRewardReceiveRespFactory.INSTANCE; + } + + private enum BattlePassRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassRewardReceiveResp create() { + return BattlePassRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName basicReward = FieldName.forField("BasicReward"); + + static final FieldName premiumReward = FieldName.forField("PremiumReward"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharAdvance.java b/src/generated/main/emu/nebula/proto/CharAdvance.java new file mode 100644 index 0000000..a563d23 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharAdvance.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class CharAdvance { +} diff --git a/src/generated/main/emu/nebula/proto/CharAdvanceRewardReceive.java b/src/generated/main/emu/nebula/proto/CharAdvanceRewardReceive.java new file mode 100644 index 0000000..0695f85 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharAdvanceRewardReceive.java @@ -0,0 +1,978 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharAdvanceRewardReceive { + /** + * Protobuf type {@code CharAdvanceRewardReceiveReq} + */ + public static final class CharAdvanceRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 Advance = 2; + */ + private int advance; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharAdvanceRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code CharAdvanceRewardReceiveReq} + */ + public static CharAdvanceRewardReceiveReq newInstance() { + return new CharAdvanceRewardReceiveReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharAdvanceRewardReceiveReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharAdvanceRewardReceiveReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 Advance = 2; + * @return whether the advance field is set + */ + public boolean hasAdvance() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Advance = 2; + * @return this + */ + public CharAdvanceRewardReceiveReq clearAdvance() { + bitField0_ &= ~0x00000002; + advance = 0; + return this; + } + + /** + * optional uint32 Advance = 2; + * @return the advance + */ + public int getAdvance() { + return advance; + } + + /** + * optional uint32 Advance = 2; + * @param value the advance to set + * @return this + */ + public CharAdvanceRewardReceiveReq setAdvance(final int value) { + bitField0_ |= 0x00000002; + advance = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAdvanceRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAdvanceRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAdvanceRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAdvanceRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharAdvanceRewardReceiveReq copyFrom(final CharAdvanceRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + advance = other.advance; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAdvanceRewardReceiveReq mergeFrom(final CharAdvanceRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasAdvance()) { + setAdvance(other.advance); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAdvanceRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + advance = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharAdvanceRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAdvanceRewardReceiveReq)) { + return false; + } + CharAdvanceRewardReceiveReq other = (CharAdvanceRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasAdvance() || advance == other.advance) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(advance); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(advance); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAdvanceRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // advance + advance = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.advance, advance); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharAdvanceRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 533086306: { + if (input.isAtField(FieldNames.advance)) { + if (!input.trySkipNullValue()) { + advance = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAdvanceRewardReceiveReq clone() { + return new CharAdvanceRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAdvanceRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveReq(), data).checkInitialized(); + } + + public static CharAdvanceRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveReq(), input).checkInitialized(); + } + + public static CharAdvanceRewardReceiveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAdvanceRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return CharAdvanceRewardReceiveReqFactory.INSTANCE; + } + + private enum CharAdvanceRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAdvanceRewardReceiveReq create() { + return CharAdvanceRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName advance = FieldName.forField("Advance"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharAdvanceRewardReceiveResp} + */ + public static final class CharAdvanceRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes Flag = 1; + */ + private final RepeatedByte flag = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharAdvanceRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code CharAdvanceRewardReceiveResp} + */ + public static CharAdvanceRewardReceiveResp newInstance() { + return new CharAdvanceRewardReceiveResp(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public CharAdvanceRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public CharAdvanceRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes Flag = 1; + * @return whether the flag field is set + */ + public boolean hasFlag() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes Flag = 1; + * @return this + */ + public CharAdvanceRewardReceiveResp clearFlag() { + bitField0_ &= ~0x00000002; + flag.clear(); + return this; + } + + /** + * optional bytes Flag = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFlag()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getFlag() { + return flag; + } + + /** + * optional bytes Flag = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableFlag() { + bitField0_ |= 0x00000002; + return flag; + } + + /** + * optional bytes Flag = 1; + * @param value the flag to add + * @return this + */ + public CharAdvanceRewardReceiveResp addFlag(final byte value) { + bitField0_ |= 0x00000002; + flag.add(value); + return this; + } + + /** + * optional bytes Flag = 1; + * @param values the flag to add + * @return this + */ + public CharAdvanceRewardReceiveResp addAllFlag(final byte... values) { + bitField0_ |= 0x00000002; + flag.addAll(values); + return this; + } + + /** + * optional bytes Flag = 1; + * @param values the flag to set + * @return this + */ + public CharAdvanceRewardReceiveResp setFlag(final byte... values) { + bitField0_ |= 0x00000002; + flag.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAdvanceRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAdvanceRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAdvanceRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAdvanceRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharAdvanceRewardReceiveResp copyFrom(final CharAdvanceRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + flag.copyFrom(other.flag); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAdvanceRewardReceiveResp mergeFrom(final CharAdvanceRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasFlag()) { + getMutableFlag().copyFrom(other.flag); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAdvanceRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + flag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharAdvanceRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + flag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAdvanceRewardReceiveResp)) { + return false; + } + CharAdvanceRewardReceiveResp other = (CharAdvanceRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasFlag() || flag.equals(other.flag)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeBytesNoTag(flag); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(flag); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAdvanceRewardReceiveResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // flag + input.readBytes(flag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.flag, flag); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharAdvanceRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2192268: { + if (input.isAtField(FieldNames.flag)) { + if (!input.trySkipNullValue()) { + input.readBytes(flag); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAdvanceRewardReceiveResp clone() { + return new CharAdvanceRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAdvanceRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveResp(), data).checkInitialized(); + } + + public static CharAdvanceRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveResp(), input).checkInitialized(); + } + + public static CharAdvanceRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAdvanceRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return CharAdvanceRewardReceiveRespFactory.INSTANCE; + } + + private enum CharAdvanceRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAdvanceRewardReceiveResp create() { + return CharAdvanceRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName flag = FieldName.forField("Flag"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharAffinityGiftSend.java b/src/generated/main/emu/nebula/proto/CharAffinityGiftSend.java new file mode 100644 index 0000000..a4b9e3f --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharAffinityGiftSend.java @@ -0,0 +1,1067 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class CharAffinityGiftSend { + /** + * Protobuf type {@code CharAffinityGiftSendReq} + */ + public static final class CharAffinityGiftSendReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Items = 2; + */ + private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private CharAffinityGiftSendReq() { + } + + /** + * @return a new empty instance of {@code CharAffinityGiftSendReq} + */ + public static CharAffinityGiftSendReq newInstance() { + return new CharAffinityGiftSendReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharAffinityGiftSendReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharAffinityGiftSendReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAffinityGiftSendReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAffinityGiftSendReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAffinityGiftSendReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAffinityGiftSendReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Items = 2; + * @return this + */ + public CharAffinityGiftSendReq clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getItems() { + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * @param value the items to add + * @return this + */ + public CharAffinityGiftSendReq addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @param values the items to add + * @return this + */ + public CharAffinityGiftSendReq addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + @Override + public CharAffinityGiftSendReq copyFrom(final CharAffinityGiftSendReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public CharAffinityGiftSendReq mergeFrom(final CharAffinityGiftSendReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public CharAffinityGiftSendReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public CharAffinityGiftSendReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAffinityGiftSendReq)) { + return false; + } + CharAffinityGiftSendReq other = (CharAffinityGiftSendReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAffinityGiftSendReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public CharAffinityGiftSendReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAffinityGiftSendReq clone() { + return new CharAffinityGiftSendReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAffinityGiftSendReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAffinityGiftSendReq(), data).checkInitialized(); + } + + public static CharAffinityGiftSendReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinityGiftSendReq(), input).checkInitialized(); + } + + public static CharAffinityGiftSendReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinityGiftSendReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAffinityGiftSendReq messages + */ + public static MessageFactory getFactory() { + return CharAffinityGiftSendReqFactory.INSTANCE; + } + + private enum CharAffinityGiftSendReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAffinityGiftSendReq create() { + return CharAffinityGiftSendReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } + + /** + * Protobuf type {@code CharAffinityGiftSendResp} + */ + public static final class CharAffinityGiftSendResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 SendGiftCnt = 3; + */ + private int sendGiftCnt; + + /** + * optional .AffinityInfo Info = 1; + */ + private final Public.AffinityInfo info = Public.AffinityInfo.newInstance(); + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharAffinityGiftSendResp() { + } + + /** + * @return a new empty instance of {@code CharAffinityGiftSendResp} + */ + public static CharAffinityGiftSendResp newInstance() { + return new CharAffinityGiftSendResp(); + } + + /** + * optional uint32 SendGiftCnt = 3; + * @return whether the sendGiftCnt field is set + */ + public boolean hasSendGiftCnt() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 SendGiftCnt = 3; + * @return this + */ + public CharAffinityGiftSendResp clearSendGiftCnt() { + bitField0_ &= ~0x00000001; + sendGiftCnt = 0; + return this; + } + + /** + * optional uint32 SendGiftCnt = 3; + * @return the sendGiftCnt + */ + public int getSendGiftCnt() { + return sendGiftCnt; + } + + /** + * optional uint32 SendGiftCnt = 3; + * @param value the sendGiftCnt to set + * @return this + */ + public CharAffinityGiftSendResp setSendGiftCnt(final int value) { + bitField0_ |= 0x00000001; + sendGiftCnt = value; + return this; + } + + /** + * optional .AffinityInfo Info = 1; + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .AffinityInfo Info = 1; + * @return this + */ + public CharAffinityGiftSendResp clearInfo() { + bitField0_ &= ~0x00000002; + info.clear(); + return this; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AffinityInfo getInfo() { + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AffinityInfo getMutableInfo() { + bitField0_ |= 0x00000002; + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * @param value the info to set + * @return this + */ + public CharAffinityGiftSendResp setInfo(final Public.AffinityInfo value) { + bitField0_ |= 0x00000002; + info.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public CharAffinityGiftSendResp clearChange() { + bitField0_ &= ~0x00000004; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000004; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public CharAffinityGiftSendResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000004; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAffinityGiftSendResp clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAffinityGiftSendResp addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAffinityGiftSendResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAffinityGiftSendResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharAffinityGiftSendResp copyFrom(final CharAffinityGiftSendResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + sendGiftCnt = other.sendGiftCnt; + info.copyFrom(other.info); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinityGiftSendResp mergeFrom(final CharAffinityGiftSendResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSendGiftCnt()) { + setSendGiftCnt(other.sendGiftCnt); + } + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinityGiftSendResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + sendGiftCnt = 0; + info.clear(); + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharAffinityGiftSendResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAffinityGiftSendResp)) { + return false; + } + CharAffinityGiftSendResp other = (CharAffinityGiftSendResp) o; + return bitField0_ == other.bitField0_ + && (!hasSendGiftCnt() || sendGiftCnt == other.sendGiftCnt) + && (!hasInfo() || info.equals(other.info)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(sendGiftCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sendGiftCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAffinityGiftSendResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // sendGiftCnt + sendGiftCnt = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // info + input.readMessage(info); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.sendGiftCnt, sendGiftCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharAffinityGiftSendResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1431779665: { + if (input.isAtField(FieldNames.sendGiftCnt)) { + if (!input.trySkipNullValue()) { + sendGiftCnt = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAffinityGiftSendResp clone() { + return new CharAffinityGiftSendResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAffinityGiftSendResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAffinityGiftSendResp(), data).checkInitialized(); + } + + public static CharAffinityGiftSendResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinityGiftSendResp(), input).checkInitialized(); + } + + public static CharAffinityGiftSendResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinityGiftSendResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAffinityGiftSendResp messages + */ + public static MessageFactory getFactory() { + return CharAffinityGiftSendRespFactory.INSTANCE; + } + + private enum CharAffinityGiftSendRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAffinityGiftSendResp create() { + return CharAffinityGiftSendResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName sendGiftCnt = FieldName.forField("SendGiftCnt"); + + static final FieldName info = FieldName.forField("Info"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharAffinityQusetRewardReceive.java b/src/generated/main/emu/nebula/proto/CharAffinityQusetRewardReceive.java new file mode 100644 index 0000000..ed7eaae --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharAffinityQusetRewardReceive.java @@ -0,0 +1,962 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharAffinityQusetRewardReceive { + /** + * Protobuf type {@code CharAffinityQuestRewardReceiveReq} + */ + public static final class CharAffinityQuestRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 QuestId = 2; + */ + private int questId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharAffinityQuestRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code CharAffinityQuestRewardReceiveReq} + */ + public static CharAffinityQuestRewardReceiveReq newInstance() { + return new CharAffinityQuestRewardReceiveReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharAffinityQuestRewardReceiveReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharAffinityQuestRewardReceiveReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 QuestId = 2; + * @return this + */ + public CharAffinityQuestRewardReceiveReq clearQuestId() { + bitField0_ &= ~0x00000002; + questId = 0; + return this; + } + + /** + * optional uint32 QuestId = 2; + * @return the questId + */ + public int getQuestId() { + return questId; + } + + /** + * optional uint32 QuestId = 2; + * @param value the questId to set + * @return this + */ + public CharAffinityQuestRewardReceiveReq setQuestId(final int value) { + bitField0_ |= 0x00000002; + questId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAffinityQuestRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAffinityQuestRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAffinityQuestRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAffinityQuestRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharAffinityQuestRewardReceiveReq copyFrom( + final CharAffinityQuestRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + questId = other.questId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinityQuestRewardReceiveReq mergeFrom( + final CharAffinityQuestRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasQuestId()) { + setQuestId(other.questId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinityQuestRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + questId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharAffinityQuestRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAffinityQuestRewardReceiveReq)) { + return false; + } + CharAffinityQuestRewardReceiveReq other = (CharAffinityQuestRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasQuestId() || questId == other.questId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAffinityQuestRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // questId + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharAffinityQuestRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1975187075: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAffinityQuestRewardReceiveReq clone() { + return new CharAffinityQuestRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAffinityQuestRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAffinityQuestRewardReceiveReq(), data).checkInitialized(); + } + + public static CharAffinityQuestRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharAffinityQuestRewardReceiveReq(), input).checkInitialized(); + } + + public static CharAffinityQuestRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharAffinityQuestRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAffinityQuestRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return CharAffinityQuestRewardReceiveReqFactory.INSTANCE; + } + + private enum CharAffinityQuestRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAffinityQuestRewardReceiveReq create() { + return CharAffinityQuestRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName questId = FieldName.forField("QuestId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharAffinityQuestRewardReceiveResp} + */ + public static final class CharAffinityQuestRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .AffinityInfo Info = 1; + */ + private final Public.AffinityInfo info = Public.AffinityInfo.newInstance(); + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharAffinityQuestRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code CharAffinityQuestRewardReceiveResp} + */ + public static CharAffinityQuestRewardReceiveResp newInstance() { + return new CharAffinityQuestRewardReceiveResp(); + } + + /** + * optional .AffinityInfo Info = 1; + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .AffinityInfo Info = 1; + * @return this + */ + public CharAffinityQuestRewardReceiveResp clearInfo() { + bitField0_ &= ~0x00000001; + info.clear(); + return this; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AffinityInfo getInfo() { + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AffinityInfo getMutableInfo() { + bitField0_ |= 0x00000001; + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * @param value the info to set + * @return this + */ + public CharAffinityQuestRewardReceiveResp setInfo(final Public.AffinityInfo value) { + bitField0_ |= 0x00000001; + info.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public CharAffinityQuestRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public CharAffinityQuestRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAffinityQuestRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAffinityQuestRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAffinityQuestRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAffinityQuestRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharAffinityQuestRewardReceiveResp copyFrom( + final CharAffinityQuestRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + info.copyFrom(other.info); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinityQuestRewardReceiveResp mergeFrom( + final CharAffinityQuestRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinityQuestRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clear(); + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharAffinityQuestRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAffinityQuestRewardReceiveResp)) { + return false; + } + CharAffinityQuestRewardReceiveResp other = (CharAffinityQuestRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasInfo() || info.equals(other.info)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAffinityQuestRewardReceiveResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // info + input.readMessage(info); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharAffinityQuestRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAffinityQuestRewardReceiveResp clone() { + return new CharAffinityQuestRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAffinityQuestRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAffinityQuestRewardReceiveResp(), data).checkInitialized(); + } + + public static CharAffinityQuestRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharAffinityQuestRewardReceiveResp(), input).checkInitialized(); + } + + public static CharAffinityQuestRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharAffinityQuestRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAffinityQuestRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return CharAffinityQuestRewardReceiveRespFactory.INSTANCE; + } + + private enum CharAffinityQuestRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAffinityQuestRewardReceiveResp create() { + return CharAffinityQuestRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName info = FieldName.forField("Info"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharArchive.java b/src/generated/main/emu/nebula/proto/CharArchive.java new file mode 100644 index 0000000..d44db56 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharArchive.java @@ -0,0 +1,384 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharArchive { + /** + * Protobuf type {@code CharArchiveRewardReceiveReq} + */ + public static final class CharArchiveRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ArchiveId = 1; + */ + private int archiveId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharArchiveRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code CharArchiveRewardReceiveReq} + */ + public static CharArchiveRewardReceiveReq newInstance() { + return new CharArchiveRewardReceiveReq(); + } + + /** + * optional uint32 ArchiveId = 1; + * @return whether the archiveId field is set + */ + public boolean hasArchiveId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ArchiveId = 1; + * @return this + */ + public CharArchiveRewardReceiveReq clearArchiveId() { + bitField0_ &= ~0x00000001; + archiveId = 0; + return this; + } + + /** + * optional uint32 ArchiveId = 1; + * @return the archiveId + */ + public int getArchiveId() { + return archiveId; + } + + /** + * optional uint32 ArchiveId = 1; + * @param value the archiveId to set + * @return this + */ + public CharArchiveRewardReceiveReq setArchiveId(final int value) { + bitField0_ |= 0x00000001; + archiveId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharArchiveRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharArchiveRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharArchiveRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharArchiveRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharArchiveRewardReceiveReq copyFrom(final CharArchiveRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + archiveId = other.archiveId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharArchiveRewardReceiveReq mergeFrom(final CharArchiveRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasArchiveId()) { + setArchiveId(other.archiveId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharArchiveRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + archiveId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharArchiveRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharArchiveRewardReceiveReq)) { + return false; + } + CharArchiveRewardReceiveReq other = (CharArchiveRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasArchiveId() || archiveId == other.archiveId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(archiveId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(archiveId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharArchiveRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // archiveId + archiveId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.archiveId, archiveId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharArchiveRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 338026845: { + if (input.isAtField(FieldNames.archiveId)) { + if (!input.trySkipNullValue()) { + archiveId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharArchiveRewardReceiveReq clone() { + return new CharArchiveRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharArchiveRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharArchiveRewardReceiveReq(), data).checkInitialized(); + } + + public static CharArchiveRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharArchiveRewardReceiveReq(), input).checkInitialized(); + } + + public static CharArchiveRewardReceiveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharArchiveRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharArchiveRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return CharArchiveRewardReceiveReqFactory.INSTANCE; + } + + private enum CharArchiveRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharArchiveRewardReceiveReq create() { + return CharArchiveRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName archiveId = FieldName.forField("ArchiveId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharDatingBranchASelect.java b/src/generated/main/emu/nebula/proto/CharDatingBranchASelect.java new file mode 100644 index 0000000..4051ac0 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharDatingBranchASelect.java @@ -0,0 +1,913 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class CharDatingBranchASelect { + /** + * Protobuf type {@code CharDatingBranchASelectReq} + */ + public static final class CharDatingBranchASelectReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 OptionId = 1; + */ + private int optionId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharDatingBranchASelectReq() { + } + + /** + * @return a new empty instance of {@code CharDatingBranchASelectReq} + */ + public static CharDatingBranchASelectReq newInstance() { + return new CharDatingBranchASelectReq(); + } + + /** + * optional uint32 OptionId = 1; + * @return whether the optionId field is set + */ + public boolean hasOptionId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 OptionId = 1; + * @return this + */ + public CharDatingBranchASelectReq clearOptionId() { + bitField0_ &= ~0x00000001; + optionId = 0; + return this; + } + + /** + * optional uint32 OptionId = 1; + * @return the optionId + */ + public int getOptionId() { + return optionId; + } + + /** + * optional uint32 OptionId = 1; + * @param value the optionId to set + * @return this + */ + public CharDatingBranchASelectReq setOptionId(final int value) { + bitField0_ |= 0x00000001; + optionId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingBranchASelectReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingBranchASelectReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingBranchASelectReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingBranchASelectReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharDatingBranchASelectReq copyFrom(final CharDatingBranchASelectReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + optionId = other.optionId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingBranchASelectReq mergeFrom(final CharDatingBranchASelectReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOptionId()) { + setOptionId(other.optionId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingBranchASelectReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + optionId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharDatingBranchASelectReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingBranchASelectReq)) { + return false; + } + CharDatingBranchASelectReq other = (CharDatingBranchASelectReq) o; + return bitField0_ == other.bitField0_ + && (!hasOptionId() || optionId == other.optionId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(optionId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(optionId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingBranchASelectReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // optionId + optionId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.optionId, optionId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharDatingBranchASelectReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -14373744: { + if (input.isAtField(FieldNames.optionId)) { + if (!input.trySkipNullValue()) { + optionId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingBranchASelectReq clone() { + return new CharDatingBranchASelectReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingBranchASelectReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingBranchASelectReq(), data).checkInitialized(); + } + + public static CharDatingBranchASelectReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchASelectReq(), input).checkInitialized(); + } + + public static CharDatingBranchASelectReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchASelectReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingBranchASelectReq messages + */ + public static MessageFactory getFactory() { + return CharDatingBranchASelectReqFactory.INSTANCE; + } + + private enum CharDatingBranchASelectReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingBranchASelectReq create() { + return CharDatingBranchASelectReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName optionId = FieldName.forField("OptionId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharDatingBranchASelectResp} + */ + public static final class CharDatingBranchASelectResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 LandmarkEventIds = 1; + */ + private final RepeatedInt landmarkEventIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 BranchBOptionIds = 2; + */ + private final RepeatedInt branchBOptionIds = RepeatedInt.newEmptyInstance(); + + private CharDatingBranchASelectResp() { + } + + /** + * @return a new empty instance of {@code CharDatingBranchASelectResp} + */ + public static CharDatingBranchASelectResp newInstance() { + return new CharDatingBranchASelectResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingBranchASelectResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingBranchASelectResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingBranchASelectResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingBranchASelectResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 LandmarkEventIds = 1; + * @return whether the landmarkEventIds field is set + */ + public boolean hasLandmarkEventIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 LandmarkEventIds = 1; + * @return this + */ + public CharDatingBranchASelectResp clearLandmarkEventIds() { + bitField0_ &= ~0x00000002; + landmarkEventIds.clear(); + return this; + } + + /** + * repeated uint32 LandmarkEventIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLandmarkEventIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getLandmarkEventIds() { + return landmarkEventIds; + } + + /** + * repeated uint32 LandmarkEventIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableLandmarkEventIds() { + bitField0_ |= 0x00000002; + return landmarkEventIds; + } + + /** + * repeated uint32 LandmarkEventIds = 1; + * @param value the landmarkEventIds to add + * @return this + */ + public CharDatingBranchASelectResp addLandmarkEventIds(final int value) { + bitField0_ |= 0x00000002; + landmarkEventIds.add(value); + return this; + } + + /** + * repeated uint32 LandmarkEventIds = 1; + * @param values the landmarkEventIds to add + * @return this + */ + public CharDatingBranchASelectResp addAllLandmarkEventIds(final int... values) { + bitField0_ |= 0x00000002; + landmarkEventIds.addAll(values); + return this; + } + + /** + * repeated uint32 BranchBOptionIds = 2; + * @return whether the branchBOptionIds field is set + */ + public boolean hasBranchBOptionIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 BranchBOptionIds = 2; + * @return this + */ + public CharDatingBranchASelectResp clearBranchBOptionIds() { + bitField0_ &= ~0x00000004; + branchBOptionIds.clear(); + return this; + } + + /** + * repeated uint32 BranchBOptionIds = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBranchBOptionIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getBranchBOptionIds() { + return branchBOptionIds; + } + + /** + * repeated uint32 BranchBOptionIds = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableBranchBOptionIds() { + bitField0_ |= 0x00000004; + return branchBOptionIds; + } + + /** + * repeated uint32 BranchBOptionIds = 2; + * @param value the branchBOptionIds to add + * @return this + */ + public CharDatingBranchASelectResp addBranchBOptionIds(final int value) { + bitField0_ |= 0x00000004; + branchBOptionIds.add(value); + return this; + } + + /** + * repeated uint32 BranchBOptionIds = 2; + * @param values the branchBOptionIds to add + * @return this + */ + public CharDatingBranchASelectResp addAllBranchBOptionIds(final int... values) { + bitField0_ |= 0x00000004; + branchBOptionIds.addAll(values); + return this; + } + + @Override + public CharDatingBranchASelectResp copyFrom(final CharDatingBranchASelectResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + landmarkEventIds.copyFrom(other.landmarkEventIds); + branchBOptionIds.copyFrom(other.branchBOptionIds); + } + return this; + } + + @Override + public CharDatingBranchASelectResp mergeFrom(final CharDatingBranchASelectResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasLandmarkEventIds()) { + getMutableLandmarkEventIds().addAll(other.landmarkEventIds); + } + if (other.hasBranchBOptionIds()) { + getMutableBranchBOptionIds().addAll(other.branchBOptionIds); + } + return this; + } + + @Override + public CharDatingBranchASelectResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + landmarkEventIds.clear(); + branchBOptionIds.clear(); + return this; + } + + @Override + public CharDatingBranchASelectResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + landmarkEventIds.clear(); + branchBOptionIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingBranchASelectResp)) { + return false; + } + CharDatingBranchASelectResp other = (CharDatingBranchASelectResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasLandmarkEventIds() || landmarkEventIds.equals(other.landmarkEventIds)) + && (!hasBranchBOptionIds() || branchBOptionIds.equals(other.branchBOptionIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < landmarkEventIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(landmarkEventIds.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < branchBOptionIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(branchBOptionIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * landmarkEventIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(landmarkEventIds); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * branchBOptionIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(branchBOptionIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingBranchASelectResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // landmarkEventIds [packed=true] + input.readPackedUInt32(landmarkEventIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // branchBOptionIds [packed=true] + input.readPackedUInt32(branchBOptionIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // landmarkEventIds [packed=false] + tag = input.readRepeatedUInt32(landmarkEventIds, tag); + bitField0_ |= 0x00000002; + break; + } + case 16: { + // branchBOptionIds [packed=false] + tag = input.readRepeatedUInt32(branchBOptionIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.landmarkEventIds, landmarkEventIds); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.branchBOptionIds, branchBOptionIds); + } + output.endObject(); + } + + @Override + public CharDatingBranchASelectResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1024194250: { + if (input.isAtField(FieldNames.landmarkEventIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(landmarkEventIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1818077405: { + if (input.isAtField(FieldNames.branchBOptionIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(branchBOptionIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingBranchASelectResp clone() { + return new CharDatingBranchASelectResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingBranchASelectResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingBranchASelectResp(), data).checkInitialized(); + } + + public static CharDatingBranchASelectResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchASelectResp(), input).checkInitialized(); + } + + public static CharDatingBranchASelectResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchASelectResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingBranchASelectResp messages + */ + public static MessageFactory getFactory() { + return CharDatingBranchASelectRespFactory.INSTANCE; + } + + private enum CharDatingBranchASelectRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingBranchASelectResp create() { + return CharDatingBranchASelectResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName landmarkEventIds = FieldName.forField("LandmarkEventIds"); + + static final FieldName branchBOptionIds = FieldName.forField("BranchBOptionIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharDatingBranchBSelect.java b/src/generated/main/emu/nebula/proto/CharDatingBranchBSelect.java new file mode 100644 index 0000000..eb08fe6 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharDatingBranchBSelect.java @@ -0,0 +1,1034 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharDatingBranchBSelect { + /** + * Protobuf type {@code CharDatingBranchBSelectReq} + */ + public static final class CharDatingBranchBSelectReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 OptionId = 1; + */ + private int optionId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharDatingBranchBSelectReq() { + } + + /** + * @return a new empty instance of {@code CharDatingBranchBSelectReq} + */ + public static CharDatingBranchBSelectReq newInstance() { + return new CharDatingBranchBSelectReq(); + } + + /** + * optional uint32 OptionId = 1; + * @return whether the optionId field is set + */ + public boolean hasOptionId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 OptionId = 1; + * @return this + */ + public CharDatingBranchBSelectReq clearOptionId() { + bitField0_ &= ~0x00000001; + optionId = 0; + return this; + } + + /** + * optional uint32 OptionId = 1; + * @return the optionId + */ + public int getOptionId() { + return optionId; + } + + /** + * optional uint32 OptionId = 1; + * @param value the optionId to set + * @return this + */ + public CharDatingBranchBSelectReq setOptionId(final int value) { + bitField0_ |= 0x00000001; + optionId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingBranchBSelectReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingBranchBSelectReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingBranchBSelectReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingBranchBSelectReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharDatingBranchBSelectReq copyFrom(final CharDatingBranchBSelectReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + optionId = other.optionId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingBranchBSelectReq mergeFrom(final CharDatingBranchBSelectReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOptionId()) { + setOptionId(other.optionId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingBranchBSelectReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + optionId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharDatingBranchBSelectReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingBranchBSelectReq)) { + return false; + } + CharDatingBranchBSelectReq other = (CharDatingBranchBSelectReq) o; + return bitField0_ == other.bitField0_ + && (!hasOptionId() || optionId == other.optionId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(optionId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(optionId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingBranchBSelectReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // optionId + optionId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.optionId, optionId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharDatingBranchBSelectReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -14373744: { + if (input.isAtField(FieldNames.optionId)) { + if (!input.trySkipNullValue()) { + optionId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingBranchBSelectReq clone() { + return new CharDatingBranchBSelectReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingBranchBSelectReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingBranchBSelectReq(), data).checkInitialized(); + } + + public static CharDatingBranchBSelectReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchBSelectReq(), input).checkInitialized(); + } + + public static CharDatingBranchBSelectReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchBSelectReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingBranchBSelectReq messages + */ + public static MessageFactory getFactory() { + return CharDatingBranchBSelectReqFactory.INSTANCE; + } + + private enum CharDatingBranchBSelectReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingBranchBSelectReq create() { + return CharDatingBranchBSelectReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName optionId = FieldName.forField("OptionId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharDatingBranchBSelectResp} + */ + public static final class CharDatingBranchBSelectResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharacterEventId = 1; + */ + private int characterEventId; + + /** + * optional uint32 AfterBranchId = 2; + */ + private int afterBranchId; + + /** + * optional .AffinityInfo Info = 7; + */ + private final Public.AffinityInfo info = Public.AffinityInfo.newInstance(); + + /** + * optional .ChangeInfo Change = 8; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharDatingBranchBSelectResp() { + } + + /** + * @return a new empty instance of {@code CharDatingBranchBSelectResp} + */ + public static CharDatingBranchBSelectResp newInstance() { + return new CharDatingBranchBSelectResp(); + } + + /** + * optional uint32 CharacterEventId = 1; + * @return whether the characterEventId field is set + */ + public boolean hasCharacterEventId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharacterEventId = 1; + * @return this + */ + public CharDatingBranchBSelectResp clearCharacterEventId() { + bitField0_ &= ~0x00000001; + characterEventId = 0; + return this; + } + + /** + * optional uint32 CharacterEventId = 1; + * @return the characterEventId + */ + public int getCharacterEventId() { + return characterEventId; + } + + /** + * optional uint32 CharacterEventId = 1; + * @param value the characterEventId to set + * @return this + */ + public CharDatingBranchBSelectResp setCharacterEventId(final int value) { + bitField0_ |= 0x00000001; + characterEventId = value; + return this; + } + + /** + * optional uint32 AfterBranchId = 2; + * @return whether the afterBranchId field is set + */ + public boolean hasAfterBranchId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 AfterBranchId = 2; + * @return this + */ + public CharDatingBranchBSelectResp clearAfterBranchId() { + bitField0_ &= ~0x00000002; + afterBranchId = 0; + return this; + } + + /** + * optional uint32 AfterBranchId = 2; + * @return the afterBranchId + */ + public int getAfterBranchId() { + return afterBranchId; + } + + /** + * optional uint32 AfterBranchId = 2; + * @param value the afterBranchId to set + * @return this + */ + public CharDatingBranchBSelectResp setAfterBranchId(final int value) { + bitField0_ |= 0x00000002; + afterBranchId = value; + return this; + } + + /** + * optional .AffinityInfo Info = 7; + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .AffinityInfo Info = 7; + * @return this + */ + public CharDatingBranchBSelectResp clearInfo() { + bitField0_ &= ~0x00000004; + info.clear(); + return this; + } + + /** + * optional .AffinityInfo Info = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AffinityInfo getInfo() { + return info; + } + + /** + * optional .AffinityInfo Info = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AffinityInfo getMutableInfo() { + bitField0_ |= 0x00000004; + return info; + } + + /** + * optional .AffinityInfo Info = 7; + * @param value the info to set + * @return this + */ + public CharDatingBranchBSelectResp setInfo(final Public.AffinityInfo value) { + bitField0_ |= 0x00000004; + info.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo Change = 8; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .ChangeInfo Change = 8; + * @return this + */ + public CharDatingBranchBSelectResp clearChange() { + bitField0_ &= ~0x00000008; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000008; + return change; + } + + /** + * optional .ChangeInfo Change = 8; + * @param value the change to set + * @return this + */ + public CharDatingBranchBSelectResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000008; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingBranchBSelectResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingBranchBSelectResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingBranchBSelectResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingBranchBSelectResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharDatingBranchBSelectResp copyFrom(final CharDatingBranchBSelectResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + characterEventId = other.characterEventId; + afterBranchId = other.afterBranchId; + info.copyFrom(other.info); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingBranchBSelectResp mergeFrom(final CharDatingBranchBSelectResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharacterEventId()) { + setCharacterEventId(other.characterEventId); + } + if (other.hasAfterBranchId()) { + setAfterBranchId(other.afterBranchId); + } + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingBranchBSelectResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + characterEventId = 0; + afterBranchId = 0; + info.clear(); + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharDatingBranchBSelectResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingBranchBSelectResp)) { + return false; + } + CharDatingBranchBSelectResp other = (CharDatingBranchBSelectResp) o; + return bitField0_ == other.bitField0_ + && (!hasCharacterEventId() || characterEventId == other.characterEventId) + && (!hasAfterBranchId() || afterBranchId == other.afterBranchId) + && (!hasInfo() || info.equals(other.info)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(characterEventId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(afterBranchId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(characterEventId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(afterBranchId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingBranchBSelectResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // characterEventId + characterEventId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // afterBranchId + afterBranchId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // info + input.readMessage(info); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // change + input.readMessage(change); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.characterEventId, characterEventId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.afterBranchId, afterBranchId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharDatingBranchBSelectResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1479355916: { + if (input.isAtField(FieldNames.characterEventId)) { + if (!input.trySkipNullValue()) { + characterEventId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2122888135: { + if (input.isAtField(FieldNames.afterBranchId)) { + if (!input.trySkipNullValue()) { + afterBranchId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingBranchBSelectResp clone() { + return new CharDatingBranchBSelectResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingBranchBSelectResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingBranchBSelectResp(), data).checkInitialized(); + } + + public static CharDatingBranchBSelectResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchBSelectResp(), input).checkInitialized(); + } + + public static CharDatingBranchBSelectResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingBranchBSelectResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingBranchBSelectResp messages + */ + public static MessageFactory getFactory() { + return CharDatingBranchBSelectRespFactory.INSTANCE; + } + + private enum CharDatingBranchBSelectRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingBranchBSelectResp create() { + return CharDatingBranchBSelectResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName characterEventId = FieldName.forField("CharacterEventId"); + + static final FieldName afterBranchId = FieldName.forField("AfterBranchId"); + + static final FieldName info = FieldName.forField("Info"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharDatingEventRewardReceive.java b/src/generated/main/emu/nebula/proto/CharDatingEventRewardReceive.java new file mode 100644 index 0000000..ae0cef5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharDatingEventRewardReceive.java @@ -0,0 +1,465 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharDatingEventRewardReceive { + /** + * Protobuf type {@code CharDatingEventRewardReceiveReq} + */ + public static final class CharDatingEventRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 EventId = 2; + */ + private int eventId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharDatingEventRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code CharDatingEventRewardReceiveReq} + */ + public static CharDatingEventRewardReceiveReq newInstance() { + return new CharDatingEventRewardReceiveReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharDatingEventRewardReceiveReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharDatingEventRewardReceiveReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 EventId = 2; + * @return whether the eventId field is set + */ + public boolean hasEventId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 EventId = 2; + * @return this + */ + public CharDatingEventRewardReceiveReq clearEventId() { + bitField0_ &= ~0x00000002; + eventId = 0; + return this; + } + + /** + * optional uint32 EventId = 2; + * @return the eventId + */ + public int getEventId() { + return eventId; + } + + /** + * optional uint32 EventId = 2; + * @param value the eventId to set + * @return this + */ + public CharDatingEventRewardReceiveReq setEventId(final int value) { + bitField0_ |= 0x00000002; + eventId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingEventRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingEventRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingEventRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingEventRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharDatingEventRewardReceiveReq copyFrom(final CharDatingEventRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + eventId = other.eventId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingEventRewardReceiveReq mergeFrom(final CharDatingEventRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasEventId()) { + setEventId(other.eventId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingEventRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + eventId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharDatingEventRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingEventRewardReceiveReq)) { + return false; + } + CharDatingEventRewardReceiveReq other = (CharDatingEventRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasEventId() || eventId == other.eventId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(eventId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(eventId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingEventRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // eventId + eventId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.eventId, eventId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharDatingEventRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 288150837: { + if (input.isAtField(FieldNames.eventId)) { + if (!input.trySkipNullValue()) { + eventId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingEventRewardReceiveReq clone() { + return new CharDatingEventRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingEventRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingEventRewardReceiveReq(), data).checkInitialized(); + } + + public static CharDatingEventRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharDatingEventRewardReceiveReq(), input).checkInitialized(); + } + + public static CharDatingEventRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharDatingEventRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingEventRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return CharDatingEventRewardReceiveReqFactory.INSTANCE; + } + + private enum CharDatingEventRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingEventRewardReceiveReq create() { + return CharDatingEventRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName eventId = FieldName.forField("EventId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharDatingGiftSend.java b/src/generated/main/emu/nebula/proto/CharDatingGiftSend.java new file mode 100644 index 0000000..bdfed17 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharDatingGiftSend.java @@ -0,0 +1,1100 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class CharDatingGiftSend { + /** + * Protobuf type {@code CharDatingGiftSendReq} + */ + public static final class CharDatingGiftSendReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Items = 2; + */ + private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private CharDatingGiftSendReq() { + } + + /** + * @return a new empty instance of {@code CharDatingGiftSendReq} + */ + public static CharDatingGiftSendReq newInstance() { + return new CharDatingGiftSendReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharDatingGiftSendReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharDatingGiftSendReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingGiftSendReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingGiftSendReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingGiftSendReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingGiftSendReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Items = 2; + * @return this + */ + public CharDatingGiftSendReq clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getItems() { + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * @param value the items to add + * @return this + */ + public CharDatingGiftSendReq addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @param values the items to add + * @return this + */ + public CharDatingGiftSendReq addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + @Override + public CharDatingGiftSendReq copyFrom(final CharDatingGiftSendReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public CharDatingGiftSendReq mergeFrom(final CharDatingGiftSendReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public CharDatingGiftSendReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public CharDatingGiftSendReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingGiftSendReq)) { + return false; + } + CharDatingGiftSendReq other = (CharDatingGiftSendReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingGiftSendReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public CharDatingGiftSendReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingGiftSendReq clone() { + return new CharDatingGiftSendReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingGiftSendReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingGiftSendReq(), data).checkInitialized(); + } + + public static CharDatingGiftSendReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingGiftSendReq(), input).checkInitialized(); + } + + public static CharDatingGiftSendReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingGiftSendReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingGiftSendReq messages + */ + public static MessageFactory getFactory() { + return CharDatingGiftSendReqFactory.INSTANCE; + } + + private enum CharDatingGiftSendReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingGiftSendReq create() { + return CharDatingGiftSendReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } + + /** + * Protobuf type {@code CharDatingGiftSendResp} + */ + public static final class CharDatingGiftSendResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .AffinityInfo Info = 1; + */ + private final Public.AffinityInfo info = Public.AffinityInfo.newInstance(); + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Show = 3; + */ + private final RepeatedMessage show = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private CharDatingGiftSendResp() { + } + + /** + * @return a new empty instance of {@code CharDatingGiftSendResp} + */ + public static CharDatingGiftSendResp newInstance() { + return new CharDatingGiftSendResp(); + } + + /** + * optional .AffinityInfo Info = 1; + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .AffinityInfo Info = 1; + * @return this + */ + public CharDatingGiftSendResp clearInfo() { + bitField0_ &= ~0x00000001; + info.clear(); + return this; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AffinityInfo getInfo() { + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AffinityInfo getMutableInfo() { + bitField0_ |= 0x00000001; + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * @param value the info to set + * @return this + */ + public CharDatingGiftSendResp setInfo(final Public.AffinityInfo value) { + bitField0_ |= 0x00000001; + info.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public CharDatingGiftSendResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public CharDatingGiftSendResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingGiftSendResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingGiftSendResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingGiftSendResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingGiftSendResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Show = 3; + * @return whether the show field is set + */ + public boolean hasShow() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .ItemTpl Show = 3; + * @return this + */ + public CharDatingGiftSendResp clearShow() { + bitField0_ &= ~0x00000008; + show.clear(); + return this; + } + + /** + * repeated .ItemTpl Show = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShow()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getShow() { + return show; + } + + /** + * repeated .ItemTpl Show = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableShow() { + bitField0_ |= 0x00000008; + return show; + } + + /** + * repeated .ItemTpl Show = 3; + * @param value the show to add + * @return this + */ + public CharDatingGiftSendResp addShow(final Public.ItemTpl value) { + bitField0_ |= 0x00000008; + show.add(value); + return this; + } + + /** + * repeated .ItemTpl Show = 3; + * @param values the show to add + * @return this + */ + public CharDatingGiftSendResp addAllShow(final Public.ItemTpl... values) { + bitField0_ |= 0x00000008; + show.addAll(values); + return this; + } + + @Override + public CharDatingGiftSendResp copyFrom(final CharDatingGiftSendResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + info.copyFrom(other.info); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + show.copyFrom(other.show); + } + return this; + } + + @Override + public CharDatingGiftSendResp mergeFrom(final CharDatingGiftSendResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShow()) { + getMutableShow().addAll(other.show); + } + return this; + } + + @Override + public CharDatingGiftSendResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clear(); + change.clear(); + nextPackage.clear(); + show.clear(); + return this; + } + + @Override + public CharDatingGiftSendResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + show.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingGiftSendResp)) { + return false; + } + CharDatingGiftSendResp other = (CharDatingGiftSendResp) o; + return bitField0_ == other.bitField0_ + && (!hasInfo() || info.equals(other.info)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShow() || show.equals(other.show)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < show.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(show.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * show.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(show); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingGiftSendResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // info + input.readMessage(info); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // show + tag = input.readRepeatedMessage(show, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.show, show); + } + output.endObject(); + } + + @Override + public CharDatingGiftSendResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576157: { + if (input.isAtField(FieldNames.show)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(show); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingGiftSendResp clone() { + return new CharDatingGiftSendResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingGiftSendResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingGiftSendResp(), data).checkInitialized(); + } + + public static CharDatingGiftSendResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingGiftSendResp(), input).checkInitialized(); + } + + public static CharDatingGiftSendResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingGiftSendResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingGiftSendResp messages + */ + public static MessageFactory getFactory() { + return CharDatingGiftSendRespFactory.INSTANCE; + } + + private enum CharDatingGiftSendRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingGiftSendResp create() { + return CharDatingGiftSendResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName info = FieldName.forField("Info"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName show = FieldName.forField("Show"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharDatingLandmarkSelect.java b/src/generated/main/emu/nebula/proto/CharDatingLandmarkSelect.java new file mode 100644 index 0000000..68b41db --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharDatingLandmarkSelect.java @@ -0,0 +1,1157 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class CharDatingLandmarkSelect { + /** + * Protobuf type {@code CharDatingLandmarkSelectReq} + */ + public static final class CharDatingLandmarkSelectReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 LandmarkId = 2; + */ + private int landmarkId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharDatingLandmarkSelectReq() { + } + + /** + * @return a new empty instance of {@code CharDatingLandmarkSelectReq} + */ + public static CharDatingLandmarkSelectReq newInstance() { + return new CharDatingLandmarkSelectReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharDatingLandmarkSelectReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharDatingLandmarkSelectReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 LandmarkId = 2; + * @return whether the landmarkId field is set + */ + public boolean hasLandmarkId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 LandmarkId = 2; + * @return this + */ + public CharDatingLandmarkSelectReq clearLandmarkId() { + bitField0_ &= ~0x00000002; + landmarkId = 0; + return this; + } + + /** + * optional uint32 LandmarkId = 2; + * @return the landmarkId + */ + public int getLandmarkId() { + return landmarkId; + } + + /** + * optional uint32 LandmarkId = 2; + * @param value the landmarkId to set + * @return this + */ + public CharDatingLandmarkSelectReq setLandmarkId(final int value) { + bitField0_ |= 0x00000002; + landmarkId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingLandmarkSelectReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingLandmarkSelectReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingLandmarkSelectReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingLandmarkSelectReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharDatingLandmarkSelectReq copyFrom(final CharDatingLandmarkSelectReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + landmarkId = other.landmarkId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingLandmarkSelectReq mergeFrom(final CharDatingLandmarkSelectReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasLandmarkId()) { + setLandmarkId(other.landmarkId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharDatingLandmarkSelectReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + landmarkId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharDatingLandmarkSelectReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingLandmarkSelectReq)) { + return false; + } + CharDatingLandmarkSelectReq other = (CharDatingLandmarkSelectReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasLandmarkId() || landmarkId == other.landmarkId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(landmarkId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(landmarkId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingLandmarkSelectReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // landmarkId + landmarkId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.landmarkId, landmarkId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharDatingLandmarkSelectReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1074224493: { + if (input.isAtField(FieldNames.landmarkId)) { + if (!input.trySkipNullValue()) { + landmarkId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingLandmarkSelectReq clone() { + return new CharDatingLandmarkSelectReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingLandmarkSelectReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingLandmarkSelectReq(), data).checkInitialized(); + } + + public static CharDatingLandmarkSelectReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharDatingLandmarkSelectReq(), input).checkInitialized(); + } + + public static CharDatingLandmarkSelectReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharDatingLandmarkSelectReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingLandmarkSelectReq messages + */ + public static MessageFactory getFactory() { + return CharDatingLandmarkSelectReqFactory.INSTANCE; + } + + private enum CharDatingLandmarkSelectReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingLandmarkSelectReq create() { + return CharDatingLandmarkSelectReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName landmarkId = FieldName.forField("LandmarkId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharDatingLandmarkSelectResp} + */ + public static final class CharDatingLandmarkSelectResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 BeforeBranchId = 1; + */ + private int beforeBranchId; + + /** + * optional .AffinityInfo Info = 7; + */ + private final Public.AffinityInfo info = Public.AffinityInfo.newInstance(); + + /** + * optional .ChangeInfo Change = 8; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 BranchAOptionIds = 2; + */ + private final RepeatedInt branchAOptionIds = RepeatedInt.newEmptyInstance(); + + private CharDatingLandmarkSelectResp() { + } + + /** + * @return a new empty instance of {@code CharDatingLandmarkSelectResp} + */ + public static CharDatingLandmarkSelectResp newInstance() { + return new CharDatingLandmarkSelectResp(); + } + + /** + * optional uint32 BeforeBranchId = 1; + * @return whether the beforeBranchId field is set + */ + public boolean hasBeforeBranchId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 BeforeBranchId = 1; + * @return this + */ + public CharDatingLandmarkSelectResp clearBeforeBranchId() { + bitField0_ &= ~0x00000001; + beforeBranchId = 0; + return this; + } + + /** + * optional uint32 BeforeBranchId = 1; + * @return the beforeBranchId + */ + public int getBeforeBranchId() { + return beforeBranchId; + } + + /** + * optional uint32 BeforeBranchId = 1; + * @param value the beforeBranchId to set + * @return this + */ + public CharDatingLandmarkSelectResp setBeforeBranchId(final int value) { + bitField0_ |= 0x00000001; + beforeBranchId = value; + return this; + } + + /** + * optional .AffinityInfo Info = 7; + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .AffinityInfo Info = 7; + * @return this + */ + public CharDatingLandmarkSelectResp clearInfo() { + bitField0_ &= ~0x00000002; + info.clear(); + return this; + } + + /** + * optional .AffinityInfo Info = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AffinityInfo getInfo() { + return info; + } + + /** + * optional .AffinityInfo Info = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AffinityInfo getMutableInfo() { + bitField0_ |= 0x00000002; + return info; + } + + /** + * optional .AffinityInfo Info = 7; + * @param value the info to set + * @return this + */ + public CharDatingLandmarkSelectResp setInfo(final Public.AffinityInfo value) { + bitField0_ |= 0x00000002; + info.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo Change = 8; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .ChangeInfo Change = 8; + * @return this + */ + public CharDatingLandmarkSelectResp clearChange() { + bitField0_ &= ~0x00000004; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000004; + return change; + } + + /** + * optional .ChangeInfo Change = 8; + * @param value the change to set + * @return this + */ + public CharDatingLandmarkSelectResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000004; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharDatingLandmarkSelectResp clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharDatingLandmarkSelectResp addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharDatingLandmarkSelectResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharDatingLandmarkSelectResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 BranchAOptionIds = 2; + * @return whether the branchAOptionIds field is set + */ + public boolean hasBranchAOptionIds() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated uint32 BranchAOptionIds = 2; + * @return this + */ + public CharDatingLandmarkSelectResp clearBranchAOptionIds() { + bitField0_ &= ~0x00000010; + branchAOptionIds.clear(); + return this; + } + + /** + * repeated uint32 BranchAOptionIds = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBranchAOptionIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getBranchAOptionIds() { + return branchAOptionIds; + } + + /** + * repeated uint32 BranchAOptionIds = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableBranchAOptionIds() { + bitField0_ |= 0x00000010; + return branchAOptionIds; + } + + /** + * repeated uint32 BranchAOptionIds = 2; + * @param value the branchAOptionIds to add + * @return this + */ + public CharDatingLandmarkSelectResp addBranchAOptionIds(final int value) { + bitField0_ |= 0x00000010; + branchAOptionIds.add(value); + return this; + } + + /** + * repeated uint32 BranchAOptionIds = 2; + * @param values the branchAOptionIds to add + * @return this + */ + public CharDatingLandmarkSelectResp addAllBranchAOptionIds(final int... values) { + bitField0_ |= 0x00000010; + branchAOptionIds.addAll(values); + return this; + } + + @Override + public CharDatingLandmarkSelectResp copyFrom(final CharDatingLandmarkSelectResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + beforeBranchId = other.beforeBranchId; + info.copyFrom(other.info); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + branchAOptionIds.copyFrom(other.branchAOptionIds); + } + return this; + } + + @Override + public CharDatingLandmarkSelectResp mergeFrom(final CharDatingLandmarkSelectResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBeforeBranchId()) { + setBeforeBranchId(other.beforeBranchId); + } + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBranchAOptionIds()) { + getMutableBranchAOptionIds().addAll(other.branchAOptionIds); + } + return this; + } + + @Override + public CharDatingLandmarkSelectResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + beforeBranchId = 0; + info.clear(); + change.clear(); + nextPackage.clear(); + branchAOptionIds.clear(); + return this; + } + + @Override + public CharDatingLandmarkSelectResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + branchAOptionIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharDatingLandmarkSelectResp)) { + return false; + } + CharDatingLandmarkSelectResp other = (CharDatingLandmarkSelectResp) o; + return bitField0_ == other.bitField0_ + && (!hasBeforeBranchId() || beforeBranchId == other.beforeBranchId) + && (!hasInfo() || info.equals(other.info)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBranchAOptionIds() || branchAOptionIds.equals(other.branchAOptionIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(beforeBranchId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < branchAOptionIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(branchAOptionIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(beforeBranchId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * branchAOptionIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(branchAOptionIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharDatingLandmarkSelectResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // beforeBranchId + beforeBranchId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // info + input.readMessage(info); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // change + input.readMessage(change); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // branchAOptionIds [packed=true] + input.readPackedUInt32(branchAOptionIds, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // branchAOptionIds [packed=false] + tag = input.readRepeatedUInt32(branchAOptionIds, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.beforeBranchId, beforeBranchId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.branchAOptionIds, branchAOptionIds); + } + output.endObject(); + } + + @Override + public CharDatingLandmarkSelectResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1054592796: { + if (input.isAtField(FieldNames.beforeBranchId)) { + if (!input.trySkipNullValue()) { + beforeBranchId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1621563900: { + if (input.isAtField(FieldNames.branchAOptionIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(branchAOptionIds); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharDatingLandmarkSelectResp clone() { + return new CharDatingLandmarkSelectResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharDatingLandmarkSelectResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharDatingLandmarkSelectResp(), data).checkInitialized(); + } + + public static CharDatingLandmarkSelectResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharDatingLandmarkSelectResp(), input).checkInitialized(); + } + + public static CharDatingLandmarkSelectResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharDatingLandmarkSelectResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharDatingLandmarkSelectResp messages + */ + public static MessageFactory getFactory() { + return CharDatingLandmarkSelectRespFactory.INSTANCE; + } + + private enum CharDatingLandmarkSelectRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharDatingLandmarkSelectResp create() { + return CharDatingLandmarkSelectResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName beforeBranchId = FieldName.forField("BeforeBranchId"); + + static final FieldName info = FieldName.forField("Info"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName branchAOptionIds = FieldName.forField("BranchAOptionIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemEquipGem.java b/src/generated/main/emu/nebula/proto/CharGemEquipGem.java new file mode 100644 index 0000000..8b087c4 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemEquipGem.java @@ -0,0 +1,623 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharGemEquipGem { + /** + * Protobuf type {@code CharGemEquipGemReq} + */ + public static final class CharGemEquipGemReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 GemIndex = 3; + */ + private int gemIndex; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 SlotId = 2; + */ + private int slotId; + + /** + * optional uint32 PresetId = 4; + */ + private int presetId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemEquipGemReq() { + } + + /** + * @return a new empty instance of {@code CharGemEquipGemReq} + */ + public static CharGemEquipGemReq newInstance() { + return new CharGemEquipGemReq(); + } + + /** + * optional int32 GemIndex = 3; + * @return whether the gemIndex field is set + */ + public boolean hasGemIndex() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 GemIndex = 3; + * @return this + */ + public CharGemEquipGemReq clearGemIndex() { + bitField0_ &= ~0x00000001; + gemIndex = 0; + return this; + } + + /** + * optional int32 GemIndex = 3; + * @return the gemIndex + */ + public int getGemIndex() { + return gemIndex; + } + + /** + * optional int32 GemIndex = 3; + * @param value the gemIndex to set + * @return this + */ + public CharGemEquipGemReq setGemIndex(final int value) { + bitField0_ |= 0x00000001; + gemIndex = value; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharGemEquipGemReq clearCharId() { + bitField0_ &= ~0x00000002; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharGemEquipGemReq setCharId(final int value) { + bitField0_ |= 0x00000002; + charId = value; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return whether the slotId field is set + */ + public boolean hasSlotId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 SlotId = 2; + * @return this + */ + public CharGemEquipGemReq clearSlotId() { + bitField0_ &= ~0x00000004; + slotId = 0; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return the slotId + */ + public int getSlotId() { + return slotId; + } + + /** + * optional uint32 SlotId = 2; + * @param value the slotId to set + * @return this + */ + public CharGemEquipGemReq setSlotId(final int value) { + bitField0_ |= 0x00000004; + slotId = value; + return this; + } + + /** + * optional uint32 PresetId = 4; + * @return whether the presetId field is set + */ + public boolean hasPresetId() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 PresetId = 4; + * @return this + */ + public CharGemEquipGemReq clearPresetId() { + bitField0_ &= ~0x00000008; + presetId = 0; + return this; + } + + /** + * optional uint32 PresetId = 4; + * @return the presetId + */ + public int getPresetId() { + return presetId; + } + + /** + * optional uint32 PresetId = 4; + * @param value the presetId to set + * @return this + */ + public CharGemEquipGemReq setPresetId(final int value) { + bitField0_ |= 0x00000008; + presetId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemEquipGemReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemEquipGemReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemEquipGemReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemEquipGemReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemEquipGemReq copyFrom(final CharGemEquipGemReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + gemIndex = other.gemIndex; + charId = other.charId; + slotId = other.slotId; + presetId = other.presetId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemEquipGemReq mergeFrom(final CharGemEquipGemReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGemIndex()) { + setGemIndex(other.gemIndex); + } + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasSlotId()) { + setSlotId(other.slotId); + } + if (other.hasPresetId()) { + setPresetId(other.presetId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemEquipGemReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + gemIndex = 0; + charId = 0; + slotId = 0; + presetId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharGemEquipGemReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemEquipGemReq)) { + return false; + } + CharGemEquipGemReq other = (CharGemEquipGemReq) o; + return bitField0_ == other.bitField0_ + && (!hasGemIndex() || gemIndex == other.gemIndex) + && (!hasCharId() || charId == other.charId) + && (!hasSlotId() || slotId == other.slotId) + && (!hasPresetId() || presetId == other.presetId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt32NoTag(gemIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(slotId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(presetId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(gemIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(slotId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(presetId); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemEquipGemReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // gemIndex + gemIndex = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // slotId + slotId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // presetId + presetId = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.gemIndex, gemIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.slotId, slotId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.presetId, presetId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemEquipGemReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1820411619: { + if (input.isAtField(FieldNames.gemIndex)) { + if (!input.trySkipNullValue()) { + gemIndex = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1815586855: { + if (input.isAtField(FieldNames.slotId)) { + if (!input.trySkipNullValue()) { + slotId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1212017542: { + if (input.isAtField(FieldNames.presetId)) { + if (!input.trySkipNullValue()) { + presetId = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemEquipGemReq clone() { + return new CharGemEquipGemReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemEquipGemReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemEquipGemReq(), data).checkInitialized(); + } + + public static CharGemEquipGemReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemEquipGemReq(), input).checkInitialized(); + } + + public static CharGemEquipGemReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemEquipGemReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemEquipGemReq messages + */ + public static MessageFactory getFactory() { + return CharGemEquipGemReqFactory.INSTANCE; + } + + private enum CharGemEquipGemReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemEquipGemReq create() { + return CharGemEquipGemReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName gemIndex = FieldName.forField("GemIndex"); + + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName slotId = FieldName.forField("SlotId"); + + static final FieldName presetId = FieldName.forField("PresetId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemGenerate.java b/src/generated/main/emu/nebula/proto/CharGemGenerate.java new file mode 100644 index 0000000..f326f2d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemGenerate.java @@ -0,0 +1,953 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharGemGenerate { + /** + * Protobuf type {@code CharGemGenerateReq} + */ + public static final class CharGemGenerateReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 SlotId = 2; + */ + private int slotId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemGenerateReq() { + } + + /** + * @return a new empty instance of {@code CharGemGenerateReq} + */ + public static CharGemGenerateReq newInstance() { + return new CharGemGenerateReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharGemGenerateReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharGemGenerateReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return whether the slotId field is set + */ + public boolean hasSlotId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 SlotId = 2; + * @return this + */ + public CharGemGenerateReq clearSlotId() { + bitField0_ &= ~0x00000002; + slotId = 0; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return the slotId + */ + public int getSlotId() { + return slotId; + } + + /** + * optional uint32 SlotId = 2; + * @param value the slotId to set + * @return this + */ + public CharGemGenerateReq setSlotId(final int value) { + bitField0_ |= 0x00000002; + slotId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemGenerateReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemGenerateReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemGenerateReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemGenerateReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemGenerateReq copyFrom(final CharGemGenerateReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + slotId = other.slotId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemGenerateReq mergeFrom(final CharGemGenerateReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasSlotId()) { + setSlotId(other.slotId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemGenerateReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + slotId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharGemGenerateReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemGenerateReq)) { + return false; + } + CharGemGenerateReq other = (CharGemGenerateReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasSlotId() || slotId == other.slotId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemGenerateReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // slotId + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.slotId, slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemGenerateReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1815586855: { + if (input.isAtField(FieldNames.slotId)) { + if (!input.trySkipNullValue()) { + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemGenerateReq clone() { + return new CharGemGenerateReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemGenerateReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemGenerateReq(), data).checkInitialized(); + } + + public static CharGemGenerateReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemGenerateReq(), input).checkInitialized(); + } + + public static CharGemGenerateReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemGenerateReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemGenerateReq messages + */ + public static MessageFactory getFactory() { + return CharGemGenerateReqFactory.INSTANCE; + } + + private enum CharGemGenerateReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemGenerateReq create() { + return CharGemGenerateReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName slotId = FieldName.forField("SlotId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharGemGenerateResp} + */ + public static final class CharGemGenerateResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .CharGem CharGem = 1; + */ + private final Public.CharGem charGem = Public.CharGem.newInstance(); + + /** + * optional .ChangeInfo ChangeInfo = 2; + */ + private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemGenerateResp() { + } + + /** + * @return a new empty instance of {@code CharGemGenerateResp} + */ + public static CharGemGenerateResp newInstance() { + return new CharGemGenerateResp(); + } + + /** + * optional .CharGem CharGem = 1; + * @return whether the charGem field is set + */ + public boolean hasCharGem() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .CharGem CharGem = 1; + * @return this + */ + public CharGemGenerateResp clearCharGem() { + bitField0_ &= ~0x00000001; + charGem.clear(); + return this; + } + + /** + * optional .CharGem CharGem = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGem()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.CharGem getCharGem() { + return charGem; + } + + /** + * optional .CharGem CharGem = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.CharGem getMutableCharGem() { + bitField0_ |= 0x00000001; + return charGem; + } + + /** + * optional .CharGem CharGem = 1; + * @param value the charGem to set + * @return this + */ + public CharGemGenerateResp setCharGem(final Public.CharGem value) { + bitField0_ |= 0x00000001; + charGem.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @return whether the changeInfo field is set + */ + public boolean hasChangeInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @return this + */ + public CharGemGenerateResp clearChangeInfo() { + bitField0_ &= ~0x00000002; + changeInfo.clear(); + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChangeInfo() { + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChangeInfo() { + bitField0_ |= 0x00000002; + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @param value the changeInfo to set + * @return this + */ + public CharGemGenerateResp setChangeInfo(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + changeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemGenerateResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemGenerateResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemGenerateResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemGenerateResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemGenerateResp copyFrom(final CharGemGenerateResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charGem.copyFrom(other.charGem); + changeInfo.copyFrom(other.changeInfo); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemGenerateResp mergeFrom(final CharGemGenerateResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharGem()) { + getMutableCharGem().mergeFrom(other.charGem); + } + if (other.hasChangeInfo()) { + getMutableChangeInfo().mergeFrom(other.changeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemGenerateResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charGem.clear(); + changeInfo.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharGemGenerateResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charGem.clearQuick(); + changeInfo.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemGenerateResp)) { + return false; + } + CharGemGenerateResp other = (CharGemGenerateResp) o; + return bitField0_ == other.bitField0_ + && (!hasCharGem() || charGem.equals(other.charGem)) + && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(charGem); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(changeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(charGem); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(changeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemGenerateResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // charGem + input.readMessage(charGem); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // changeInfo + input.readMessage(changeInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.charGem, charGem); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.changeInfo, changeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemGenerateResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1891281927: { + if (input.isAtField(FieldNames.charGem)) { + if (!input.trySkipNullValue()) { + input.readMessage(charGem); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -138776418: { + if (input.isAtField(FieldNames.changeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(changeInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemGenerateResp clone() { + return new CharGemGenerateResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemGenerateResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemGenerateResp(), data).checkInitialized(); + } + + public static CharGemGenerateResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemGenerateResp(), input).checkInitialized(); + } + + public static CharGemGenerateResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemGenerateResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemGenerateResp messages + */ + public static MessageFactory getFactory() { + return CharGemGenerateRespFactory.INSTANCE; + } + + private enum CharGemGenerateRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemGenerateResp create() { + return CharGemGenerateResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charGem = FieldName.forField("CharGem"); + + static final FieldName changeInfo = FieldName.forField("ChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemInstanceApply.java b/src/generated/main/emu/nebula/proto/CharGemInstanceApply.java new file mode 100644 index 0000000..5abdfb3 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemInstanceApply.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharGemInstanceApply { + /** + * Protobuf type {@code CharGemInstanceApplyReq} + */ + public static final class CharGemInstanceApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 2; + */ + private long buildId; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemInstanceApplyReq() { + } + + /** + * @return a new empty instance of {@code CharGemInstanceApplyReq} + */ + public static CharGemInstanceApplyReq newInstance() { + return new CharGemInstanceApplyReq(); + } + + /** + * optional uint64 BuildId = 2; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 2; + * @return this + */ + public CharGemInstanceApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 2; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 2; + * @param value the buildId to set + * @return this + */ + public CharGemInstanceApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public CharGemInstanceApplyReq clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public CharGemInstanceApplyReq setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemInstanceApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemInstanceApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemInstanceApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemInstanceApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemInstanceApplyReq copyFrom(final CharGemInstanceApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstanceApplyReq mergeFrom(final CharGemInstanceApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstanceApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharGemInstanceApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemInstanceApplyReq)) { + return false; + } + CharGemInstanceApplyReq other = (CharGemInstanceApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemInstanceApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemInstanceApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemInstanceApplyReq clone() { + return new CharGemInstanceApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemInstanceApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemInstanceApplyReq(), data).checkInitialized(); + } + + public static CharGemInstanceApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceApplyReq(), input).checkInitialized(); + } + + public static CharGemInstanceApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemInstanceApplyReq messages + */ + public static MessageFactory getFactory() { + return CharGemInstanceApplyReqFactory.INSTANCE; + } + + private enum CharGemInstanceApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemInstanceApplyReq create() { + return CharGemInstanceApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemInstanceSettle.java b/src/generated/main/emu/nebula/proto/CharGemInstanceSettle.java new file mode 100644 index 0000000..ecdbd42 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemInstanceSettle.java @@ -0,0 +1,1566 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class CharGemInstanceSettle { + /** + * Protobuf type {@code CharGemInstanceSettleReq} + */ + public static final class CharGemInstanceSettleReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Star = 1; + */ + private int star; + + /** + * optional .Events Events = 15; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemInstanceSettleReq() { + } + + /** + * @return a new empty instance of {@code CharGemInstanceSettleReq} + */ + public static CharGemInstanceSettleReq newInstance() { + return new CharGemInstanceSettleReq(); + } + + /** + * optional uint32 Star = 1; + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Star = 1; + * @return this + */ + public CharGemInstanceSettleReq clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * optional uint32 Star = 1; + * @return the star + */ + public int getStar() { + return star; + } + + /** + * optional uint32 Star = 1; + * @param value the star to set + * @return this + */ + public CharGemInstanceSettleReq setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * optional .Events Events = 15; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .Events Events = 15; + * @return this + */ + public CharGemInstanceSettleReq clearEvents() { + bitField0_ &= ~0x00000002; + events.clear(); + return this; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000002; + return events; + } + + /** + * optional .Events Events = 15; + * @param value the events to set + * @return this + */ + public CharGemInstanceSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000002; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemInstanceSettleReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemInstanceSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemInstanceSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemInstanceSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemInstanceSettleReq copyFrom(final CharGemInstanceSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstanceSettleReq mergeFrom(final CharGemInstanceSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstanceSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharGemInstanceSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemInstanceSettleReq)) { + return false; + } + CharGemInstanceSettleReq other = (CharGemInstanceSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemInstanceSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemInstanceSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemInstanceSettleReq clone() { + return new CharGemInstanceSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemInstanceSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemInstanceSettleReq(), data).checkInitialized(); + } + + public static CharGemInstanceSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSettleReq(), input).checkInitialized(); + } + + public static CharGemInstanceSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemInstanceSettleReq messages + */ + public static MessageFactory getFactory() { + return CharGemInstanceSettleReqFactory.INSTANCE; + } + + private enum CharGemInstanceSettleReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemInstanceSettleReq create() { + return CharGemInstanceSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharGemInstanceSettleResp} + */ + public static final class CharGemInstanceSettleResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Exp = 7; + */ + private int exp; + + /** + * optional bool First = 1; + */ + private boolean first; + + /** + * optional bool ThreeStar = 2; + */ + private boolean threeStar; + + /** + * optional .ChangeInfo Change = 3; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl AwardItems = 4; + */ + private final RepeatedMessage awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * repeated .ItemTpl FirstItems = 5; + */ + private final RepeatedMessage firstItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * repeated .ItemTpl ThreeStarItems = 6; + */ + private final RepeatedMessage threeStarItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * repeated .ItemTpl SurpriseItems = 8; + */ + private final RepeatedMessage surpriseItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private CharGemInstanceSettleResp() { + } + + /** + * @return a new empty instance of {@code CharGemInstanceSettleResp} + */ + public static CharGemInstanceSettleResp newInstance() { + return new CharGemInstanceSettleResp(); + } + + /** + * optional uint32 Exp = 7; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Exp = 7; + * @return this + */ + public CharGemInstanceSettleResp clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 7; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 7; + * @param value the exp to set + * @return this + */ + public CharGemInstanceSettleResp setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * optional bool First = 1; + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bool First = 1; + * @return this + */ + public CharGemInstanceSettleResp clearFirst() { + bitField0_ &= ~0x00000002; + first = false; + return this; + } + + /** + * optional bool First = 1; + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * optional bool First = 1; + * @param value the first to set + * @return this + */ + public CharGemInstanceSettleResp setFirst(final boolean value) { + bitField0_ |= 0x00000002; + first = value; + return this; + } + + /** + * optional bool ThreeStar = 2; + * @return whether the threeStar field is set + */ + public boolean hasThreeStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bool ThreeStar = 2; + * @return this + */ + public CharGemInstanceSettleResp clearThreeStar() { + bitField0_ &= ~0x00000004; + threeStar = false; + return this; + } + + /** + * optional bool ThreeStar = 2; + * @return the threeStar + */ + public boolean getThreeStar() { + return threeStar; + } + + /** + * optional bool ThreeStar = 2; + * @param value the threeStar to set + * @return this + */ + public CharGemInstanceSettleResp setThreeStar(final boolean value) { + bitField0_ |= 0x00000004; + threeStar = value; + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .ChangeInfo Change = 3; + * @return this + */ + public CharGemInstanceSettleResp clearChange() { + bitField0_ &= ~0x00000008; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000008; + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * @param value the change to set + * @return this + */ + public CharGemInstanceSettleResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000008; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemInstanceSettleResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemInstanceSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemInstanceSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemInstanceSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 4; + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * repeated .ItemTpl AwardItems = 4; + * @return this + */ + public CharGemInstanceSettleResp clearAwardItems() { + bitField0_ &= ~0x00000020; + awardItems.clear(); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getAwardItems() { + return awardItems; + } + + /** + * repeated .ItemTpl AwardItems = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableAwardItems() { + bitField0_ |= 0x00000020; + return awardItems; + } + + /** + * repeated .ItemTpl AwardItems = 4; + * @param value the awardItems to add + * @return this + */ + public CharGemInstanceSettleResp addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000020; + awardItems.add(value); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 4; + * @param values the awardItems to add + * @return this + */ + public CharGemInstanceSettleResp addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000020; + awardItems.addAll(values); + return this; + } + + /** + * repeated .ItemTpl FirstItems = 5; + * @return whether the firstItems field is set + */ + public boolean hasFirstItems() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * repeated .ItemTpl FirstItems = 5; + * @return this + */ + public CharGemInstanceSettleResp clearFirstItems() { + bitField0_ &= ~0x00000040; + firstItems.clear(); + return this; + } + + /** + * repeated .ItemTpl FirstItems = 5; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFirstItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFirstItems() { + return firstItems; + } + + /** + * repeated .ItemTpl FirstItems = 5; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFirstItems() { + bitField0_ |= 0x00000040; + return firstItems; + } + + /** + * repeated .ItemTpl FirstItems = 5; + * @param value the firstItems to add + * @return this + */ + public CharGemInstanceSettleResp addFirstItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000040; + firstItems.add(value); + return this; + } + + /** + * repeated .ItemTpl FirstItems = 5; + * @param values the firstItems to add + * @return this + */ + public CharGemInstanceSettleResp addAllFirstItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000040; + firstItems.addAll(values); + return this; + } + + /** + * repeated .ItemTpl ThreeStarItems = 6; + * @return whether the threeStarItems field is set + */ + public boolean hasThreeStarItems() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * repeated .ItemTpl ThreeStarItems = 6; + * @return this + */ + public CharGemInstanceSettleResp clearThreeStarItems() { + bitField0_ &= ~0x00000080; + threeStarItems.clear(); + return this; + } + + /** + * repeated .ItemTpl ThreeStarItems = 6; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableThreeStarItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getThreeStarItems() { + return threeStarItems; + } + + /** + * repeated .ItemTpl ThreeStarItems = 6; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableThreeStarItems() { + bitField0_ |= 0x00000080; + return threeStarItems; + } + + /** + * repeated .ItemTpl ThreeStarItems = 6; + * @param value the threeStarItems to add + * @return this + */ + public CharGemInstanceSettleResp addThreeStarItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000080; + threeStarItems.add(value); + return this; + } + + /** + * repeated .ItemTpl ThreeStarItems = 6; + * @param values the threeStarItems to add + * @return this + */ + public CharGemInstanceSettleResp addAllThreeStarItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000080; + threeStarItems.addAll(values); + return this; + } + + /** + * repeated .ItemTpl SurpriseItems = 8; + * @return whether the surpriseItems field is set + */ + public boolean hasSurpriseItems() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * repeated .ItemTpl SurpriseItems = 8; + * @return this + */ + public CharGemInstanceSettleResp clearSurpriseItems() { + bitField0_ &= ~0x00000100; + surpriseItems.clear(); + return this; + } + + /** + * repeated .ItemTpl SurpriseItems = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSurpriseItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getSurpriseItems() { + return surpriseItems; + } + + /** + * repeated .ItemTpl SurpriseItems = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableSurpriseItems() { + bitField0_ |= 0x00000100; + return surpriseItems; + } + + /** + * repeated .ItemTpl SurpriseItems = 8; + * @param value the surpriseItems to add + * @return this + */ + public CharGemInstanceSettleResp addSurpriseItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000100; + surpriseItems.add(value); + return this; + } + + /** + * repeated .ItemTpl SurpriseItems = 8; + * @param values the surpriseItems to add + * @return this + */ + public CharGemInstanceSettleResp addAllSurpriseItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000100; + surpriseItems.addAll(values); + return this; + } + + @Override + public CharGemInstanceSettleResp copyFrom(final CharGemInstanceSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + first = other.first; + threeStar = other.threeStar; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + firstItems.copyFrom(other.firstItems); + threeStarItems.copyFrom(other.threeStarItems); + surpriseItems.copyFrom(other.surpriseItems); + } + return this; + } + + @Override + public CharGemInstanceSettleResp mergeFrom(final CharGemInstanceSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasThreeStar()) { + setThreeStar(other.threeStar); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + if (other.hasFirstItems()) { + getMutableFirstItems().addAll(other.firstItems); + } + if (other.hasThreeStarItems()) { + getMutableThreeStarItems().addAll(other.threeStarItems); + } + if (other.hasSurpriseItems()) { + getMutableSurpriseItems().addAll(other.surpriseItems); + } + return this; + } + + @Override + public CharGemInstanceSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + first = false; + threeStar = false; + change.clear(); + nextPackage.clear(); + awardItems.clear(); + firstItems.clear(); + threeStarItems.clear(); + surpriseItems.clear(); + return this; + } + + @Override + public CharGemInstanceSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + awardItems.clearQuick(); + firstItems.clearQuick(); + threeStarItems.clearQuick(); + surpriseItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemInstanceSettleResp)) { + return false; + } + CharGemInstanceSettleResp other = (CharGemInstanceSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasFirst() || first == other.first) + && (!hasThreeStar() || threeStar == other.threeStar) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)) + && (!hasFirstItems() || firstItems.equals(other.firstItems)) + && (!hasThreeStarItems() || threeStarItems.equals(other.threeStarItems)) + && (!hasSurpriseItems() || surpriseItems.equals(other.surpriseItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(threeStar); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(awardItems.get(i)); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < firstItems.length(); i++) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(firstItems.get(i)); + } + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < threeStarItems.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(threeStarItems.get(i)); + } + } + if ((bitField0_ & 0x00000100) != 0) { + for (int i = 0; i < surpriseItems.length(); i++) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(surpriseItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * firstItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(firstItems); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * threeStarItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(threeStarItems); + } + if ((bitField0_ & 0x00000100) != 0) { + size += (1 * surpriseItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(surpriseItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemInstanceSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 56: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // first + first = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // threeStar + threeStar = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000020; + if (tag != 42) { + break; + } + } + case 42: { + // firstItems + tag = input.readRepeatedMessage(firstItems, tag); + bitField0_ |= 0x00000040; + if (tag != 50) { + break; + } + } + case 50: { + // threeStarItems + tag = input.readRepeatedMessage(threeStarItems, tag); + bitField0_ |= 0x00000080; + if (tag != 66) { + break; + } + } + case 66: { + // surpriseItems + tag = input.readRepeatedMessage(surpriseItems, tag); + bitField0_ |= 0x00000100; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.threeStar, threeStar); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.firstItems, firstItems); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedMessage(FieldNames.threeStarItems, threeStarItems); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.surpriseItems, surpriseItems); + } + output.endObject(); + } + + @Override + public CharGemInstanceSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 444940528: { + if (input.isAtField(FieldNames.threeStar)) { + if (!input.trySkipNullValue()) { + threeStar = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1812344592: { + if (input.isAtField(FieldNames.firstItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(firstItems); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2071409488: { + if (input.isAtField(FieldNames.threeStarItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(threeStarItems); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 477801015: { + if (input.isAtField(FieldNames.surpriseItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(surpriseItems); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemInstanceSettleResp clone() { + return new CharGemInstanceSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemInstanceSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemInstanceSettleResp(), data).checkInitialized(); + } + + public static CharGemInstanceSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSettleResp(), input).checkInitialized(); + } + + public static CharGemInstanceSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemInstanceSettleResp messages + */ + public static MessageFactory getFactory() { + return CharGemInstanceSettleRespFactory.INSTANCE; + } + + private enum CharGemInstanceSettleRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemInstanceSettleResp create() { + return CharGemInstanceSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName threeStar = FieldName.forField("ThreeStar"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + + static final FieldName firstItems = FieldName.forField("FirstItems"); + + static final FieldName threeStarItems = FieldName.forField("ThreeStarItems"); + + static final FieldName surpriseItems = FieldName.forField("SurpriseItems"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemInstanceSweep.java b/src/generated/main/emu/nebula/proto/CharGemInstanceSweep.java new file mode 100644 index 0000000..a691651 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemInstanceSweep.java @@ -0,0 +1,1548 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class CharGemInstanceSweep { + /** + * Protobuf type {@code CharGemInstanceSweepReq} + */ + public static final class CharGemInstanceSweepReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Times = 2; + */ + private int times; + + /** + * optional .Events Events = 15; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemInstanceSweepReq() { + } + + /** + * @return a new empty instance of {@code CharGemInstanceSweepReq} + */ + public static CharGemInstanceSweepReq newInstance() { + return new CharGemInstanceSweepReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public CharGemInstanceSweepReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public CharGemInstanceSweepReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Times = 2; + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Times = 2; + * @return this + */ + public CharGemInstanceSweepReq clearTimes() { + bitField0_ &= ~0x00000002; + times = 0; + return this; + } + + /** + * optional uint32 Times = 2; + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * optional uint32 Times = 2; + * @param value the times to set + * @return this + */ + public CharGemInstanceSweepReq setTimes(final int value) { + bitField0_ |= 0x00000002; + times = value; + return this; + } + + /** + * optional .Events Events = 15; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .Events Events = 15; + * @return this + */ + public CharGemInstanceSweepReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * optional .Events Events = 15; + * @param value the events to set + * @return this + */ + public CharGemInstanceSweepReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemInstanceSweepReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemInstanceSweepReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemInstanceSweepReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemInstanceSweepReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemInstanceSweepReq copyFrom(final CharGemInstanceSweepReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + times = other.times; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstanceSweepReq mergeFrom(final CharGemInstanceSweepReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstanceSweepReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + times = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharGemInstanceSweepReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemInstanceSweepReq)) { + return false; + } + CharGemInstanceSweepReq other = (CharGemInstanceSweepReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTimes() || times == other.times) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemInstanceSweepReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemInstanceSweepReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemInstanceSweepReq clone() { + return new CharGemInstanceSweepReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemInstanceSweepReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepReq(), data).checkInitialized(); + } + + public static CharGemInstanceSweepReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepReq(), input).checkInitialized(); + } + + public static CharGemInstanceSweepReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemInstanceSweepReq messages + */ + public static MessageFactory getFactory() { + return CharGemInstanceSweepReqFactory.INSTANCE; + } + + private enum CharGemInstanceSweepReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemInstanceSweepReq create() { + return CharGemInstanceSweepReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName times = FieldName.forField("Times"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharGemInstanceSweepReward} + */ + public static final class CharGemInstanceSweepReward extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Exp = 2; + */ + private int exp; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl AwardItems = 1; + */ + private final RepeatedMessage awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private CharGemInstanceSweepReward() { + } + + /** + * @return a new empty instance of {@code CharGemInstanceSweepReward} + */ + public static CharGemInstanceSweepReward newInstance() { + return new CharGemInstanceSweepReward(); + } + + /** + * optional uint32 Exp = 2; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Exp = 2; + * @return this + */ + public CharGemInstanceSweepReward clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 2; + * @param value the exp to set + * @return this + */ + public CharGemInstanceSweepReward setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemInstanceSweepReward clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemInstanceSweepReward addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemInstanceSweepReward addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemInstanceSweepReward setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @return this + */ + public CharGemInstanceSweepReward clearAwardItems() { + bitField0_ &= ~0x00000004; + awardItems.clear(); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getAwardItems() { + return awardItems; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableAwardItems() { + bitField0_ |= 0x00000004; + return awardItems; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @param value the awardItems to add + * @return this + */ + public CharGemInstanceSweepReward addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + awardItems.add(value); + return this; + } + + /** + * repeated .ItemTpl AwardItems = 1; + * @param values the awardItems to add + * @return this + */ + public CharGemInstanceSweepReward addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + awardItems.addAll(values); + return this; + } + + @Override + public CharGemInstanceSweepReward copyFrom(final CharGemInstanceSweepReward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + } + return this; + } + + @Override + public CharGemInstanceSweepReward mergeFrom(final CharGemInstanceSweepReward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + return this; + } + + @Override + public CharGemInstanceSweepReward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + nextPackage.clear(); + awardItems.clear(); + return this; + } + + @Override + public CharGemInstanceSweepReward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + awardItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemInstanceSweepReward)) { + return false; + } + CharGemInstanceSweepReward other = (CharGemInstanceSweepReward) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(awardItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemInstanceSweepReward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + output.endObject(); + } + + @Override + public CharGemInstanceSweepReward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemInstanceSweepReward clone() { + return new CharGemInstanceSweepReward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemInstanceSweepReward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepReward(), data).checkInitialized(); + } + + public static CharGemInstanceSweepReward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepReward(), input).checkInitialized(); + } + + public static CharGemInstanceSweepReward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepReward(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemInstanceSweepReward messages + */ + public static MessageFactory getFactory() { + return CharGemInstanceSweepRewardFactory.INSTANCE; + } + + private enum CharGemInstanceSweepRewardFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemInstanceSweepReward create() { + return CharGemInstanceSweepReward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + } + } + + /** + * Protobuf type {@code CharGemInstanceSweepResp} + */ + public static final class CharGemInstanceSweepResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 1; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .CharGemInstanceSweepReward Rewards = 2; + */ + private final RepeatedMessage rewards = RepeatedMessage.newEmptyInstance(CharGemInstanceSweepReward.getFactory()); + + private CharGemInstanceSweepResp() { + } + + /** + * @return a new empty instance of {@code CharGemInstanceSweepResp} + */ + public static CharGemInstanceSweepResp newInstance() { + return new CharGemInstanceSweepResp(); + } + + /** + * optional .ChangeInfo Change = 1; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 1; + * @return this + */ + public CharGemInstanceSweepResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * @param value the change to set + * @return this + */ + public CharGemInstanceSweepResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemInstanceSweepResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemInstanceSweepResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemInstanceSweepResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemInstanceSweepResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .CharGemInstanceSweepReward Rewards = 2; + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .CharGemInstanceSweepReward Rewards = 2; + * @return this + */ + public CharGemInstanceSweepResp clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * repeated .CharGemInstanceSweepReward Rewards = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewards() { + return rewards; + } + + /** + * repeated .CharGemInstanceSweepReward Rewards = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * repeated .CharGemInstanceSweepReward Rewards = 2; + * @param value the rewards to add + * @return this + */ + public CharGemInstanceSweepResp addRewards(final CharGemInstanceSweepReward value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * repeated .CharGemInstanceSweepReward Rewards = 2; + * @param values the rewards to add + * @return this + */ + public CharGemInstanceSweepResp addAllRewards(final CharGemInstanceSweepReward... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public CharGemInstanceSweepResp copyFrom(final CharGemInstanceSweepResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public CharGemInstanceSweepResp mergeFrom(final CharGemInstanceSweepResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public CharGemInstanceSweepResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public CharGemInstanceSweepResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemInstanceSweepResp)) { + return false; + } + CharGemInstanceSweepResp other = (CharGemInstanceSweepResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemInstanceSweepResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public CharGemInstanceSweepResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemInstanceSweepResp clone() { + return new CharGemInstanceSweepResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemInstanceSweepResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepResp(), data).checkInitialized(); + } + + public static CharGemInstanceSweepResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepResp(), input).checkInitialized(); + } + + public static CharGemInstanceSweepResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstanceSweepResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemInstanceSweepResp messages + */ + public static MessageFactory getFactory() { + return CharGemInstanceSweepRespFactory.INSTANCE; + } + + private enum CharGemInstanceSweepRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemInstanceSweepResp create() { + return CharGemInstanceSweepResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemRefresh.java b/src/generated/main/emu/nebula/proto/CharGemRefresh.java new file mode 100644 index 0000000..ebde4f7 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemRefresh.java @@ -0,0 +1,1173 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class CharGemRefresh { + /** + * Protobuf type {@code CharGemRefreshReq} + */ + public static final class CharGemRefreshReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 SlotId = 2; + */ + private int slotId; + + /** + * optional uint32 GemIndex = 3; + */ + private int gemIndex; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 LockAttrs = 4; + */ + private final RepeatedInt lockAttrs = RepeatedInt.newEmptyInstance(); + + private CharGemRefreshReq() { + } + + /** + * @return a new empty instance of {@code CharGemRefreshReq} + */ + public static CharGemRefreshReq newInstance() { + return new CharGemRefreshReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharGemRefreshReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharGemRefreshReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return whether the slotId field is set + */ + public boolean hasSlotId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 SlotId = 2; + * @return this + */ + public CharGemRefreshReq clearSlotId() { + bitField0_ &= ~0x00000002; + slotId = 0; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return the slotId + */ + public int getSlotId() { + return slotId; + } + + /** + * optional uint32 SlotId = 2; + * @param value the slotId to set + * @return this + */ + public CharGemRefreshReq setSlotId(final int value) { + bitField0_ |= 0x00000002; + slotId = value; + return this; + } + + /** + * optional uint32 GemIndex = 3; + * @return whether the gemIndex field is set + */ + public boolean hasGemIndex() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 GemIndex = 3; + * @return this + */ + public CharGemRefreshReq clearGemIndex() { + bitField0_ &= ~0x00000004; + gemIndex = 0; + return this; + } + + /** + * optional uint32 GemIndex = 3; + * @return the gemIndex + */ + public int getGemIndex() { + return gemIndex; + } + + /** + * optional uint32 GemIndex = 3; + * @param value the gemIndex to set + * @return this + */ + public CharGemRefreshReq setGemIndex(final int value) { + bitField0_ |= 0x00000004; + gemIndex = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemRefreshReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemRefreshReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemRefreshReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemRefreshReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 LockAttrs = 4; + * @return whether the lockAttrs field is set + */ + public boolean hasLockAttrs() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated uint32 LockAttrs = 4; + * @return this + */ + public CharGemRefreshReq clearLockAttrs() { + bitField0_ &= ~0x00000010; + lockAttrs.clear(); + return this; + } + + /** + * repeated uint32 LockAttrs = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLockAttrs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getLockAttrs() { + return lockAttrs; + } + + /** + * repeated uint32 LockAttrs = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableLockAttrs() { + bitField0_ |= 0x00000010; + return lockAttrs; + } + + /** + * repeated uint32 LockAttrs = 4; + * @param value the lockAttrs to add + * @return this + */ + public CharGemRefreshReq addLockAttrs(final int value) { + bitField0_ |= 0x00000010; + lockAttrs.add(value); + return this; + } + + /** + * repeated uint32 LockAttrs = 4; + * @param values the lockAttrs to add + * @return this + */ + public CharGemRefreshReq addAllLockAttrs(final int... values) { + bitField0_ |= 0x00000010; + lockAttrs.addAll(values); + return this; + } + + @Override + public CharGemRefreshReq copyFrom(final CharGemRefreshReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + slotId = other.slotId; + gemIndex = other.gemIndex; + nextPackage.copyFrom(other.nextPackage); + lockAttrs.copyFrom(other.lockAttrs); + } + return this; + } + + @Override + public CharGemRefreshReq mergeFrom(final CharGemRefreshReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasSlotId()) { + setSlotId(other.slotId); + } + if (other.hasGemIndex()) { + setGemIndex(other.gemIndex); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasLockAttrs()) { + getMutableLockAttrs().addAll(other.lockAttrs); + } + return this; + } + + @Override + public CharGemRefreshReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + slotId = 0; + gemIndex = 0; + nextPackage.clear(); + lockAttrs.clear(); + return this; + } + + @Override + public CharGemRefreshReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + lockAttrs.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemRefreshReq)) { + return false; + } + CharGemRefreshReq other = (CharGemRefreshReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasSlotId() || slotId == other.slotId) + && (!hasGemIndex() || gemIndex == other.gemIndex) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasLockAttrs() || lockAttrs.equals(other.lockAttrs)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < lockAttrs.length(); i++) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(lockAttrs.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * lockAttrs.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(lockAttrs); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemRefreshReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // slotId + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // gemIndex + gemIndex = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // lockAttrs [packed=true] + input.readPackedUInt32(lockAttrs, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 32: { + // lockAttrs [packed=false] + tag = input.readRepeatedUInt32(lockAttrs, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.slotId, slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.gemIndex, gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.lockAttrs, lockAttrs); + } + output.endObject(); + } + + @Override + public CharGemRefreshReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1815586855: { + if (input.isAtField(FieldNames.slotId)) { + if (!input.trySkipNullValue()) { + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1820411619: { + if (input.isAtField(FieldNames.gemIndex)) { + if (!input.trySkipNullValue()) { + gemIndex = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1046303255: { + if (input.isAtField(FieldNames.lockAttrs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(lockAttrs); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemRefreshReq clone() { + return new CharGemRefreshReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemRefreshReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemRefreshReq(), data).checkInitialized(); + } + + public static CharGemRefreshReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemRefreshReq(), input).checkInitialized(); + } + + public static CharGemRefreshReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemRefreshReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemRefreshReq messages + */ + public static MessageFactory getFactory() { + return CharGemRefreshReqFactory.INSTANCE; + } + + private enum CharGemRefreshReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemRefreshReq create() { + return CharGemRefreshReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName slotId = FieldName.forField("SlotId"); + + static final FieldName gemIndex = FieldName.forField("GemIndex"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName lockAttrs = FieldName.forField("LockAttrs"); + } + } + + /** + * Protobuf type {@code CharGemRefreshResp} + */ + public static final class CharGemRefreshResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo ChangeInfo = 2; + */ + private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Attributes = 1; + */ + private final RepeatedInt attributes = RepeatedInt.newEmptyInstance(); + + private CharGemRefreshResp() { + } + + /** + * @return a new empty instance of {@code CharGemRefreshResp} + */ + public static CharGemRefreshResp newInstance() { + return new CharGemRefreshResp(); + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @return whether the changeInfo field is set + */ + public boolean hasChangeInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @return this + */ + public CharGemRefreshResp clearChangeInfo() { + bitField0_ &= ~0x00000001; + changeInfo.clear(); + return this; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChangeInfo() { + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChangeInfo() { + bitField0_ |= 0x00000001; + return changeInfo; + } + + /** + * optional .ChangeInfo ChangeInfo = 2; + * @param value the changeInfo to set + * @return this + */ + public CharGemRefreshResp setChangeInfo(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + changeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemRefreshResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemRefreshResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemRefreshResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemRefreshResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Attributes = 1; + * @return whether the attributes field is set + */ + public boolean hasAttributes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 Attributes = 1; + * @return this + */ + public CharGemRefreshResp clearAttributes() { + bitField0_ &= ~0x00000004; + attributes.clear(); + return this; + } + + /** + * repeated uint32 Attributes = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAttributes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getAttributes() { + return attributes; + } + + /** + * repeated uint32 Attributes = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableAttributes() { + bitField0_ |= 0x00000004; + return attributes; + } + + /** + * repeated uint32 Attributes = 1; + * @param value the attributes to add + * @return this + */ + public CharGemRefreshResp addAttributes(final int value) { + bitField0_ |= 0x00000004; + attributes.add(value); + return this; + } + + /** + * repeated uint32 Attributes = 1; + * @param values the attributes to add + * @return this + */ + public CharGemRefreshResp addAllAttributes(final int... values) { + bitField0_ |= 0x00000004; + attributes.addAll(values); + return this; + } + + @Override + public CharGemRefreshResp copyFrom(final CharGemRefreshResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + changeInfo.copyFrom(other.changeInfo); + nextPackage.copyFrom(other.nextPackage); + attributes.copyFrom(other.attributes); + } + return this; + } + + @Override + public CharGemRefreshResp mergeFrom(final CharGemRefreshResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChangeInfo()) { + getMutableChangeInfo().mergeFrom(other.changeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAttributes()) { + getMutableAttributes().addAll(other.attributes); + } + return this; + } + + @Override + public CharGemRefreshResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clear(); + nextPackage.clear(); + attributes.clear(); + return this; + } + + @Override + public CharGemRefreshResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clearQuick(); + nextPackage.clear(); + attributes.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemRefreshResp)) { + return false; + } + CharGemRefreshResp other = (CharGemRefreshResp) o; + return bitField0_ == other.bitField0_ + && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAttributes() || attributes.equals(other.attributes)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < attributes.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(attributes.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * attributes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(attributes); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemRefreshResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // changeInfo + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // attributes [packed=true] + input.readPackedUInt32(attributes, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // attributes [packed=false] + tag = input.readRepeatedUInt32(attributes, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.changeInfo, changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.attributes, attributes); + } + output.endObject(); + } + + @Override + public CharGemRefreshResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -138776418: { + if (input.isAtField(FieldNames.changeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1895856777: { + if (input.isAtField(FieldNames.attributes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(attributes); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemRefreshResp clone() { + return new CharGemRefreshResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemRefreshResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemRefreshResp(), data).checkInitialized(); + } + + public static CharGemRefreshResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemRefreshResp(), input).checkInitialized(); + } + + public static CharGemRefreshResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemRefreshResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemRefreshResp messages + */ + public static MessageFactory getFactory() { + return CharGemRefreshRespFactory.INSTANCE; + } + + private enum CharGemRefreshRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemRefreshResp create() { + return CharGemRefreshResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName changeInfo = FieldName.forField("ChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName attributes = FieldName.forField("Attributes"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemRenamePreset.java b/src/generated/main/emu/nebula/proto/CharGemRenamePreset.java new file mode 100644 index 0000000..465bd97 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemRenamePreset.java @@ -0,0 +1,573 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class CharGemRenamePreset { + /** + * Protobuf type {@code CharGemRenamePresetReq} + */ + public static final class CharGemRenamePresetReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 PresetId = 2; + */ + private int presetId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string NewName = 3; + */ + private final Utf8String newName = Utf8String.newEmptyInstance(); + + private CharGemRenamePresetReq() { + } + + /** + * @return a new empty instance of {@code CharGemRenamePresetReq} + */ + public static CharGemRenamePresetReq newInstance() { + return new CharGemRenamePresetReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharGemRenamePresetReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharGemRenamePresetReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 PresetId = 2; + * @return whether the presetId field is set + */ + public boolean hasPresetId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 PresetId = 2; + * @return this + */ + public CharGemRenamePresetReq clearPresetId() { + bitField0_ &= ~0x00000002; + presetId = 0; + return this; + } + + /** + * optional uint32 PresetId = 2; + * @return the presetId + */ + public int getPresetId() { + return presetId; + } + + /** + * optional uint32 PresetId = 2; + * @param value the presetId to set + * @return this + */ + public CharGemRenamePresetReq setPresetId(final int value) { + bitField0_ |= 0x00000002; + presetId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemRenamePresetReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemRenamePresetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemRenamePresetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemRenamePresetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string NewName = 3; + * @return whether the newName field is set + */ + public boolean hasNewName() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string NewName = 3; + * @return this + */ + public CharGemRenamePresetReq clearNewName() { + bitField0_ &= ~0x00000008; + newName.clear(); + return this; + } + + /** + * optional string NewName = 3; + * @return the newName + */ + public String getNewName() { + return newName.getString(); + } + + /** + * optional string NewName = 3; + * @return internal {@code Utf8String} representation of newName for reading + */ + public Utf8String getNewNameBytes() { + return this.newName; + } + + /** + * optional string NewName = 3; + * @return internal {@code Utf8String} representation of newName for modifications + */ + public Utf8String getMutableNewNameBytes() { + bitField0_ |= 0x00000008; + return this.newName; + } + + /** + * optional string NewName = 3; + * @param value the newName to set + * @return this + */ + public CharGemRenamePresetReq setNewName(final CharSequence value) { + bitField0_ |= 0x00000008; + newName.copyFrom(value); + return this; + } + + /** + * optional string NewName = 3; + * @param value the newName to set + * @return this + */ + public CharGemRenamePresetReq setNewName(final Utf8String value) { + bitField0_ |= 0x00000008; + newName.copyFrom(value); + return this; + } + + @Override + public CharGemRenamePresetReq copyFrom(final CharGemRenamePresetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + presetId = other.presetId; + nextPackage.copyFrom(other.nextPackage); + newName.copyFrom(other.newName); + } + return this; + } + + @Override + public CharGemRenamePresetReq mergeFrom(final CharGemRenamePresetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasPresetId()) { + setPresetId(other.presetId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNewName()) { + getMutableNewNameBytes().copyFrom(other.newName); + } + return this; + } + + @Override + public CharGemRenamePresetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + presetId = 0; + nextPackage.clear(); + newName.clear(); + return this; + } + + @Override + public CharGemRenamePresetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + newName.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemRenamePresetReq)) { + return false; + } + CharGemRenamePresetReq other = (CharGemRenamePresetReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasPresetId() || presetId == other.presetId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNewName() || newName.equals(other.newName)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(presetId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeStringNoTag(newName); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(presetId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(newName); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemRenamePresetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // presetId + presetId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // newName + input.readString(newName); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.presetId, presetId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.newName, newName); + } + output.endObject(); + } + + @Override + public CharGemRenamePresetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1212017542: { + if (input.isAtField(FieldNames.presetId)) { + if (!input.trySkipNullValue()) { + presetId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -785293269: { + if (input.isAtField(FieldNames.newName)) { + if (!input.trySkipNullValue()) { + input.readString(newName); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemRenamePresetReq clone() { + return new CharGemRenamePresetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemRenamePresetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemRenamePresetReq(), data).checkInitialized(); + } + + public static CharGemRenamePresetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemRenamePresetReq(), input).checkInitialized(); + } + + public static CharGemRenamePresetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemRenamePresetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemRenamePresetReq messages + */ + public static MessageFactory getFactory() { + return CharGemRenamePresetReqFactory.INSTANCE; + } + + private enum CharGemRenamePresetReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemRenamePresetReq create() { + return CharGemRenamePresetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName presetId = FieldName.forField("PresetId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName newName = FieldName.forField("NewName"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemReplaceAttribute.java b/src/generated/main/emu/nebula/proto/CharGemReplaceAttribute.java new file mode 100644 index 0000000..3c73b3c --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemReplaceAttribute.java @@ -0,0 +1,543 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharGemReplaceAttribute { + /** + * Protobuf type {@code CharGemReplaceAttributeReq} + */ + public static final class CharGemReplaceAttributeReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 SlotId = 2; + */ + private int slotId; + + /** + * optional uint32 GemIndex = 3; + */ + private int gemIndex; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemReplaceAttributeReq() { + } + + /** + * @return a new empty instance of {@code CharGemReplaceAttributeReq} + */ + public static CharGemReplaceAttributeReq newInstance() { + return new CharGemReplaceAttributeReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharGemReplaceAttributeReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharGemReplaceAttributeReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return whether the slotId field is set + */ + public boolean hasSlotId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 SlotId = 2; + * @return this + */ + public CharGemReplaceAttributeReq clearSlotId() { + bitField0_ &= ~0x00000002; + slotId = 0; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return the slotId + */ + public int getSlotId() { + return slotId; + } + + /** + * optional uint32 SlotId = 2; + * @param value the slotId to set + * @return this + */ + public CharGemReplaceAttributeReq setSlotId(final int value) { + bitField0_ |= 0x00000002; + slotId = value; + return this; + } + + /** + * optional uint32 GemIndex = 3; + * @return whether the gemIndex field is set + */ + public boolean hasGemIndex() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 GemIndex = 3; + * @return this + */ + public CharGemReplaceAttributeReq clearGemIndex() { + bitField0_ &= ~0x00000004; + gemIndex = 0; + return this; + } + + /** + * optional uint32 GemIndex = 3; + * @return the gemIndex + */ + public int getGemIndex() { + return gemIndex; + } + + /** + * optional uint32 GemIndex = 3; + * @param value the gemIndex to set + * @return this + */ + public CharGemReplaceAttributeReq setGemIndex(final int value) { + bitField0_ |= 0x00000004; + gemIndex = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemReplaceAttributeReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemReplaceAttributeReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemReplaceAttributeReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemReplaceAttributeReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemReplaceAttributeReq copyFrom(final CharGemReplaceAttributeReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + slotId = other.slotId; + gemIndex = other.gemIndex; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemReplaceAttributeReq mergeFrom(final CharGemReplaceAttributeReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasSlotId()) { + setSlotId(other.slotId); + } + if (other.hasGemIndex()) { + setGemIndex(other.gemIndex); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemReplaceAttributeReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + slotId = 0; + gemIndex = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharGemReplaceAttributeReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemReplaceAttributeReq)) { + return false; + } + CharGemReplaceAttributeReq other = (CharGemReplaceAttributeReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasSlotId() || slotId == other.slotId) + && (!hasGemIndex() || gemIndex == other.gemIndex) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemReplaceAttributeReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // slotId + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // gemIndex + gemIndex = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.slotId, slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.gemIndex, gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemReplaceAttributeReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1815586855: { + if (input.isAtField(FieldNames.slotId)) { + if (!input.trySkipNullValue()) { + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1820411619: { + if (input.isAtField(FieldNames.gemIndex)) { + if (!input.trySkipNullValue()) { + gemIndex = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemReplaceAttributeReq clone() { + return new CharGemReplaceAttributeReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemReplaceAttributeReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemReplaceAttributeReq(), data).checkInitialized(); + } + + public static CharGemReplaceAttributeReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemReplaceAttributeReq(), input).checkInitialized(); + } + + public static CharGemReplaceAttributeReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemReplaceAttributeReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemReplaceAttributeReq messages + */ + public static MessageFactory getFactory() { + return CharGemReplaceAttributeReqFactory.INSTANCE; + } + + private enum CharGemReplaceAttributeReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemReplaceAttributeReq create() { + return CharGemReplaceAttributeReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName slotId = FieldName.forField("SlotId"); + + static final FieldName gemIndex = FieldName.forField("GemIndex"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemUpdateGemLockStatus.java b/src/generated/main/emu/nebula/proto/CharGemUpdateGemLockStatus.java new file mode 100644 index 0000000..050617b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemUpdateGemLockStatus.java @@ -0,0 +1,625 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharGemUpdateGemLockStatus { + /** + * Protobuf type {@code CharGemUpdateGemLockStatusReq} + */ + public static final class CharGemUpdateGemLockStatusReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 SlotId = 2; + */ + private int slotId; + + /** + * optional uint32 GemIndex = 3; + */ + private int gemIndex; + + /** + * optional bool Lock = 4; + */ + private boolean lock; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemUpdateGemLockStatusReq() { + } + + /** + * @return a new empty instance of {@code CharGemUpdateGemLockStatusReq} + */ + public static CharGemUpdateGemLockStatusReq newInstance() { + return new CharGemUpdateGemLockStatusReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharGemUpdateGemLockStatusReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharGemUpdateGemLockStatusReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return whether the slotId field is set + */ + public boolean hasSlotId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 SlotId = 2; + * @return this + */ + public CharGemUpdateGemLockStatusReq clearSlotId() { + bitField0_ &= ~0x00000002; + slotId = 0; + return this; + } + + /** + * optional uint32 SlotId = 2; + * @return the slotId + */ + public int getSlotId() { + return slotId; + } + + /** + * optional uint32 SlotId = 2; + * @param value the slotId to set + * @return this + */ + public CharGemUpdateGemLockStatusReq setSlotId(final int value) { + bitField0_ |= 0x00000002; + slotId = value; + return this; + } + + /** + * optional uint32 GemIndex = 3; + * @return whether the gemIndex field is set + */ + public boolean hasGemIndex() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 GemIndex = 3; + * @return this + */ + public CharGemUpdateGemLockStatusReq clearGemIndex() { + bitField0_ &= ~0x00000004; + gemIndex = 0; + return this; + } + + /** + * optional uint32 GemIndex = 3; + * @return the gemIndex + */ + public int getGemIndex() { + return gemIndex; + } + + /** + * optional uint32 GemIndex = 3; + * @param value the gemIndex to set + * @return this + */ + public CharGemUpdateGemLockStatusReq setGemIndex(final int value) { + bitField0_ |= 0x00000004; + gemIndex = value; + return this; + } + + /** + * optional bool Lock = 4; + * @return whether the lock field is set + */ + public boolean hasLock() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bool Lock = 4; + * @return this + */ + public CharGemUpdateGemLockStatusReq clearLock() { + bitField0_ &= ~0x00000008; + lock = false; + return this; + } + + /** + * optional bool Lock = 4; + * @return the lock + */ + public boolean getLock() { + return lock; + } + + /** + * optional bool Lock = 4; + * @param value the lock to set + * @return this + */ + public CharGemUpdateGemLockStatusReq setLock(final boolean value) { + bitField0_ |= 0x00000008; + lock = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemUpdateGemLockStatusReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemUpdateGemLockStatusReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemUpdateGemLockStatusReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemUpdateGemLockStatusReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemUpdateGemLockStatusReq copyFrom(final CharGemUpdateGemLockStatusReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + slotId = other.slotId; + gemIndex = other.gemIndex; + lock = other.lock; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemUpdateGemLockStatusReq mergeFrom(final CharGemUpdateGemLockStatusReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasSlotId()) { + setSlotId(other.slotId); + } + if (other.hasGemIndex()) { + setGemIndex(other.gemIndex); + } + if (other.hasLock()) { + setLock(other.lock); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemUpdateGemLockStatusReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + slotId = 0; + gemIndex = 0; + lock = false; + nextPackage.clear(); + return this; + } + + @Override + public CharGemUpdateGemLockStatusReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemUpdateGemLockStatusReq)) { + return false; + } + CharGemUpdateGemLockStatusReq other = (CharGemUpdateGemLockStatusReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasSlotId() || slotId == other.slotId) + && (!hasGemIndex() || gemIndex == other.gemIndex) + && (!hasLock() || lock == other.lock) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(lock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemUpdateGemLockStatusReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // slotId + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // gemIndex + gemIndex = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // lock + lock = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.slotId, slotId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.gemIndex, gemIndex); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.lock, lock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemUpdateGemLockStatusReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1815586855: { + if (input.isAtField(FieldNames.slotId)) { + if (!input.trySkipNullValue()) { + slotId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1820411619: { + if (input.isAtField(FieldNames.gemIndex)) { + if (!input.trySkipNullValue()) { + gemIndex = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2373963: { + if (input.isAtField(FieldNames.lock)) { + if (!input.trySkipNullValue()) { + lock = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemUpdateGemLockStatusReq clone() { + return new CharGemUpdateGemLockStatusReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemUpdateGemLockStatusReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemUpdateGemLockStatusReq(), data).checkInitialized(); + } + + public static CharGemUpdateGemLockStatusReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharGemUpdateGemLockStatusReq(), input).checkInitialized(); + } + + public static CharGemUpdateGemLockStatusReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new CharGemUpdateGemLockStatusReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemUpdateGemLockStatusReq messages + */ + public static MessageFactory getFactory() { + return CharGemUpdateGemLockStatusReqFactory.INSTANCE; + } + + private enum CharGemUpdateGemLockStatusReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemUpdateGemLockStatusReq create() { + return CharGemUpdateGemLockStatusReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName slotId = FieldName.forField("SlotId"); + + static final FieldName gemIndex = FieldName.forField("GemIndex"); + + static final FieldName lock = FieldName.forField("Lock"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharGemUsePreset.java b/src/generated/main/emu/nebula/proto/CharGemUsePreset.java new file mode 100644 index 0000000..a94ff5c --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharGemUsePreset.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharGemUsePreset { + /** + * Protobuf type {@code CharGemUsePresetReq} + */ + public static final class CharGemUsePresetReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 PresetId = 2; + */ + private int presetId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemUsePresetReq() { + } + + /** + * @return a new empty instance of {@code CharGemUsePresetReq} + */ + public static CharGemUsePresetReq newInstance() { + return new CharGemUsePresetReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharGemUsePresetReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharGemUsePresetReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 PresetId = 2; + * @return whether the presetId field is set + */ + public boolean hasPresetId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 PresetId = 2; + * @return this + */ + public CharGemUsePresetReq clearPresetId() { + bitField0_ &= ~0x00000002; + presetId = 0; + return this; + } + + /** + * optional uint32 PresetId = 2; + * @return the presetId + */ + public int getPresetId() { + return presetId; + } + + /** + * optional uint32 PresetId = 2; + * @param value the presetId to set + * @return this + */ + public CharGemUsePresetReq setPresetId(final int value) { + bitField0_ |= 0x00000002; + presetId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharGemUsePresetReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharGemUsePresetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharGemUsePresetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharGemUsePresetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemUsePresetReq copyFrom(final CharGemUsePresetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + presetId = other.presetId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemUsePresetReq mergeFrom(final CharGemUsePresetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasPresetId()) { + setPresetId(other.presetId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemUsePresetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + presetId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharGemUsePresetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemUsePresetReq)) { + return false; + } + CharGemUsePresetReq other = (CharGemUsePresetReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasPresetId() || presetId == other.presetId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(presetId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(presetId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemUsePresetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // presetId + presetId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.presetId, presetId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemUsePresetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1212017542: { + if (input.isAtField(FieldNames.presetId)) { + if (!input.trySkipNullValue()) { + presetId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemUsePresetReq clone() { + return new CharGemUsePresetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemUsePresetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemUsePresetReq(), data).checkInitialized(); + } + + public static CharGemUsePresetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemUsePresetReq(), input).checkInitialized(); + } + + public static CharGemUsePresetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemUsePresetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemUsePresetReq messages + */ + public static MessageFactory getFactory() { + return CharGemUsePresetReqFactory.INSTANCE; + } + + private enum CharGemUsePresetReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharGemUsePresetReq create() { + return CharGemUsePresetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName presetId = FieldName.forField("PresetId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharRecruitment.java b/src/generated/main/emu/nebula/proto/CharRecruitment.java new file mode 100644 index 0000000..41c44f8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharRecruitment.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class CharRecruitment { +} diff --git a/src/generated/main/emu/nebula/proto/CharSkillUpgrade.java b/src/generated/main/emu/nebula/proto/CharSkillUpgrade.java new file mode 100644 index 0000000..40819f9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharSkillUpgrade.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharSkillUpgrade { + /** + * Protobuf type {@code CharSkillUpgradeReq} + */ + public static final class CharSkillUpgradeReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 Index = 2; + */ + private int index; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharSkillUpgradeReq() { + } + + /** + * @return a new empty instance of {@code CharSkillUpgradeReq} + */ + public static CharSkillUpgradeReq newInstance() { + return new CharSkillUpgradeReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharSkillUpgradeReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharSkillUpgradeReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 Index = 2; + * @return whether the index field is set + */ + public boolean hasIndex() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Index = 2; + * @return this + */ + public CharSkillUpgradeReq clearIndex() { + bitField0_ &= ~0x00000002; + index = 0; + return this; + } + + /** + * optional uint32 Index = 2; + * @return the index + */ + public int getIndex() { + return index; + } + + /** + * optional uint32 Index = 2; + * @param value the index to set + * @return this + */ + public CharSkillUpgradeReq setIndex(final int value) { + bitField0_ |= 0x00000002; + index = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharSkillUpgradeReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharSkillUpgradeReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharSkillUpgradeReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharSkillUpgradeReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharSkillUpgradeReq copyFrom(final CharSkillUpgradeReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + index = other.index; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharSkillUpgradeReq mergeFrom(final CharSkillUpgradeReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasIndex()) { + setIndex(other.index); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharSkillUpgradeReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + index = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharSkillUpgradeReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharSkillUpgradeReq)) { + return false; + } + CharSkillUpgradeReq other = (CharSkillUpgradeReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasIndex() || index == other.index) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(index); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(index); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharSkillUpgradeReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // index + index = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.index, index); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharSkillUpgradeReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70793394: { + if (input.isAtField(FieldNames.index)) { + if (!input.trySkipNullValue()) { + index = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharSkillUpgradeReq clone() { + return new CharSkillUpgradeReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharSkillUpgradeReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharSkillUpgradeReq(), data).checkInitialized(); + } + + public static CharSkillUpgradeReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharSkillUpgradeReq(), input).checkInitialized(); + } + + public static CharSkillUpgradeReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharSkillUpgradeReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharSkillUpgradeReq messages + */ + public static MessageFactory getFactory() { + return CharSkillUpgradeReqFactory.INSTANCE; + } + + private enum CharSkillUpgradeReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharSkillUpgradeReq create() { + return CharSkillUpgradeReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName index = FieldName.forField("Index"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharSkinSet.java b/src/generated/main/emu/nebula/proto/CharSkinSet.java new file mode 100644 index 0000000..09e474d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharSkinSet.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class CharSkinSet { + /** + * Protobuf type {@code CharSkinSetReq} + */ + public static final class CharSkinSetReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 SkinId = 2; + */ + private int skinId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharSkinSetReq() { + } + + /** + * @return a new empty instance of {@code CharSkinSetReq} + */ + public static CharSkinSetReq newInstance() { + return new CharSkinSetReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharSkinSetReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharSkinSetReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 SkinId = 2; + * @return whether the skinId field is set + */ + public boolean hasSkinId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 SkinId = 2; + * @return this + */ + public CharSkinSetReq clearSkinId() { + bitField0_ &= ~0x00000002; + skinId = 0; + return this; + } + + /** + * optional uint32 SkinId = 2; + * @return the skinId + */ + public int getSkinId() { + return skinId; + } + + /** + * optional uint32 SkinId = 2; + * @param value the skinId to set + * @return this + */ + public CharSkinSetReq setSkinId(final int value) { + bitField0_ |= 0x00000002; + skinId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharSkinSetReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharSkinSetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharSkinSetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharSkinSetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharSkinSetReq copyFrom(final CharSkinSetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + skinId = other.skinId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharSkinSetReq mergeFrom(final CharSkinSetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasSkinId()) { + setSkinId(other.skinId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharSkinSetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + skinId = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharSkinSetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharSkinSetReq)) { + return false; + } + CharSkinSetReq other = (CharSkinSetReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasSkinId() || skinId == other.skinId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(skinId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skinId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharSkinSetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // skinId + skinId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.skinId, skinId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharSkinSetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1816694888: { + if (input.isAtField(FieldNames.skinId)) { + if (!input.trySkipNullValue()) { + skinId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharSkinSetReq clone() { + return new CharSkinSetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharSkinSetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharSkinSetReq(), data).checkInitialized(); + } + + public static CharSkinSetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharSkinSetReq(), input).checkInitialized(); + } + + public static CharSkinSetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharSkinSetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharSkinSetReq messages + */ + public static MessageFactory getFactory() { + return CharSkinSetReqFactory.INSTANCE; + } + + private enum CharSkinSetReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharSkinSetReq create() { + return CharSkinSetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName skinId = FieldName.forField("SkinId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/CharUpgrade.java b/src/generated/main/emu/nebula/proto/CharUpgrade.java new file mode 100644 index 0000000..7f6e978 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/CharUpgrade.java @@ -0,0 +1,1046 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class CharUpgrade { + /** + * Protobuf type {@code CharUpgradeReq} + */ + public static final class CharUpgradeReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Items = 2; + */ + private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private CharUpgradeReq() { + } + + /** + * @return a new empty instance of {@code CharUpgradeReq} + */ + public static CharUpgradeReq newInstance() { + return new CharUpgradeReq(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharUpgradeReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharUpgradeReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharUpgradeReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharUpgradeReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharUpgradeReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharUpgradeReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Items = 2; + * @return this + */ + public CharUpgradeReq clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getItems() { + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * @param value the items to add + * @return this + */ + public CharUpgradeReq addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @param values the items to add + * @return this + */ + public CharUpgradeReq addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + @Override + public CharUpgradeReq copyFrom(final CharUpgradeReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public CharUpgradeReq mergeFrom(final CharUpgradeReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public CharUpgradeReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public CharUpgradeReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharUpgradeReq)) { + return false; + } + CharUpgradeReq other = (CharUpgradeReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharUpgradeReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public CharUpgradeReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharUpgradeReq clone() { + return new CharUpgradeReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharUpgradeReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharUpgradeReq(), data).checkInitialized(); + } + + public static CharUpgradeReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharUpgradeReq(), input).checkInitialized(); + } + + public static CharUpgradeReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharUpgradeReq(), input).checkInitialized(); + } + + /** + * @return factory for creating CharUpgradeReq messages + */ + public static MessageFactory getFactory() { + return CharUpgradeReqFactory.INSTANCE; + } + + private enum CharUpgradeReqFactory implements MessageFactory { + INSTANCE; + + @Override + public CharUpgradeReq create() { + return CharUpgradeReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } + + /** + * Protobuf type {@code CharUpgradeResp} + */ + public static final class CharUpgradeResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Level = 1; + */ + private int level; + + /** + * optional uint32 Exp = 2; + */ + private int exp; + + /** + * optional .ChangeInfo Change = 3; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharUpgradeResp() { + } + + /** + * @return a new empty instance of {@code CharUpgradeResp} + */ + public static CharUpgradeResp newInstance() { + return new CharUpgradeResp(); + } + + /** + * optional uint32 Level = 1; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Level = 1; + * @return this + */ + public CharUpgradeResp clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * optional uint32 Level = 1; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 1; + * @param value the level to set + * @return this + */ + public CharUpgradeResp setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Exp = 2; + * @return this + */ + public CharUpgradeResp clearExp() { + bitField0_ &= ~0x00000002; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 2; + * @param value the exp to set + * @return this + */ + public CharUpgradeResp setExp(final int value) { + bitField0_ |= 0x00000002; + exp = value; + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .ChangeInfo Change = 3; + * @return this + */ + public CharUpgradeResp clearChange() { + bitField0_ &= ~0x00000004; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000004; + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * @param value the change to set + * @return this + */ + public CharUpgradeResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000004; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharUpgradeResp clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharUpgradeResp addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharUpgradeResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharUpgradeResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharUpgradeResp copyFrom(final CharUpgradeResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + exp = other.exp; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharUpgradeResp mergeFrom(final CharUpgradeResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharUpgradeResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + exp = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharUpgradeResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharUpgradeResp)) { + return false; + } + CharUpgradeResp other = (CharUpgradeResp) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasExp() || exp == other.exp) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharUpgradeResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharUpgradeResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharUpgradeResp clone() { + return new CharUpgradeResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharUpgradeResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharUpgradeResp(), data).checkInitialized(); + } + + public static CharUpgradeResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharUpgradeResp(), input).checkInitialized(); + } + + public static CharUpgradeResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharUpgradeResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CharUpgradeResp messages + */ + public static MessageFactory getFactory() { + return CharUpgradeRespFactory.INSTANCE; + } + + private enum CharUpgradeRespFactory implements MessageFactory { + INSTANCE; + + @Override + public CharUpgradeResp create() { + return CharUpgradeResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ClientEventReport.java b/src/generated/main/emu/nebula/proto/ClientEventReport.java new file mode 100644 index 0000000..8860f68 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ClientEventReport.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class ClientEventReport { +} diff --git a/src/generated/main/emu/nebula/proto/DailyInstanceApply.java b/src/generated/main/emu/nebula/proto/DailyInstanceApply.java new file mode 100644 index 0000000..96a054b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DailyInstanceApply.java @@ -0,0 +1,543 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class DailyInstanceApply { + /** + * Protobuf type {@code DailyInstanceApplyReq} + */ + public static final class DailyInstanceApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 15; + */ + private long buildId; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 RewardType = 2; + */ + private int rewardType; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DailyInstanceApplyReq() { + } + + /** + * @return a new empty instance of {@code DailyInstanceApplyReq} + */ + public static DailyInstanceApplyReq newInstance() { + return new DailyInstanceApplyReq(); + } + + /** + * optional uint64 BuildId = 15; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 15; + * @return this + */ + public DailyInstanceApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 15; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 15; + * @param value the buildId to set + * @return this + */ + public DailyInstanceApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public DailyInstanceApplyReq clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public DailyInstanceApplyReq setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 RewardType = 2; + * @return whether the rewardType field is set + */ + public boolean hasRewardType() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 RewardType = 2; + * @return this + */ + public DailyInstanceApplyReq clearRewardType() { + bitField0_ &= ~0x00000004; + rewardType = 0; + return this; + } + + /** + * optional uint32 RewardType = 2; + * @return the rewardType + */ + public int getRewardType() { + return rewardType; + } + + /** + * optional uint32 RewardType = 2; + * @param value the rewardType to set + * @return this + */ + public DailyInstanceApplyReq setRewardType(final int value) { + bitField0_ |= 0x00000004; + rewardType = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DailyInstanceApplyReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DailyInstanceApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DailyInstanceApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DailyInstanceApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DailyInstanceApplyReq copyFrom(final DailyInstanceApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + rewardType = other.rewardType; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstanceApplyReq mergeFrom(final DailyInstanceApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasRewardType()) { + setRewardType(other.rewardType); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstanceApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + rewardType = 0; + nextPackage.clear(); + return this; + } + + @Override + public DailyInstanceApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DailyInstanceApplyReq)) { + return false; + } + DailyInstanceApplyReq other = (DailyInstanceApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasRewardType() || rewardType == other.rewardType) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(rewardType); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(rewardType); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DailyInstanceApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 120: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // rewardType + rewardType = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.rewardType, rewardType); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DailyInstanceApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -610271447: { + if (input.isAtField(FieldNames.rewardType)) { + if (!input.trySkipNullValue()) { + rewardType = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DailyInstanceApplyReq clone() { + return new DailyInstanceApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DailyInstanceApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DailyInstanceApplyReq(), data).checkInitialized(); + } + + public static DailyInstanceApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceApplyReq(), input).checkInitialized(); + } + + public static DailyInstanceApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DailyInstanceApplyReq messages + */ + public static MessageFactory getFactory() { + return DailyInstanceApplyReqFactory.INSTANCE; + } + + private enum DailyInstanceApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DailyInstanceApplyReq create() { + return DailyInstanceApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName rewardType = FieldName.forField("RewardType"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/DailyInstanceRaid.java b/src/generated/main/emu/nebula/proto/DailyInstanceRaid.java new file mode 100644 index 0000000..e0280c2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DailyInstanceRaid.java @@ -0,0 +1,1628 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class DailyInstanceRaid { + /** + * Protobuf type {@code DailyInstanceRaidReq} + */ + public static final class DailyInstanceRaidReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 RewardType = 2; + */ + private int rewardType; + + /** + * optional uint32 Times = 4; + */ + private int times; + + /** + * optional .Events Events = 15; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DailyInstanceRaidReq() { + } + + /** + * @return a new empty instance of {@code DailyInstanceRaidReq} + */ + public static DailyInstanceRaidReq newInstance() { + return new DailyInstanceRaidReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public DailyInstanceRaidReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public DailyInstanceRaidReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 RewardType = 2; + * @return whether the rewardType field is set + */ + public boolean hasRewardType() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 RewardType = 2; + * @return this + */ + public DailyInstanceRaidReq clearRewardType() { + bitField0_ &= ~0x00000002; + rewardType = 0; + return this; + } + + /** + * optional uint32 RewardType = 2; + * @return the rewardType + */ + public int getRewardType() { + return rewardType; + } + + /** + * optional uint32 RewardType = 2; + * @param value the rewardType to set + * @return this + */ + public DailyInstanceRaidReq setRewardType(final int value) { + bitField0_ |= 0x00000002; + rewardType = value; + return this; + } + + /** + * optional uint32 Times = 4; + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Times = 4; + * @return this + */ + public DailyInstanceRaidReq clearTimes() { + bitField0_ &= ~0x00000004; + times = 0; + return this; + } + + /** + * optional uint32 Times = 4; + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * optional uint32 Times = 4; + * @param value the times to set + * @return this + */ + public DailyInstanceRaidReq setTimes(final int value) { + bitField0_ |= 0x00000004; + times = value; + return this; + } + + /** + * optional .Events Events = 15; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .Events Events = 15; + * @return this + */ + public DailyInstanceRaidReq clearEvents() { + bitField0_ &= ~0x00000008; + events.clear(); + return this; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000008; + return events; + } + + /** + * optional .Events Events = 15; + * @param value the events to set + * @return this + */ + public DailyInstanceRaidReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000008; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DailyInstanceRaidReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DailyInstanceRaidReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DailyInstanceRaidReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DailyInstanceRaidReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DailyInstanceRaidReq copyFrom(final DailyInstanceRaidReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + rewardType = other.rewardType; + times = other.times; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstanceRaidReq mergeFrom(final DailyInstanceRaidReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasRewardType()) { + setRewardType(other.rewardType); + } + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstanceRaidReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + rewardType = 0; + times = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public DailyInstanceRaidReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DailyInstanceRaidReq)) { + return false; + } + DailyInstanceRaidReq other = (DailyInstanceRaidReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasRewardType() || rewardType == other.rewardType) + && (!hasTimes() || times == other.times) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(rewardType); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(rewardType); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DailyInstanceRaidReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // rewardType + rewardType = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.rewardType, rewardType); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DailyInstanceRaidReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -610271447: { + if (input.isAtField(FieldNames.rewardType)) { + if (!input.trySkipNullValue()) { + rewardType = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DailyInstanceRaidReq clone() { + return new DailyInstanceRaidReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DailyInstanceRaidReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DailyInstanceRaidReq(), data).checkInitialized(); + } + + public static DailyInstanceRaidReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceRaidReq(), input).checkInitialized(); + } + + public static DailyInstanceRaidReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceRaidReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DailyInstanceRaidReq messages + */ + public static MessageFactory getFactory() { + return DailyInstanceRaidReqFactory.INSTANCE; + } + + private enum DailyInstanceRaidReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DailyInstanceRaidReq create() { + return DailyInstanceRaidReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName rewardType = FieldName.forField("RewardType"); + + static final FieldName times = FieldName.forField("Times"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DailyInstanceReward} + */ + public static final class DailyInstanceReward extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Exp = 15; + */ + private int exp; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Item Select = 1; + */ + private final RepeatedMessage select = RepeatedMessage.newEmptyInstance(Public.Item.getFactory()); + + private DailyInstanceReward() { + } + + /** + * @return a new empty instance of {@code DailyInstanceReward} + */ + public static DailyInstanceReward newInstance() { + return new DailyInstanceReward(); + } + + /** + * optional uint32 Exp = 15; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Exp = 15; + * @return this + */ + public DailyInstanceReward clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 15; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 15; + * @param value the exp to set + * @return this + */ + public DailyInstanceReward setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DailyInstanceReward clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DailyInstanceReward addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DailyInstanceReward addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DailyInstanceReward setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Item Select = 1; + * @return whether the select field is set + */ + public boolean hasSelect() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .Item Select = 1; + * @return this + */ + public DailyInstanceReward clearSelect() { + bitField0_ &= ~0x00000004; + select.clear(); + return this; + } + + /** + * repeated .Item Select = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelect()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getSelect() { + return select; + } + + /** + * repeated .Item Select = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableSelect() { + bitField0_ |= 0x00000004; + return select; + } + + /** + * repeated .Item Select = 1; + * @param value the select to add + * @return this + */ + public DailyInstanceReward addSelect(final Public.Item value) { + bitField0_ |= 0x00000004; + select.add(value); + return this; + } + + /** + * repeated .Item Select = 1; + * @param values the select to add + * @return this + */ + public DailyInstanceReward addAllSelect(final Public.Item... values) { + bitField0_ |= 0x00000004; + select.addAll(values); + return this; + } + + @Override + public DailyInstanceReward copyFrom(final DailyInstanceReward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + nextPackage.copyFrom(other.nextPackage); + select.copyFrom(other.select); + } + return this; + } + + @Override + public DailyInstanceReward mergeFrom(final DailyInstanceReward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSelect()) { + getMutableSelect().addAll(other.select); + } + return this; + } + + @Override + public DailyInstanceReward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + nextPackage.clear(); + select.clear(); + return this; + } + + @Override + public DailyInstanceReward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + select.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DailyInstanceReward)) { + return false; + } + DailyInstanceReward other = (DailyInstanceReward) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSelect() || select.equals(other.select)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < select.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(select.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * select.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(select); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DailyInstanceReward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 120: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // select + tag = input.readRepeatedMessage(select, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.select, select); + } + output.endObject(); + } + + @Override + public DailyInstanceReward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1822154468: { + if (input.isAtField(FieldNames.select)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(select); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DailyInstanceReward clone() { + return new DailyInstanceReward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DailyInstanceReward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DailyInstanceReward(), data).checkInitialized(); + } + + public static DailyInstanceReward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceReward(), input).checkInitialized(); + } + + public static DailyInstanceReward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceReward(), input).checkInitialized(); + } + + /** + * @return factory for creating DailyInstanceReward messages + */ + public static MessageFactory getFactory() { + return DailyInstanceRewardFactory.INSTANCE; + } + + private enum DailyInstanceRewardFactory implements MessageFactory { + INSTANCE; + + @Override + public DailyInstanceReward create() { + return DailyInstanceReward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName select = FieldName.forField("Select"); + } + } + + /** + * Protobuf type {@code DailyInstanceRaidResp} + */ + public static final class DailyInstanceRaidResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .DailyInstanceReward Rewards = 1; + */ + private final RepeatedMessage rewards = RepeatedMessage.newEmptyInstance(DailyInstanceReward.getFactory()); + + private DailyInstanceRaidResp() { + } + + /** + * @return a new empty instance of {@code DailyInstanceRaidResp} + */ + public static DailyInstanceRaidResp newInstance() { + return new DailyInstanceRaidResp(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public DailyInstanceRaidResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public DailyInstanceRaidResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DailyInstanceRaidResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DailyInstanceRaidResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DailyInstanceRaidResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DailyInstanceRaidResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .DailyInstanceReward Rewards = 1; + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .DailyInstanceReward Rewards = 1; + * @return this + */ + public DailyInstanceRaidResp clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * repeated .DailyInstanceReward Rewards = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewards() { + return rewards; + } + + /** + * repeated .DailyInstanceReward Rewards = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * repeated .DailyInstanceReward Rewards = 1; + * @param value the rewards to add + * @return this + */ + public DailyInstanceRaidResp addRewards(final DailyInstanceReward value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * repeated .DailyInstanceReward Rewards = 1; + * @param values the rewards to add + * @return this + */ + public DailyInstanceRaidResp addAllRewards(final DailyInstanceReward... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public DailyInstanceRaidResp copyFrom(final DailyInstanceRaidResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public DailyInstanceRaidResp mergeFrom(final DailyInstanceRaidResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public DailyInstanceRaidResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public DailyInstanceRaidResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DailyInstanceRaidResp)) { + return false; + } + DailyInstanceRaidResp other = (DailyInstanceRaidResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DailyInstanceRaidResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public DailyInstanceRaidResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DailyInstanceRaidResp clone() { + return new DailyInstanceRaidResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DailyInstanceRaidResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DailyInstanceRaidResp(), data).checkInitialized(); + } + + public static DailyInstanceRaidResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceRaidResp(), input).checkInitialized(); + } + + public static DailyInstanceRaidResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceRaidResp(), input).checkInitialized(); + } + + /** + * @return factory for creating DailyInstanceRaidResp messages + */ + public static MessageFactory getFactory() { + return DailyInstanceRaidRespFactory.INSTANCE; + } + + private enum DailyInstanceRaidRespFactory implements MessageFactory { + INSTANCE; + + @Override + public DailyInstanceRaidResp create() { + return DailyInstanceRaidResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/DailyInstanceSettle.java b/src/generated/main/emu/nebula/proto/DailyInstanceSettle.java new file mode 100644 index 0000000..e5886b5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DailyInstanceSettle.java @@ -0,0 +1,1180 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class DailyInstanceSettle { + /** + * Protobuf type {@code DailyInstanceSettleReq} + */ + public static final class DailyInstanceSettleReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Star = 1; + */ + private int star; + + /** + * optional .Events Events = 15; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DailyInstanceSettleReq() { + } + + /** + * @return a new empty instance of {@code DailyInstanceSettleReq} + */ + public static DailyInstanceSettleReq newInstance() { + return new DailyInstanceSettleReq(); + } + + /** + * optional uint32 Star = 1; + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Star = 1; + * @return this + */ + public DailyInstanceSettleReq clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * optional uint32 Star = 1; + * @return the star + */ + public int getStar() { + return star; + } + + /** + * optional uint32 Star = 1; + * @param value the star to set + * @return this + */ + public DailyInstanceSettleReq setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * optional .Events Events = 15; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .Events Events = 15; + * @return this + */ + public DailyInstanceSettleReq clearEvents() { + bitField0_ &= ~0x00000002; + events.clear(); + return this; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000002; + return events; + } + + /** + * optional .Events Events = 15; + * @param value the events to set + * @return this + */ + public DailyInstanceSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000002; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DailyInstanceSettleReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DailyInstanceSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DailyInstanceSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DailyInstanceSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DailyInstanceSettleReq copyFrom(final DailyInstanceSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstanceSettleReq mergeFrom(final DailyInstanceSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstanceSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public DailyInstanceSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DailyInstanceSettleReq)) { + return false; + } + DailyInstanceSettleReq other = (DailyInstanceSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DailyInstanceSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DailyInstanceSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DailyInstanceSettleReq clone() { + return new DailyInstanceSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DailyInstanceSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DailyInstanceSettleReq(), data).checkInitialized(); + } + + public static DailyInstanceSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceSettleReq(), input).checkInitialized(); + } + + public static DailyInstanceSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DailyInstanceSettleReq messages + */ + public static MessageFactory getFactory() { + return DailyInstanceSettleReqFactory.INSTANCE; + } + + private enum DailyInstanceSettleReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DailyInstanceSettleReq create() { + return DailyInstanceSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DailyInstanceSettleResp} + */ + public static final class DailyInstanceSettleResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Exp = 3; + */ + private int exp; + + /** + * optional .ChangeInfo Change = 15; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Item Select = 1; + */ + private final RepeatedMessage select = RepeatedMessage.newEmptyInstance(Public.Item.getFactory()); + + /** + * repeated .Item First = 2; + */ + private final RepeatedMessage first = RepeatedMessage.newEmptyInstance(Public.Item.getFactory()); + + private DailyInstanceSettleResp() { + } + + /** + * @return a new empty instance of {@code DailyInstanceSettleResp} + */ + public static DailyInstanceSettleResp newInstance() { + return new DailyInstanceSettleResp(); + } + + /** + * optional uint32 Exp = 3; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Exp = 3; + * @return this + */ + public DailyInstanceSettleResp clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 3; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 3; + * @param value the exp to set + * @return this + */ + public DailyInstanceSettleResp setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * optional .ChangeInfo Change = 15; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 15; + * @return this + */ + public DailyInstanceSettleResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 15; + * @param value the change to set + * @return this + */ + public DailyInstanceSettleResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DailyInstanceSettleResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DailyInstanceSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DailyInstanceSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DailyInstanceSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Item Select = 1; + * @return whether the select field is set + */ + public boolean hasSelect() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .Item Select = 1; + * @return this + */ + public DailyInstanceSettleResp clearSelect() { + bitField0_ &= ~0x00000008; + select.clear(); + return this; + } + + /** + * repeated .Item Select = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelect()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getSelect() { + return select; + } + + /** + * repeated .Item Select = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableSelect() { + bitField0_ |= 0x00000008; + return select; + } + + /** + * repeated .Item Select = 1; + * @param value the select to add + * @return this + */ + public DailyInstanceSettleResp addSelect(final Public.Item value) { + bitField0_ |= 0x00000008; + select.add(value); + return this; + } + + /** + * repeated .Item Select = 1; + * @param values the select to add + * @return this + */ + public DailyInstanceSettleResp addAllSelect(final Public.Item... values) { + bitField0_ |= 0x00000008; + select.addAll(values); + return this; + } + + /** + * repeated .Item First = 2; + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .Item First = 2; + * @return this + */ + public DailyInstanceSettleResp clearFirst() { + bitField0_ &= ~0x00000010; + first.clear(); + return this; + } + + /** + * repeated .Item First = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFirst()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFirst() { + return first; + } + + /** + * repeated .Item First = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFirst() { + bitField0_ |= 0x00000010; + return first; + } + + /** + * repeated .Item First = 2; + * @param value the first to add + * @return this + */ + public DailyInstanceSettleResp addFirst(final Public.Item value) { + bitField0_ |= 0x00000010; + first.add(value); + return this; + } + + /** + * repeated .Item First = 2; + * @param values the first to add + * @return this + */ + public DailyInstanceSettleResp addAllFirst(final Public.Item... values) { + bitField0_ |= 0x00000010; + first.addAll(values); + return this; + } + + @Override + public DailyInstanceSettleResp copyFrom(final DailyInstanceSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + select.copyFrom(other.select); + first.copyFrom(other.first); + } + return this; + } + + @Override + public DailyInstanceSettleResp mergeFrom(final DailyInstanceSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSelect()) { + getMutableSelect().addAll(other.select); + } + if (other.hasFirst()) { + getMutableFirst().addAll(other.first); + } + return this; + } + + @Override + public DailyInstanceSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + change.clear(); + nextPackage.clear(); + select.clear(); + first.clear(); + return this; + } + + @Override + public DailyInstanceSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + select.clearQuick(); + first.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DailyInstanceSettleResp)) { + return false; + } + DailyInstanceSettleResp other = (DailyInstanceSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSelect() || select.equals(other.select)) + && (!hasFirst() || first.equals(other.first)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < select.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(select.get(i)); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < first.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(first.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * select.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(select); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * first.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(first); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DailyInstanceSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // select + tag = input.readRepeatedMessage(select, tag); + bitField0_ |= 0x00000008; + if (tag != 18) { + break; + } + } + case 18: { + // first + tag = input.readRepeatedMessage(first, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.select, select); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.first, first); + } + output.endObject(); + } + + @Override + public DailyInstanceSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1822154468: { + if (input.isAtField(FieldNames.select)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(select); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(first); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DailyInstanceSettleResp clone() { + return new DailyInstanceSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DailyInstanceSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DailyInstanceSettleResp(), data).checkInitialized(); + } + + public static DailyInstanceSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceSettleResp(), input).checkInitialized(); + } + + public static DailyInstanceSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstanceSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating DailyInstanceSettleResp messages + */ + public static MessageFactory getFactory() { + return DailyInstanceSettleRespFactory.INSTANCE; + } + + private enum DailyInstanceSettleRespFactory implements MessageFactory { + INSTANCE; + + @Override + public DailyInstanceSettleResp create() { + return DailyInstanceSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName select = FieldName.forField("Select"); + + static final FieldName first = FieldName.forField("First"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/DailyShopRewardReceive.java b/src/generated/main/emu/nebula/proto/DailyShopRewardReceive.java new file mode 100644 index 0000000..ae4d324 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DailyShopRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class DailyShopRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/DictionaryRewardReceive.java b/src/generated/main/emu/nebula/proto/DictionaryRewardReceive.java new file mode 100644 index 0000000..fd72fd4 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DictionaryRewardReceive.java @@ -0,0 +1,462 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class DictionaryRewardReceive { + /** + * Protobuf type {@code DictRewardReq} + */ + public static final class DictRewardReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 TabId = 1; + */ + private int tabId; + + /** + * optional uint32 Index = 2; + */ + private int index; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DictRewardReq() { + } + + /** + * @return a new empty instance of {@code DictRewardReq} + */ + public static DictRewardReq newInstance() { + return new DictRewardReq(); + } + + /** + * optional uint32 TabId = 1; + * @return whether the tabId field is set + */ + public boolean hasTabId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 TabId = 1; + * @return this + */ + public DictRewardReq clearTabId() { + bitField0_ &= ~0x00000001; + tabId = 0; + return this; + } + + /** + * optional uint32 TabId = 1; + * @return the tabId + */ + public int getTabId() { + return tabId; + } + + /** + * optional uint32 TabId = 1; + * @param value the tabId to set + * @return this + */ + public DictRewardReq setTabId(final int value) { + bitField0_ |= 0x00000001; + tabId = value; + return this; + } + + /** + * optional uint32 Index = 2; + * @return whether the index field is set + */ + public boolean hasIndex() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Index = 2; + * @return this + */ + public DictRewardReq clearIndex() { + bitField0_ &= ~0x00000002; + index = 0; + return this; + } + + /** + * optional uint32 Index = 2; + * @return the index + */ + public int getIndex() { + return index; + } + + /** + * optional uint32 Index = 2; + * @param value the index to set + * @return this + */ + public DictRewardReq setIndex(final int value) { + bitField0_ |= 0x00000002; + index = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DictRewardReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DictRewardReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DictRewardReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DictRewardReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DictRewardReq copyFrom(final DictRewardReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + tabId = other.tabId; + index = other.index; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DictRewardReq mergeFrom(final DictRewardReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTabId()) { + setTabId(other.tabId); + } + if (other.hasIndex()) { + setIndex(other.index); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DictRewardReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + tabId = 0; + index = 0; + nextPackage.clear(); + return this; + } + + @Override + public DictRewardReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DictRewardReq)) { + return false; + } + DictRewardReq other = (DictRewardReq) o; + return bitField0_ == other.bitField0_ + && (!hasTabId() || tabId == other.tabId) + && (!hasIndex() || index == other.index) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(index); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(index); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DictRewardReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // tabId + tabId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // index + index = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.tabId, tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.index, index); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DictRewardReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 80562032: { + if (input.isAtField(FieldNames.tabId)) { + if (!input.trySkipNullValue()) { + tabId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70793394: { + if (input.isAtField(FieldNames.index)) { + if (!input.trySkipNullValue()) { + index = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DictRewardReq clone() { + return new DictRewardReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DictRewardReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DictRewardReq(), data).checkInitialized(); + } + + public static DictRewardReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DictRewardReq(), input).checkInitialized(); + } + + public static DictRewardReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DictRewardReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DictRewardReq messages + */ + public static MessageFactory getFactory() { + return DictRewardReqFactory.INSTANCE; + } + + private enum DictRewardReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DictRewardReq create() { + return DictRewardReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName tabId = FieldName.forField("TabId"); + + static final FieldName index = FieldName.forField("Index"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/DiscLimitBreak.java b/src/generated/main/emu/nebula/proto/DiscLimitBreak.java new file mode 100644 index 0000000..6666acc --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DiscLimitBreak.java @@ -0,0 +1,932 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class DiscLimitBreak { + /** + * Protobuf type {@code DiscLimitBreakReq} + */ + public static final class DiscLimitBreakReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Qty = 2; + */ + private int qty; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DiscLimitBreakReq() { + } + + /** + * @return a new empty instance of {@code DiscLimitBreakReq} + */ + public static DiscLimitBreakReq newInstance() { + return new DiscLimitBreakReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public DiscLimitBreakReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public DiscLimitBreakReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Qty = 2; + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Qty = 2; + * @return this + */ + public DiscLimitBreakReq clearQty() { + bitField0_ &= ~0x00000002; + qty = 0; + return this; + } + + /** + * optional uint32 Qty = 2; + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * optional uint32 Qty = 2; + * @param value the qty to set + * @return this + */ + public DiscLimitBreakReq setQty(final int value) { + bitField0_ |= 0x00000002; + qty = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DiscLimitBreakReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DiscLimitBreakReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DiscLimitBreakReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DiscLimitBreakReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DiscLimitBreakReq copyFrom(final DiscLimitBreakReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + qty = other.qty; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscLimitBreakReq mergeFrom(final DiscLimitBreakReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscLimitBreakReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + qty = 0; + nextPackage.clear(); + return this; + } + + @Override + public DiscLimitBreakReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DiscLimitBreakReq)) { + return false; + } + DiscLimitBreakReq other = (DiscLimitBreakReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasQty() || qty == other.qty) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(qty); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DiscLimitBreakReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // qty + qty = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DiscLimitBreakReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DiscLimitBreakReq clone() { + return new DiscLimitBreakReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DiscLimitBreakReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DiscLimitBreakReq(), data).checkInitialized(); + } + + public static DiscLimitBreakReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscLimitBreakReq(), input).checkInitialized(); + } + + public static DiscLimitBreakReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscLimitBreakReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DiscLimitBreakReq messages + */ + public static MessageFactory getFactory() { + return DiscLimitBreakReqFactory.INSTANCE; + } + + private enum DiscLimitBreakReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DiscLimitBreakReq create() { + return DiscLimitBreakReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DiscLimitBreakResp} + */ + public static final class DiscLimitBreakResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Star = 1; + */ + private int star; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DiscLimitBreakResp() { + } + + /** + * @return a new empty instance of {@code DiscLimitBreakResp} + */ + public static DiscLimitBreakResp newInstance() { + return new DiscLimitBreakResp(); + } + + /** + * optional uint32 Star = 1; + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Star = 1; + * @return this + */ + public DiscLimitBreakResp clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * optional uint32 Star = 1; + * @return the star + */ + public int getStar() { + return star; + } + + /** + * optional uint32 Star = 1; + * @param value the star to set + * @return this + */ + public DiscLimitBreakResp setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public DiscLimitBreakResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public DiscLimitBreakResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DiscLimitBreakResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DiscLimitBreakResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DiscLimitBreakResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DiscLimitBreakResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DiscLimitBreakResp copyFrom(final DiscLimitBreakResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscLimitBreakResp mergeFrom(final DiscLimitBreakResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscLimitBreakResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public DiscLimitBreakResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DiscLimitBreakResp)) { + return false; + } + DiscLimitBreakResp other = (DiscLimitBreakResp) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DiscLimitBreakResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DiscLimitBreakResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DiscLimitBreakResp clone() { + return new DiscLimitBreakResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DiscLimitBreakResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DiscLimitBreakResp(), data).checkInitialized(); + } + + public static DiscLimitBreakResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscLimitBreakResp(), input).checkInitialized(); + } + + public static DiscLimitBreakResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscLimitBreakResp(), input).checkInitialized(); + } + + /** + * @return factory for creating DiscLimitBreakResp messages + */ + public static MessageFactory getFactory() { + return DiscLimitBreakRespFactory.INSTANCE; + } + + private enum DiscLimitBreakRespFactory implements MessageFactory { + INSTANCE; + + @Override + public DiscLimitBreakResp create() { + return DiscLimitBreakResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/DiscPromote.java b/src/generated/main/emu/nebula/proto/DiscPromote.java new file mode 100644 index 0000000..f4a1bc3 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DiscPromote.java @@ -0,0 +1,852 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class DiscPromote { + /** + * Protobuf type {@code DiscPromoteReq} + */ + public static final class DiscPromoteReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DiscPromoteReq() { + } + + /** + * @return a new empty instance of {@code DiscPromoteReq} + */ + public static DiscPromoteReq newInstance() { + return new DiscPromoteReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public DiscPromoteReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public DiscPromoteReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DiscPromoteReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DiscPromoteReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DiscPromoteReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DiscPromoteReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DiscPromoteReq copyFrom(final DiscPromoteReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscPromoteReq mergeFrom(final DiscPromoteReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscPromoteReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public DiscPromoteReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DiscPromoteReq)) { + return false; + } + DiscPromoteReq other = (DiscPromoteReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DiscPromoteReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DiscPromoteReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DiscPromoteReq clone() { + return new DiscPromoteReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DiscPromoteReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DiscPromoteReq(), data).checkInitialized(); + } + + public static DiscPromoteReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscPromoteReq(), input).checkInitialized(); + } + + public static DiscPromoteReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscPromoteReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DiscPromoteReq messages + */ + public static MessageFactory getFactory() { + return DiscPromoteReqFactory.INSTANCE; + } + + private enum DiscPromoteReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DiscPromoteReq create() { + return DiscPromoteReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DiscPromoteResp} + */ + public static final class DiscPromoteResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Phase = 1; + */ + private int phase; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DiscPromoteResp() { + } + + /** + * @return a new empty instance of {@code DiscPromoteResp} + */ + public static DiscPromoteResp newInstance() { + return new DiscPromoteResp(); + } + + /** + * optional uint32 Phase = 1; + * @return whether the phase field is set + */ + public boolean hasPhase() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Phase = 1; + * @return this + */ + public DiscPromoteResp clearPhase() { + bitField0_ &= ~0x00000001; + phase = 0; + return this; + } + + /** + * optional uint32 Phase = 1; + * @return the phase + */ + public int getPhase() { + return phase; + } + + /** + * optional uint32 Phase = 1; + * @param value the phase to set + * @return this + */ + public DiscPromoteResp setPhase(final int value) { + bitField0_ |= 0x00000001; + phase = value; + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public DiscPromoteResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public DiscPromoteResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DiscPromoteResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DiscPromoteResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DiscPromoteResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DiscPromoteResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DiscPromoteResp copyFrom(final DiscPromoteResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + phase = other.phase; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscPromoteResp mergeFrom(final DiscPromoteResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPhase()) { + setPhase(other.phase); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscPromoteResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + phase = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public DiscPromoteResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DiscPromoteResp)) { + return false; + } + DiscPromoteResp other = (DiscPromoteResp) o; + return bitField0_ == other.bitField0_ + && (!hasPhase() || phase == other.phase) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(phase); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(phase); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DiscPromoteResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // phase + phase = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.phase, phase); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DiscPromoteResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 77076827: { + if (input.isAtField(FieldNames.phase)) { + if (!input.trySkipNullValue()) { + phase = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DiscPromoteResp clone() { + return new DiscPromoteResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DiscPromoteResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DiscPromoteResp(), data).checkInitialized(); + } + + public static DiscPromoteResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscPromoteResp(), input).checkInitialized(); + } + + public static DiscPromoteResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscPromoteResp(), input).checkInitialized(); + } + + /** + * @return factory for creating DiscPromoteResp messages + */ + public static MessageFactory getFactory() { + return DiscPromoteRespFactory.INSTANCE; + } + + private enum DiscPromoteRespFactory implements MessageFactory { + INSTANCE; + + @Override + public DiscPromoteResp create() { + return DiscPromoteResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName phase = FieldName.forField("Phase"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/DiscReadRewardReceive.java b/src/generated/main/emu/nebula/proto/DiscReadRewardReceive.java new file mode 100644 index 0000000..a77c189 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DiscReadRewardReceive.java @@ -0,0 +1,623 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoEnum; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class DiscReadRewardReceive { + /** + * Protobuf enum {@code DiscReadType} + */ + public enum DiscReadType implements ProtoEnum { + /** + * UnknownType = 0; + */ + UnknownType("UnknownType", 0), + + /** + * DiscStory = 1; + */ + DiscStory("DiscStory", 1), + + /** + * DiscAVG = 2; + */ + DiscAVG("DiscAVG", 2); + + /** + * UnknownType = 0; + */ + public static final int UnknownType_VALUE = 0; + + /** + * DiscStory = 1; + */ + public static final int DiscStory_VALUE = 1; + + /** + * DiscAVG = 2; + */ + public static final int DiscAVG_VALUE = 2; + + private final String name; + + private final int number; + + private DiscReadType(String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter converter() { + return DiscReadTypeConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static DiscReadType forNumber(int value) { + return DiscReadTypeConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static DiscReadType forNumberOr(int number, DiscReadType other) { + DiscReadType value = forNumber(number); + return value == null ? other : value; + } + + enum DiscReadTypeConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final DiscReadType[] lookup = new DiscReadType[3]; + + static { + lookup[0] = UnknownType; + lookup[1] = DiscStory; + lookup[2] = DiscAVG; + } + + @Override + public final DiscReadType forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final DiscReadType forName(final CharSequence value) { + if (value.length() == 7) { + if (ProtoUtil.isEqual("DiscAVG", value)) { + return DiscAVG; + } + } + if (value.length() == 9) { + if (ProtoUtil.isEqual("DiscStory", value)) { + return DiscStory; + } + } + if (value.length() == 11) { + if (ProtoUtil.isEqual("UnknownType", value)) { + return UnknownType; + } + } + return null; + } + } + } + + /** + * Protobuf type {@code DiscReadRewardReceiveReq} + */ + public static final class DiscReadRewardReceiveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional .DiscReadType ReadType = 2; + */ + private int readType; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DiscReadRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code DiscReadRewardReceiveReq} + */ + public static DiscReadRewardReceiveReq newInstance() { + return new DiscReadRewardReceiveReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public DiscReadRewardReceiveReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public DiscReadRewardReceiveReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional .DiscReadType ReadType = 2; + * @return whether the readType field is set + */ + public boolean hasReadType() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .DiscReadType ReadType = 2; + * @return this + */ + public DiscReadRewardReceiveReq clearReadType() { + bitField0_ &= ~0x00000002; + readType = 0; + return this; + } + + /** + * optional .DiscReadType ReadType = 2; + * @return the readType + */ + public DiscReadType getReadType() { + return DiscReadType.forNumber(readType); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link DiscReadRewardReceiveReq#getReadType()}.getNumber(). + * + * @return numeric wire representation + */ + public int getReadTypeValue() { + return readType; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link DiscReadType}. Setting an invalid value + * can cause {@link DiscReadRewardReceiveReq#getReadType()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public DiscReadRewardReceiveReq setReadTypeValue(final int value) { + bitField0_ |= 0x00000002; + readType = value; + return this; + } + + /** + * optional .DiscReadType ReadType = 2; + * @param value the readType to set + * @return this + */ + public DiscReadRewardReceiveReq setReadType(final DiscReadType value) { + bitField0_ |= 0x00000002; + readType = value.getNumber(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DiscReadRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DiscReadRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DiscReadRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DiscReadRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DiscReadRewardReceiveReq copyFrom(final DiscReadRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + readType = other.readType; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscReadRewardReceiveReq mergeFrom(final DiscReadRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasReadType()) { + setReadTypeValue(other.readType); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscReadRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + readType = 0; + nextPackage.clear(); + return this; + } + + @Override + public DiscReadRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DiscReadRewardReceiveReq)) { + return false; + } + DiscReadRewardReceiveReq other = (DiscReadRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasReadType() || readType == other.readType) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeEnumNoTag(readType); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(readType); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DiscReadRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // readType + final int value = input.readInt32(); + if (DiscReadType.forNumber(value) != null) { + readType = value; + bitField0_ |= 0x00000002; + } + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeEnum(FieldNames.readType, readType, DiscReadType.converter()); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DiscReadRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -802879984: { + if (input.isAtField(FieldNames.readType)) { + if (!input.trySkipNullValue()) { + final DiscReadType value = input.readEnum(DiscReadType.converter()); + if (value != null) { + readType = value.getNumber(); + bitField0_ |= 0x00000002; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DiscReadRewardReceiveReq clone() { + return new DiscReadRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DiscReadRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DiscReadRewardReceiveReq(), data).checkInitialized(); + } + + public static DiscReadRewardReceiveReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscReadRewardReceiveReq(), input).checkInitialized(); + } + + public static DiscReadRewardReceiveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscReadRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DiscReadRewardReceiveReq messages + */ + public static MessageFactory getFactory() { + return DiscReadRewardReceiveReqFactory.INSTANCE; + } + + private enum DiscReadRewardReceiveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DiscReadRewardReceiveReq create() { + return DiscReadRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName readType = FieldName.forField("ReadType"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/DiscStrengthen.java b/src/generated/main/emu/nebula/proto/DiscStrengthen.java new file mode 100644 index 0000000..dcc514d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/DiscStrengthen.java @@ -0,0 +1,1046 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class DiscStrengthen { + /** + * Protobuf type {@code DiscStrengthenReq} + */ + public static final class DiscStrengthenReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemInfo Items = 2; + */ + private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(Public.ItemInfo.getFactory()); + + private DiscStrengthenReq() { + } + + /** + * @return a new empty instance of {@code DiscStrengthenReq} + */ + public static DiscStrengthenReq newInstance() { + return new DiscStrengthenReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public DiscStrengthenReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public DiscStrengthenReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DiscStrengthenReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DiscStrengthenReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DiscStrengthenReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DiscStrengthenReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemInfo Items = 2; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemInfo Items = 2; + * @return this + */ + public DiscStrengthenReq clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * repeated .ItemInfo Items = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getItems() { + return items; + } + + /** + * repeated .ItemInfo Items = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * repeated .ItemInfo Items = 2; + * @param value the items to add + * @return this + */ + public DiscStrengthenReq addItems(final Public.ItemInfo value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * repeated .ItemInfo Items = 2; + * @param values the items to add + * @return this + */ + public DiscStrengthenReq addAllItems(final Public.ItemInfo... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + @Override + public DiscStrengthenReq copyFrom(final DiscStrengthenReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public DiscStrengthenReq mergeFrom(final DiscStrengthenReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public DiscStrengthenReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public DiscStrengthenReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DiscStrengthenReq)) { + return false; + } + DiscStrengthenReq other = (DiscStrengthenReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DiscStrengthenReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public DiscStrengthenReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DiscStrengthenReq clone() { + return new DiscStrengthenReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DiscStrengthenReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DiscStrengthenReq(), data).checkInitialized(); + } + + public static DiscStrengthenReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscStrengthenReq(), input).checkInitialized(); + } + + public static DiscStrengthenReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscStrengthenReq(), input).checkInitialized(); + } + + /** + * @return factory for creating DiscStrengthenReq messages + */ + public static MessageFactory getFactory() { + return DiscStrengthenReqFactory.INSTANCE; + } + + private enum DiscStrengthenReqFactory implements MessageFactory { + INSTANCE; + + @Override + public DiscStrengthenReq create() { + return DiscStrengthenReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } + + /** + * Protobuf type {@code DiscStrengthenResp} + */ + public static final class DiscStrengthenResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Level = 1; + */ + private int level; + + /** + * optional uint32 Exp = 2; + */ + private int exp; + + /** + * optional .ChangeInfo Change = 3; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DiscStrengthenResp() { + } + + /** + * @return a new empty instance of {@code DiscStrengthenResp} + */ + public static DiscStrengthenResp newInstance() { + return new DiscStrengthenResp(); + } + + /** + * optional uint32 Level = 1; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Level = 1; + * @return this + */ + public DiscStrengthenResp clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * optional uint32 Level = 1; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 1; + * @param value the level to set + * @return this + */ + public DiscStrengthenResp setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Exp = 2; + * @return this + */ + public DiscStrengthenResp clearExp() { + bitField0_ &= ~0x00000002; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 2; + * @param value the exp to set + * @return this + */ + public DiscStrengthenResp setExp(final int value) { + bitField0_ |= 0x00000002; + exp = value; + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .ChangeInfo Change = 3; + * @return this + */ + public DiscStrengthenResp clearChange() { + bitField0_ &= ~0x00000004; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000004; + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * @param value the change to set + * @return this + */ + public DiscStrengthenResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000004; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DiscStrengthenResp clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DiscStrengthenResp addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DiscStrengthenResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DiscStrengthenResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DiscStrengthenResp copyFrom(final DiscStrengthenResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + exp = other.exp; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscStrengthenResp mergeFrom(final DiscStrengthenResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DiscStrengthenResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + exp = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public DiscStrengthenResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DiscStrengthenResp)) { + return false; + } + DiscStrengthenResp other = (DiscStrengthenResp) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasExp() || exp == other.exp) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DiscStrengthenResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DiscStrengthenResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DiscStrengthenResp clone() { + return new DiscStrengthenResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DiscStrengthenResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DiscStrengthenResp(), data).checkInitialized(); + } + + public static DiscStrengthenResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscStrengthenResp(), input).checkInitialized(); + } + + public static DiscStrengthenResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DiscStrengthenResp(), input).checkInitialized(); + } + + /** + * @return factory for creating DiscStrengthenResp messages + */ + public static MessageFactory getFactory() { + return DiscStrengthenRespFactory.INSTANCE; + } + + private enum DiscStrengthenRespFactory implements MessageFactory { + INSTANCE; + + @Override + public DiscStrengthenResp create() { + return DiscStrengthenResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/EnergyBuy.java b/src/generated/main/emu/nebula/proto/EnergyBuy.java new file mode 100644 index 0000000..5ff1a4b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/EnergyBuy.java @@ -0,0 +1,483 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class EnergyBuy { + /** + * Protobuf type {@code EnergyBuyResp} + */ + public static final class EnergyBuyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Count = 1; + */ + private int count; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private EnergyBuyResp() { + } + + /** + * @return a new empty instance of {@code EnergyBuyResp} + */ + public static EnergyBuyResp newInstance() { + return new EnergyBuyResp(); + } + + /** + * optional uint32 Count = 1; + * @return whether the count field is set + */ + public boolean hasCount() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Count = 1; + * @return this + */ + public EnergyBuyResp clearCount() { + bitField0_ &= ~0x00000001; + count = 0; + return this; + } + + /** + * optional uint32 Count = 1; + * @return the count + */ + public int getCount() { + return count; + } + + /** + * optional uint32 Count = 1; + * @param value the count to set + * @return this + */ + public EnergyBuyResp setCount(final int value) { + bitField0_ |= 0x00000001; + count = value; + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public EnergyBuyResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public EnergyBuyResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public EnergyBuyResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public EnergyBuyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public EnergyBuyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public EnergyBuyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public EnergyBuyResp copyFrom(final EnergyBuyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + count = other.count; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EnergyBuyResp mergeFrom(final EnergyBuyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCount()) { + setCount(other.count); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EnergyBuyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + count = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public EnergyBuyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof EnergyBuyResp)) { + return false; + } + EnergyBuyResp other = (EnergyBuyResp) o; + return bitField0_ == other.bitField0_ + && (!hasCount() || count == other.count) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(count); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(count); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public EnergyBuyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // count + count = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.count, count); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public EnergyBuyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 65298671: { + if (input.isAtField(FieldNames.count)) { + if (!input.trySkipNullValue()) { + count = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public EnergyBuyResp clone() { + return new EnergyBuyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static EnergyBuyResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new EnergyBuyResp(), data).checkInitialized(); + } + + public static EnergyBuyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new EnergyBuyResp(), input).checkInitialized(); + } + + public static EnergyBuyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new EnergyBuyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating EnergyBuyResp messages + */ + public static MessageFactory getFactory() { + return EnergyBuyRespFactory.INSTANCE; + } + + private enum EnergyBuyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public EnergyBuyResp create() { + return EnergyBuyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName count = FieldName.forField("Count"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/EnergyExtract.java b/src/generated/main/emu/nebula/proto/EnergyExtract.java new file mode 100644 index 0000000..06330d9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/EnergyExtract.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class EnergyExtract { +} diff --git a/src/generated/main/emu/nebula/proto/FragmentsConvert.java b/src/generated/main/emu/nebula/proto/FragmentsConvert.java new file mode 100644 index 0000000..cc9278a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FragmentsConvert.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class FragmentsConvert { +} diff --git a/src/generated/main/emu/nebula/proto/FriendAdd.java b/src/generated/main/emu/nebula/proto/FriendAdd.java new file mode 100644 index 0000000..76d571e --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendAdd.java @@ -0,0 +1,382 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class FriendAdd { + /** + * Protobuf type {@code FriendAddReq} + */ + public static final class FriendAddReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 UId = 1; + */ + private long uId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendAddReq() { + } + + /** + * @return a new empty instance of {@code FriendAddReq} + */ + public static FriendAddReq newInstance() { + return new FriendAddReq(); + } + + /** + * optional uint64 UId = 1; + * @return whether the uId field is set + */ + public boolean hasUId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 UId = 1; + * @return this + */ + public FriendAddReq clearUId() { + bitField0_ &= ~0x00000001; + uId = 0L; + return this; + } + + /** + * optional uint64 UId = 1; + * @return the uId + */ + public long getUId() { + return uId; + } + + /** + * optional uint64 UId = 1; + * @param value the uId to set + * @return this + */ + public FriendAddReq setUId(final long value) { + bitField0_ |= 0x00000001; + uId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendAddReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendAddReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendAddReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendAddReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendAddReq copyFrom(final FriendAddReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + uId = other.uId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendAddReq mergeFrom(final FriendAddReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasUId()) { + setUId(other.uId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendAddReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + uId = 0L; + nextPackage.clear(); + return this; + } + + @Override + public FriendAddReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendAddReq)) { + return false; + } + FriendAddReq other = (FriendAddReq) o; + return bitField0_ == other.bitField0_ + && (!hasUId() || uId == other.uId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(uId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendAddReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // uId + uId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.uId, uId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendAddReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 84048: { + if (input.isAtField(FieldNames.uId)) { + if (!input.trySkipNullValue()) { + uId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendAddReq clone() { + return new FriendAddReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendAddReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendAddReq(), data).checkInitialized(); + } + + public static FriendAddReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAddReq(), input).checkInitialized(); + } + + public static FriendAddReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAddReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendAddReq messages + */ + public static MessageFactory getFactory() { + return FriendAddReqFactory.INSTANCE; + } + + private enum FriendAddReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendAddReq create() { + return FriendAddReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName uId = FieldName.forField("UId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendAddAgree.java b/src/generated/main/emu/nebula/proto/FriendAddAgree.java new file mode 100644 index 0000000..e2c564f --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendAddAgree.java @@ -0,0 +1,772 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class FriendAddAgree { + /** + * Protobuf type {@code FriendAddAgreeReq} + */ + public static final class FriendAddAgreeReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 UId = 1; + */ + private long uId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendAddAgreeReq() { + } + + /** + * @return a new empty instance of {@code FriendAddAgreeReq} + */ + public static FriendAddAgreeReq newInstance() { + return new FriendAddAgreeReq(); + } + + /** + * optional uint64 UId = 1; + * @return whether the uId field is set + */ + public boolean hasUId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 UId = 1; + * @return this + */ + public FriendAddAgreeReq clearUId() { + bitField0_ &= ~0x00000001; + uId = 0L; + return this; + } + + /** + * optional uint64 UId = 1; + * @return the uId + */ + public long getUId() { + return uId; + } + + /** + * optional uint64 UId = 1; + * @param value the uId to set + * @return this + */ + public FriendAddAgreeReq setUId(final long value) { + bitField0_ |= 0x00000001; + uId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendAddAgreeReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendAddAgreeReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendAddAgreeReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendAddAgreeReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendAddAgreeReq copyFrom(final FriendAddAgreeReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + uId = other.uId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendAddAgreeReq mergeFrom(final FriendAddAgreeReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasUId()) { + setUId(other.uId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendAddAgreeReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + uId = 0L; + nextPackage.clear(); + return this; + } + + @Override + public FriendAddAgreeReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendAddAgreeReq)) { + return false; + } + FriendAddAgreeReq other = (FriendAddAgreeReq) o; + return bitField0_ == other.bitField0_ + && (!hasUId() || uId == other.uId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(uId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendAddAgreeReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // uId + uId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.uId, uId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendAddAgreeReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 84048: { + if (input.isAtField(FieldNames.uId)) { + if (!input.trySkipNullValue()) { + uId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendAddAgreeReq clone() { + return new FriendAddAgreeReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendAddAgreeReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendAddAgreeReq(), data).checkInitialized(); + } + + public static FriendAddAgreeReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAddAgreeReq(), input).checkInitialized(); + } + + public static FriendAddAgreeReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAddAgreeReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendAddAgreeReq messages + */ + public static MessageFactory getFactory() { + return FriendAddAgreeReqFactory.INSTANCE; + } + + private enum FriendAddAgreeReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendAddAgreeReq create() { + return FriendAddAgreeReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName uId = FieldName.forField("UId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FriendAddAgreeResp} + */ + public static final class FriendAddAgreeResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .Friend Friend = 1; + */ + private final Public.Friend friend = Public.Friend.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendAddAgreeResp() { + } + + /** + * @return a new empty instance of {@code FriendAddAgreeResp} + */ + public static FriendAddAgreeResp newInstance() { + return new FriendAddAgreeResp(); + } + + /** + * optional .Friend Friend = 1; + * @return whether the friend field is set + */ + public boolean hasFriend() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .Friend Friend = 1; + * @return this + */ + public FriendAddAgreeResp clearFriend() { + bitField0_ &= ~0x00000001; + friend.clear(); + return this; + } + + /** + * optional .Friend Friend = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFriend()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Friend getFriend() { + return friend; + } + + /** + * optional .Friend Friend = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Friend getMutableFriend() { + bitField0_ |= 0x00000001; + return friend; + } + + /** + * optional .Friend Friend = 1; + * @param value the friend to set + * @return this + */ + public FriendAddAgreeResp setFriend(final Public.Friend value) { + bitField0_ |= 0x00000001; + friend.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendAddAgreeResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendAddAgreeResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendAddAgreeResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendAddAgreeResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendAddAgreeResp copyFrom(final FriendAddAgreeResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + friend.copyFrom(other.friend); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendAddAgreeResp mergeFrom(final FriendAddAgreeResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFriend()) { + getMutableFriend().mergeFrom(other.friend); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendAddAgreeResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + friend.clear(); + nextPackage.clear(); + return this; + } + + @Override + public FriendAddAgreeResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + friend.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendAddAgreeResp)) { + return false; + } + FriendAddAgreeResp other = (FriendAddAgreeResp) o; + return bitField0_ == other.bitField0_ + && (!hasFriend() || friend.equals(other.friend)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(friend); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(friend); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendAddAgreeResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // friend + input.readMessage(friend); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.friend, friend); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendAddAgreeResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2112550590: { + if (input.isAtField(FieldNames.friend)) { + if (!input.trySkipNullValue()) { + input.readMessage(friend); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendAddAgreeResp clone() { + return new FriendAddAgreeResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendAddAgreeResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendAddAgreeResp(), data).checkInitialized(); + } + + public static FriendAddAgreeResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAddAgreeResp(), input).checkInitialized(); + } + + public static FriendAddAgreeResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAddAgreeResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendAddAgreeResp messages + */ + public static MessageFactory getFactory() { + return FriendAddAgreeRespFactory.INSTANCE; + } + + private enum FriendAddAgreeRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendAddAgreeResp create() { + return FriendAddAgreeResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName friend = FieldName.forField("Friend"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendAllAgree.java b/src/generated/main/emu/nebula/proto/FriendAllAgree.java new file mode 100644 index 0000000..6b6628f --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendAllAgree.java @@ -0,0 +1,610 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class FriendAllAgree { + /** + * Protobuf type {@code FriendAllAgreeResp} + */ + public static final class FriendAllAgreeResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool Limit = 1; + */ + private boolean limit; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Friend Friends = 2; + */ + private final RepeatedMessage friends = RepeatedMessage.newEmptyInstance(Public.Friend.getFactory()); + + /** + * repeated .Friend Invites = 3; + */ + private final RepeatedMessage invites = RepeatedMessage.newEmptyInstance(Public.Friend.getFactory()); + + private FriendAllAgreeResp() { + } + + /** + * @return a new empty instance of {@code FriendAllAgreeResp} + */ + public static FriendAllAgreeResp newInstance() { + return new FriendAllAgreeResp(); + } + + /** + * optional bool Limit = 1; + * @return whether the limit field is set + */ + public boolean hasLimit() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool Limit = 1; + * @return this + */ + public FriendAllAgreeResp clearLimit() { + bitField0_ &= ~0x00000001; + limit = false; + return this; + } + + /** + * optional bool Limit = 1; + * @return the limit + */ + public boolean getLimit() { + return limit; + } + + /** + * optional bool Limit = 1; + * @param value the limit to set + * @return this + */ + public FriendAllAgreeResp setLimit(final boolean value) { + bitField0_ |= 0x00000001; + limit = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendAllAgreeResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendAllAgreeResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendAllAgreeResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendAllAgreeResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Friend Friends = 2; + * @return whether the friends field is set + */ + public boolean hasFriends() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .Friend Friends = 2; + * @return this + */ + public FriendAllAgreeResp clearFriends() { + bitField0_ &= ~0x00000004; + friends.clear(); + return this; + } + + /** + * repeated .Friend Friends = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFriends()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFriends() { + return friends; + } + + /** + * repeated .Friend Friends = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFriends() { + bitField0_ |= 0x00000004; + return friends; + } + + /** + * repeated .Friend Friends = 2; + * @param value the friends to add + * @return this + */ + public FriendAllAgreeResp addFriends(final Public.Friend value) { + bitField0_ |= 0x00000004; + friends.add(value); + return this; + } + + /** + * repeated .Friend Friends = 2; + * @param values the friends to add + * @return this + */ + public FriendAllAgreeResp addAllFriends(final Public.Friend... values) { + bitField0_ |= 0x00000004; + friends.addAll(values); + return this; + } + + /** + * repeated .Friend Invites = 3; + * @return whether the invites field is set + */ + public boolean hasInvites() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .Friend Invites = 3; + * @return this + */ + public FriendAllAgreeResp clearInvites() { + bitField0_ &= ~0x00000008; + invites.clear(); + return this; + } + + /** + * repeated .Friend Invites = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInvites()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInvites() { + return invites; + } + + /** + * repeated .Friend Invites = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInvites() { + bitField0_ |= 0x00000008; + return invites; + } + + /** + * repeated .Friend Invites = 3; + * @param value the invites to add + * @return this + */ + public FriendAllAgreeResp addInvites(final Public.Friend value) { + bitField0_ |= 0x00000008; + invites.add(value); + return this; + } + + /** + * repeated .Friend Invites = 3; + * @param values the invites to add + * @return this + */ + public FriendAllAgreeResp addAllInvites(final Public.Friend... values) { + bitField0_ |= 0x00000008; + invites.addAll(values); + return this; + } + + @Override + public FriendAllAgreeResp copyFrom(final FriendAllAgreeResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + limit = other.limit; + nextPackage.copyFrom(other.nextPackage); + friends.copyFrom(other.friends); + invites.copyFrom(other.invites); + } + return this; + } + + @Override + public FriendAllAgreeResp mergeFrom(final FriendAllAgreeResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLimit()) { + setLimit(other.limit); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasFriends()) { + getMutableFriends().addAll(other.friends); + } + if (other.hasInvites()) { + getMutableInvites().addAll(other.invites); + } + return this; + } + + @Override + public FriendAllAgreeResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + limit = false; + nextPackage.clear(); + friends.clear(); + invites.clear(); + return this; + } + + @Override + public FriendAllAgreeResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + friends.clearQuick(); + invites.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendAllAgreeResp)) { + return false; + } + FriendAllAgreeResp other = (FriendAllAgreeResp) o; + return bitField0_ == other.bitField0_ + && (!hasLimit() || limit == other.limit) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasFriends() || friends.equals(other.friends)) + && (!hasInvites() || invites.equals(other.invites)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(limit); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < friends.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(friends.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < invites.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(invites.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * friends.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(friends); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * invites.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(invites); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendAllAgreeResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // limit + limit = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // friends + tag = input.readRepeatedMessage(friends, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // invites + tag = input.readRepeatedMessage(invites, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.limit, limit); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.friends, friends); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.invites, invites); + } + output.endObject(); + } + + @Override + public FriendAllAgreeResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73423771: { + if (input.isAtField(FieldNames.limit)) { + if (!input.trySkipNullValue()) { + limit = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1064558965: { + if (input.isAtField(FieldNames.friends)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(friends); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -670283158: { + if (input.isAtField(FieldNames.invites)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(invites); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendAllAgreeResp clone() { + return new FriendAllAgreeResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendAllAgreeResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendAllAgreeResp(), data).checkInitialized(); + } + + public static FriendAllAgreeResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAllAgreeResp(), input).checkInitialized(); + } + + public static FriendAllAgreeResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendAllAgreeResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendAllAgreeResp messages + */ + public static MessageFactory getFactory() { + return FriendAllAgreeRespFactory.INSTANCE; + } + + private enum FriendAllAgreeRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendAllAgreeResp create() { + return FriendAllAgreeResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName limit = FieldName.forField("Limit"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName friends = FieldName.forField("Friends"); + + static final FieldName invites = FieldName.forField("Invites"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendDelete.java b/src/generated/main/emu/nebula/proto/FriendDelete.java new file mode 100644 index 0000000..e674309 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendDelete.java @@ -0,0 +1,383 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class FriendDelete { + /** + * Protobuf type {@code FriendDeleteReq} + */ + public static final class FriendDeleteReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 UId = 1; + */ + private long uId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendDeleteReq() { + } + + /** + * @return a new empty instance of {@code FriendDeleteReq} + */ + public static FriendDeleteReq newInstance() { + return new FriendDeleteReq(); + } + + /** + * optional uint64 UId = 1; + * @return whether the uId field is set + */ + public boolean hasUId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 UId = 1; + * @return this + */ + public FriendDeleteReq clearUId() { + bitField0_ &= ~0x00000001; + uId = 0L; + return this; + } + + /** + * optional uint64 UId = 1; + * @return the uId + */ + public long getUId() { + return uId; + } + + /** + * optional uint64 UId = 1; + * @param value the uId to set + * @return this + */ + public FriendDeleteReq setUId(final long value) { + bitField0_ |= 0x00000001; + uId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendDeleteReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendDeleteReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendDeleteReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendDeleteReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendDeleteReq copyFrom(final FriendDeleteReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + uId = other.uId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendDeleteReq mergeFrom(final FriendDeleteReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasUId()) { + setUId(other.uId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendDeleteReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + uId = 0L; + nextPackage.clear(); + return this; + } + + @Override + public FriendDeleteReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendDeleteReq)) { + return false; + } + FriendDeleteReq other = (FriendDeleteReq) o; + return bitField0_ == other.bitField0_ + && (!hasUId() || uId == other.uId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(uId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendDeleteReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // uId + uId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.uId, uId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendDeleteReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 84048: { + if (input.isAtField(FieldNames.uId)) { + if (!input.trySkipNullValue()) { + uId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendDeleteReq clone() { + return new FriendDeleteReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendDeleteReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendDeleteReq(), data).checkInitialized(); + } + + public static FriendDeleteReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendDeleteReq(), input).checkInitialized(); + } + + public static FriendDeleteReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendDeleteReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendDeleteReq messages + */ + public static MessageFactory getFactory() { + return FriendDeleteReqFactory.INSTANCE; + } + + private enum FriendDeleteReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendDeleteReq create() { + return FriendDeleteReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName uId = FieldName.forField("UId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendInvitesDelete.java b/src/generated/main/emu/nebula/proto/FriendInvitesDelete.java new file mode 100644 index 0000000..4d2a329 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendInvitesDelete.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; + +public final class FriendInvitesDelete { + /** + * Protobuf type {@code FriendInvitesDeleteReq} + */ + public static final class FriendInvitesDeleteReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint64 UIds = 1; + */ + private final RepeatedLong uIds = RepeatedLong.newEmptyInstance(); + + private FriendInvitesDeleteReq() { + } + + /** + * @return a new empty instance of {@code FriendInvitesDeleteReq} + */ + public static FriendInvitesDeleteReq newInstance() { + return new FriendInvitesDeleteReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendInvitesDeleteReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendInvitesDeleteReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendInvitesDeleteReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendInvitesDeleteReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @return whether the uIds field is set + */ + public boolean hasUIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint64 UIds = 1; + * @return this + */ + public FriendInvitesDeleteReq clearUIds() { + bitField0_ &= ~0x00000002; + uIds.clear(); + return this; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableUIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getUIds() { + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableUIds() { + bitField0_ |= 0x00000002; + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * @param value the uIds to add + * @return this + */ + public FriendInvitesDeleteReq addUIds(final long value) { + bitField0_ |= 0x00000002; + uIds.add(value); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @param values the uIds to add + * @return this + */ + public FriendInvitesDeleteReq addAllUIds(final long... values) { + bitField0_ |= 0x00000002; + uIds.addAll(values); + return this; + } + + @Override + public FriendInvitesDeleteReq copyFrom(final FriendInvitesDeleteReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + uIds.copyFrom(other.uIds); + } + return this; + } + + @Override + public FriendInvitesDeleteReq mergeFrom(final FriendInvitesDeleteReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasUIds()) { + getMutableUIds().addAll(other.uIds); + } + return this; + } + + @Override + public FriendInvitesDeleteReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public FriendInvitesDeleteReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendInvitesDeleteReq)) { + return false; + } + FriendInvitesDeleteReq other = (FriendInvitesDeleteReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasUIds() || uIds.equals(other.uIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < uIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * uIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(uIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendInvitesDeleteReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // uIds [packed=true] + input.readPackedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // uIds [packed=false] + tag = input.readRepeatedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt64(FieldNames.uIds, uIds); + } + output.endObject(); + } + + @Override + public FriendInvitesDeleteReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2605603: { + if (input.isAtField(FieldNames.uIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(uIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendInvitesDeleteReq clone() { + return new FriendInvitesDeleteReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendInvitesDeleteReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendInvitesDeleteReq(), data).checkInitialized(); + } + + public static FriendInvitesDeleteReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendInvitesDeleteReq(), input).checkInitialized(); + } + + public static FriendInvitesDeleteReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendInvitesDeleteReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendInvitesDeleteReq messages + */ + public static MessageFactory getFactory() { + return FriendInvitesDeleteReqFactory.INSTANCE; + } + + private enum FriendInvitesDeleteReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendInvitesDeleteReq create() { + return FriendInvitesDeleteReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName uIds = FieldName.forField("UIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendListGet.java b/src/generated/main/emu/nebula/proto/FriendListGet.java new file mode 100644 index 0000000..b027122 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendListGet.java @@ -0,0 +1,610 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class FriendListGet { + /** + * Protobuf type {@code FriendListGetResp} + */ + public static final class FriendListGetResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ReceiveEnergyCnt = 3; + */ + private int receiveEnergyCnt; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .FriendDetail Friends = 1; + */ + private final RepeatedMessage friends = RepeatedMessage.newEmptyInstance(Public.FriendDetail.getFactory()); + + /** + * repeated .Friend Invites = 2; + */ + private final RepeatedMessage invites = RepeatedMessage.newEmptyInstance(Public.Friend.getFactory()); + + private FriendListGetResp() { + } + + /** + * @return a new empty instance of {@code FriendListGetResp} + */ + public static FriendListGetResp newInstance() { + return new FriendListGetResp(); + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @return whether the receiveEnergyCnt field is set + */ + public boolean hasReceiveEnergyCnt() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @return this + */ + public FriendListGetResp clearReceiveEnergyCnt() { + bitField0_ &= ~0x00000001; + receiveEnergyCnt = 0; + return this; + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @return the receiveEnergyCnt + */ + public int getReceiveEnergyCnt() { + return receiveEnergyCnt; + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @param value the receiveEnergyCnt to set + * @return this + */ + public FriendListGetResp setReceiveEnergyCnt(final int value) { + bitField0_ |= 0x00000001; + receiveEnergyCnt = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendListGetResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendListGetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendListGetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendListGetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .FriendDetail Friends = 1; + * @return whether the friends field is set + */ + public boolean hasFriends() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .FriendDetail Friends = 1; + * @return this + */ + public FriendListGetResp clearFriends() { + bitField0_ &= ~0x00000004; + friends.clear(); + return this; + } + + /** + * repeated .FriendDetail Friends = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFriends()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFriends() { + return friends; + } + + /** + * repeated .FriendDetail Friends = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFriends() { + bitField0_ |= 0x00000004; + return friends; + } + + /** + * repeated .FriendDetail Friends = 1; + * @param value the friends to add + * @return this + */ + public FriendListGetResp addFriends(final Public.FriendDetail value) { + bitField0_ |= 0x00000004; + friends.add(value); + return this; + } + + /** + * repeated .FriendDetail Friends = 1; + * @param values the friends to add + * @return this + */ + public FriendListGetResp addAllFriends(final Public.FriendDetail... values) { + bitField0_ |= 0x00000004; + friends.addAll(values); + return this; + } + + /** + * repeated .Friend Invites = 2; + * @return whether the invites field is set + */ + public boolean hasInvites() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .Friend Invites = 2; + * @return this + */ + public FriendListGetResp clearInvites() { + bitField0_ &= ~0x00000008; + invites.clear(); + return this; + } + + /** + * repeated .Friend Invites = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInvites()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInvites() { + return invites; + } + + /** + * repeated .Friend Invites = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInvites() { + bitField0_ |= 0x00000008; + return invites; + } + + /** + * repeated .Friend Invites = 2; + * @param value the invites to add + * @return this + */ + public FriendListGetResp addInvites(final Public.Friend value) { + bitField0_ |= 0x00000008; + invites.add(value); + return this; + } + + /** + * repeated .Friend Invites = 2; + * @param values the invites to add + * @return this + */ + public FriendListGetResp addAllInvites(final Public.Friend... values) { + bitField0_ |= 0x00000008; + invites.addAll(values); + return this; + } + + @Override + public FriendListGetResp copyFrom(final FriendListGetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + receiveEnergyCnt = other.receiveEnergyCnt; + nextPackage.copyFrom(other.nextPackage); + friends.copyFrom(other.friends); + invites.copyFrom(other.invites); + } + return this; + } + + @Override + public FriendListGetResp mergeFrom(final FriendListGetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasReceiveEnergyCnt()) { + setReceiveEnergyCnt(other.receiveEnergyCnt); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasFriends()) { + getMutableFriends().addAll(other.friends); + } + if (other.hasInvites()) { + getMutableInvites().addAll(other.invites); + } + return this; + } + + @Override + public FriendListGetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + receiveEnergyCnt = 0; + nextPackage.clear(); + friends.clear(); + invites.clear(); + return this; + } + + @Override + public FriendListGetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + friends.clearQuick(); + invites.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendListGetResp)) { + return false; + } + FriendListGetResp other = (FriendListGetResp) o; + return bitField0_ == other.bitField0_ + && (!hasReceiveEnergyCnt() || receiveEnergyCnt == other.receiveEnergyCnt) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasFriends() || friends.equals(other.friends)) + && (!hasInvites() || invites.equals(other.invites)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(receiveEnergyCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < friends.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(friends.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < invites.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(invites.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(receiveEnergyCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * friends.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(friends); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * invites.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(invites); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendListGetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // receiveEnergyCnt + receiveEnergyCnt = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // friends + tag = input.readRepeatedMessage(friends, tag); + bitField0_ |= 0x00000004; + if (tag != 18) { + break; + } + } + case 18: { + // invites + tag = input.readRepeatedMessage(invites, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.receiveEnergyCnt, receiveEnergyCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.friends, friends); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.invites, invites); + } + output.endObject(); + } + + @Override + public FriendListGetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1854543298: { + if (input.isAtField(FieldNames.receiveEnergyCnt)) { + if (!input.trySkipNullValue()) { + receiveEnergyCnt = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1064558965: { + if (input.isAtField(FieldNames.friends)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(friends); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -670283158: { + if (input.isAtField(FieldNames.invites)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(invites); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendListGetResp clone() { + return new FriendListGetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendListGetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendListGetResp(), data).checkInitialized(); + } + + public static FriendListGetResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendListGetResp(), input).checkInitialized(); + } + + public static FriendListGetResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendListGetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendListGetResp messages + */ + public static MessageFactory getFactory() { + return FriendListGetRespFactory.INSTANCE; + } + + private enum FriendListGetRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendListGetResp create() { + return FriendListGetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName receiveEnergyCnt = FieldName.forField("ReceiveEnergyCnt"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName friends = FieldName.forField("Friends"); + + static final FieldName invites = FieldName.forField("Invites"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendNameSearch.java b/src/generated/main/emu/nebula/proto/FriendNameSearch.java new file mode 100644 index 0000000..153d610 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendNameSearch.java @@ -0,0 +1,815 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class FriendNameSearch { + /** + * Protobuf type {@code FriendNameSearchReq} + */ + public static final class FriendNameSearchReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Name = 1; + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + private FriendNameSearchReq() { + } + + /** + * @return a new empty instance of {@code FriendNameSearchReq} + */ + public static FriendNameSearchReq newInstance() { + return new FriendNameSearchReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendNameSearchReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendNameSearchReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendNameSearchReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendNameSearchReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Name = 1; + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Name = 1; + * @return this + */ + public FriendNameSearchReq clearName() { + bitField0_ &= ~0x00000002; + name.clear(); + return this; + } + + /** + * optional string Name = 1; + * @return the name + */ + public String getName() { + return name.getString(); + } + + /** + * optional string Name = 1; + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * optional string Name = 1; + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000002; + return this.name; + } + + /** + * optional string Name = 1; + * @param value the name to set + * @return this + */ + public FriendNameSearchReq setName(final CharSequence value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + /** + * optional string Name = 1; + * @param value the name to set + * @return this + */ + public FriendNameSearchReq setName(final Utf8String value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + @Override + public FriendNameSearchReq copyFrom(final FriendNameSearchReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + name.copyFrom(other.name); + } + return this; + } + + @Override + public FriendNameSearchReq mergeFrom(final FriendNameSearchReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + return this; + } + + @Override + public FriendNameSearchReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + return this; + } + + @Override + public FriendNameSearchReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendNameSearchReq)) { + return false; + } + FriendNameSearchReq other = (FriendNameSearchReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasName() || name.equals(other.name)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(name); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendNameSearchReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // name + input.readString(name); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.name, name); + } + output.endObject(); + } + + @Override + public FriendNameSearchReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2420395: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendNameSearchReq clone() { + return new FriendNameSearchReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendNameSearchReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendNameSearchReq(), data).checkInitialized(); + } + + public static FriendNameSearchReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendNameSearchReq(), input).checkInitialized(); + } + + public static FriendNameSearchReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendNameSearchReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendNameSearchReq messages + */ + public static MessageFactory getFactory() { + return FriendNameSearchReqFactory.INSTANCE; + } + + private enum FriendNameSearchReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendNameSearchReq create() { + return FriendNameSearchReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName name = FieldName.forField("Name"); + } + } + + /** + * Protobuf type {@code FriendNameSearchResp} + */ + public static final class FriendNameSearchResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Friend Friends = 1; + */ + private final RepeatedMessage friends = RepeatedMessage.newEmptyInstance(Public.Friend.getFactory()); + + private FriendNameSearchResp() { + } + + /** + * @return a new empty instance of {@code FriendNameSearchResp} + */ + public static FriendNameSearchResp newInstance() { + return new FriendNameSearchResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendNameSearchResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendNameSearchResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendNameSearchResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendNameSearchResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Friend Friends = 1; + * @return whether the friends field is set + */ + public boolean hasFriends() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Friend Friends = 1; + * @return this + */ + public FriendNameSearchResp clearFriends() { + bitField0_ &= ~0x00000002; + friends.clear(); + return this; + } + + /** + * repeated .Friend Friends = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFriends()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFriends() { + return friends; + } + + /** + * repeated .Friend Friends = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFriends() { + bitField0_ |= 0x00000002; + return friends; + } + + /** + * repeated .Friend Friends = 1; + * @param value the friends to add + * @return this + */ + public FriendNameSearchResp addFriends(final Public.Friend value) { + bitField0_ |= 0x00000002; + friends.add(value); + return this; + } + + /** + * repeated .Friend Friends = 1; + * @param values the friends to add + * @return this + */ + public FriendNameSearchResp addAllFriends(final Public.Friend... values) { + bitField0_ |= 0x00000002; + friends.addAll(values); + return this; + } + + @Override + public FriendNameSearchResp copyFrom(final FriendNameSearchResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + friends.copyFrom(other.friends); + } + return this; + } + + @Override + public FriendNameSearchResp mergeFrom(final FriendNameSearchResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasFriends()) { + getMutableFriends().addAll(other.friends); + } + return this; + } + + @Override + public FriendNameSearchResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + friends.clear(); + return this; + } + + @Override + public FriendNameSearchResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + friends.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendNameSearchResp)) { + return false; + } + FriendNameSearchResp other = (FriendNameSearchResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasFriends() || friends.equals(other.friends)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < friends.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(friends.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * friends.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(friends); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendNameSearchResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // friends + tag = input.readRepeatedMessage(friends, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.friends, friends); + } + output.endObject(); + } + + @Override + public FriendNameSearchResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1064558965: { + if (input.isAtField(FieldNames.friends)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(friends); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendNameSearchResp clone() { + return new FriendNameSearchResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendNameSearchResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendNameSearchResp(), data).checkInitialized(); + } + + public static FriendNameSearchResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendNameSearchResp(), input).checkInitialized(); + } + + public static FriendNameSearchResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendNameSearchResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendNameSearchResp messages + */ + public static MessageFactory getFactory() { + return FriendNameSearchRespFactory.INSTANCE; + } + + private enum FriendNameSearchRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendNameSearchResp create() { + return FriendNameSearchResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName friends = FieldName.forField("Friends"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendReceiveEnergy.java b/src/generated/main/emu/nebula/proto/FriendReceiveEnergy.java new file mode 100644 index 0000000..0020399 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendReceiveEnergy.java @@ -0,0 +1,1013 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; + +public final class FriendReceiveEnergy { + /** + * Protobuf type {@code FriendReceiveEnergyReq} + */ + public static final class FriendReceiveEnergyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint64 UIds = 1; + */ + private final RepeatedLong uIds = RepeatedLong.newEmptyInstance(); + + private FriendReceiveEnergyReq() { + } + + /** + * @return a new empty instance of {@code FriendReceiveEnergyReq} + */ + public static FriendReceiveEnergyReq newInstance() { + return new FriendReceiveEnergyReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendReceiveEnergyReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendReceiveEnergyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendReceiveEnergyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendReceiveEnergyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @return whether the uIds field is set + */ + public boolean hasUIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint64 UIds = 1; + * @return this + */ + public FriendReceiveEnergyReq clearUIds() { + bitField0_ &= ~0x00000002; + uIds.clear(); + return this; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableUIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getUIds() { + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableUIds() { + bitField0_ |= 0x00000002; + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * @param value the uIds to add + * @return this + */ + public FriendReceiveEnergyReq addUIds(final long value) { + bitField0_ |= 0x00000002; + uIds.add(value); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @param values the uIds to add + * @return this + */ + public FriendReceiveEnergyReq addAllUIds(final long... values) { + bitField0_ |= 0x00000002; + uIds.addAll(values); + return this; + } + + @Override + public FriendReceiveEnergyReq copyFrom(final FriendReceiveEnergyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + uIds.copyFrom(other.uIds); + } + return this; + } + + @Override + public FriendReceiveEnergyReq mergeFrom(final FriendReceiveEnergyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasUIds()) { + getMutableUIds().addAll(other.uIds); + } + return this; + } + + @Override + public FriendReceiveEnergyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public FriendReceiveEnergyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendReceiveEnergyReq)) { + return false; + } + FriendReceiveEnergyReq other = (FriendReceiveEnergyReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasUIds() || uIds.equals(other.uIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < uIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * uIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(uIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendReceiveEnergyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // uIds [packed=true] + input.readPackedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // uIds [packed=false] + tag = input.readRepeatedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt64(FieldNames.uIds, uIds); + } + output.endObject(); + } + + @Override + public FriendReceiveEnergyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2605603: { + if (input.isAtField(FieldNames.uIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(uIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendReceiveEnergyReq clone() { + return new FriendReceiveEnergyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendReceiveEnergyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendReceiveEnergyReq(), data).checkInitialized(); + } + + public static FriendReceiveEnergyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendReceiveEnergyReq(), input).checkInitialized(); + } + + public static FriendReceiveEnergyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendReceiveEnergyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendReceiveEnergyReq messages + */ + public static MessageFactory getFactory() { + return FriendReceiveEnergyReqFactory.INSTANCE; + } + + private enum FriendReceiveEnergyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendReceiveEnergyReq create() { + return FriendReceiveEnergyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName uIds = FieldName.forField("UIds"); + } + } + + /** + * Protobuf type {@code FriendReceiveEnergyResp} + */ + public static final class FriendReceiveEnergyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ReceiveEnergyCnt = 3; + */ + private int receiveEnergyCnt; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint64 UIds = 1; + */ + private final RepeatedLong uIds = RepeatedLong.newEmptyInstance(); + + private FriendReceiveEnergyResp() { + } + + /** + * @return a new empty instance of {@code FriendReceiveEnergyResp} + */ + public static FriendReceiveEnergyResp newInstance() { + return new FriendReceiveEnergyResp(); + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @return whether the receiveEnergyCnt field is set + */ + public boolean hasReceiveEnergyCnt() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @return this + */ + public FriendReceiveEnergyResp clearReceiveEnergyCnt() { + bitField0_ &= ~0x00000001; + receiveEnergyCnt = 0; + return this; + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @return the receiveEnergyCnt + */ + public int getReceiveEnergyCnt() { + return receiveEnergyCnt; + } + + /** + * optional uint32 ReceiveEnergyCnt = 3; + * @param value the receiveEnergyCnt to set + * @return this + */ + public FriendReceiveEnergyResp setReceiveEnergyCnt(final int value) { + bitField0_ |= 0x00000001; + receiveEnergyCnt = value; + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public FriendReceiveEnergyResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public FriendReceiveEnergyResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendReceiveEnergyResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendReceiveEnergyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendReceiveEnergyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendReceiveEnergyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @return whether the uIds field is set + */ + public boolean hasUIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated uint64 UIds = 1; + * @return this + */ + public FriendReceiveEnergyResp clearUIds() { + bitField0_ &= ~0x00000008; + uIds.clear(); + return this; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableUIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getUIds() { + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableUIds() { + bitField0_ |= 0x00000008; + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * @param value the uIds to add + * @return this + */ + public FriendReceiveEnergyResp addUIds(final long value) { + bitField0_ |= 0x00000008; + uIds.add(value); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @param values the uIds to add + * @return this + */ + public FriendReceiveEnergyResp addAllUIds(final long... values) { + bitField0_ |= 0x00000008; + uIds.addAll(values); + return this; + } + + @Override + public FriendReceiveEnergyResp copyFrom(final FriendReceiveEnergyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + receiveEnergyCnt = other.receiveEnergyCnt; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + uIds.copyFrom(other.uIds); + } + return this; + } + + @Override + public FriendReceiveEnergyResp mergeFrom(final FriendReceiveEnergyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasReceiveEnergyCnt()) { + setReceiveEnergyCnt(other.receiveEnergyCnt); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasUIds()) { + getMutableUIds().addAll(other.uIds); + } + return this; + } + + @Override + public FriendReceiveEnergyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + receiveEnergyCnt = 0; + change.clear(); + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public FriendReceiveEnergyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendReceiveEnergyResp)) { + return false; + } + FriendReceiveEnergyResp other = (FriendReceiveEnergyResp) o; + return bitField0_ == other.bitField0_ + && (!hasReceiveEnergyCnt() || receiveEnergyCnt == other.receiveEnergyCnt) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasUIds() || uIds.equals(other.uIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(receiveEnergyCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < uIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(receiveEnergyCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * uIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(uIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendReceiveEnergyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // receiveEnergyCnt + receiveEnergyCnt = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // uIds [packed=true] + input.readPackedUInt64(uIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // uIds [packed=false] + tag = input.readRepeatedUInt64(uIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.receiveEnergyCnt, receiveEnergyCnt); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt64(FieldNames.uIds, uIds); + } + output.endObject(); + } + + @Override + public FriendReceiveEnergyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1854543298: { + if (input.isAtField(FieldNames.receiveEnergyCnt)) { + if (!input.trySkipNullValue()) { + receiveEnergyCnt = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2605603: { + if (input.isAtField(FieldNames.uIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(uIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendReceiveEnergyResp clone() { + return new FriendReceiveEnergyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendReceiveEnergyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendReceiveEnergyResp(), data).checkInitialized(); + } + + public static FriendReceiveEnergyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendReceiveEnergyResp(), input).checkInitialized(); + } + + public static FriendReceiveEnergyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendReceiveEnergyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendReceiveEnergyResp messages + */ + public static MessageFactory getFactory() { + return FriendReceiveEnergyRespFactory.INSTANCE; + } + + private enum FriendReceiveEnergyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendReceiveEnergyResp create() { + return FriendReceiveEnergyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName receiveEnergyCnt = FieldName.forField("ReceiveEnergyCnt"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName uIds = FieldName.forField("UIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendRecommendationGet.java b/src/generated/main/emu/nebula/proto/FriendRecommendationGet.java new file mode 100644 index 0000000..6979644 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendRecommendationGet.java @@ -0,0 +1,418 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class FriendRecommendationGet { + /** + * Protobuf type {@code FriendRecommendationGetResp} + */ + public static final class FriendRecommendationGetResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Friend Friends = 1; + */ + private final RepeatedMessage friends = RepeatedMessage.newEmptyInstance(Public.Friend.getFactory()); + + private FriendRecommendationGetResp() { + } + + /** + * @return a new empty instance of {@code FriendRecommendationGetResp} + */ + public static FriendRecommendationGetResp newInstance() { + return new FriendRecommendationGetResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendRecommendationGetResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendRecommendationGetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendRecommendationGetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendRecommendationGetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Friend Friends = 1; + * @return whether the friends field is set + */ + public boolean hasFriends() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Friend Friends = 1; + * @return this + */ + public FriendRecommendationGetResp clearFriends() { + bitField0_ &= ~0x00000002; + friends.clear(); + return this; + } + + /** + * repeated .Friend Friends = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFriends()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getFriends() { + return friends; + } + + /** + * repeated .Friend Friends = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableFriends() { + bitField0_ |= 0x00000002; + return friends; + } + + /** + * repeated .Friend Friends = 1; + * @param value the friends to add + * @return this + */ + public FriendRecommendationGetResp addFriends(final Public.Friend value) { + bitField0_ |= 0x00000002; + friends.add(value); + return this; + } + + /** + * repeated .Friend Friends = 1; + * @param values the friends to add + * @return this + */ + public FriendRecommendationGetResp addAllFriends(final Public.Friend... values) { + bitField0_ |= 0x00000002; + friends.addAll(values); + return this; + } + + @Override + public FriendRecommendationGetResp copyFrom(final FriendRecommendationGetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + friends.copyFrom(other.friends); + } + return this; + } + + @Override + public FriendRecommendationGetResp mergeFrom(final FriendRecommendationGetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasFriends()) { + getMutableFriends().addAll(other.friends); + } + return this; + } + + @Override + public FriendRecommendationGetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + friends.clear(); + return this; + } + + @Override + public FriendRecommendationGetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + friends.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendRecommendationGetResp)) { + return false; + } + FriendRecommendationGetResp other = (FriendRecommendationGetResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasFriends() || friends.equals(other.friends)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < friends.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(friends.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * friends.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(friends); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendRecommendationGetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // friends + tag = input.readRepeatedMessage(friends, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.friends, friends); + } + output.endObject(); + } + + @Override + public FriendRecommendationGetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1064558965: { + if (input.isAtField(FieldNames.friends)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(friends); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendRecommendationGetResp clone() { + return new FriendRecommendationGetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendRecommendationGetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendRecommendationGetResp(), data).checkInitialized(); + } + + public static FriendRecommendationGetResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new FriendRecommendationGetResp(), input).checkInitialized(); + } + + public static FriendRecommendationGetResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendRecommendationGetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendRecommendationGetResp messages + */ + public static MessageFactory getFactory() { + return FriendRecommendationGetRespFactory.INSTANCE; + } + + private enum FriendRecommendationGetRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendRecommendationGetResp create() { + return FriendRecommendationGetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName friends = FieldName.forField("Friends"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendSendEnergy.java b/src/generated/main/emu/nebula/proto/FriendSendEnergy.java new file mode 100644 index 0000000..ee1f0ae --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendSendEnergy.java @@ -0,0 +1,832 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; + +public final class FriendSendEnergy { + /** + * Protobuf type {@code FriendSendEnergyReq} + */ + public static final class FriendSendEnergyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint64 UIds = 1; + */ + private final RepeatedLong uIds = RepeatedLong.newEmptyInstance(); + + private FriendSendEnergyReq() { + } + + /** + * @return a new empty instance of {@code FriendSendEnergyReq} + */ + public static FriendSendEnergyReq newInstance() { + return new FriendSendEnergyReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendSendEnergyReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendSendEnergyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendSendEnergyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendSendEnergyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @return whether the uIds field is set + */ + public boolean hasUIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint64 UIds = 1; + * @return this + */ + public FriendSendEnergyReq clearUIds() { + bitField0_ &= ~0x00000002; + uIds.clear(); + return this; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableUIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getUIds() { + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableUIds() { + bitField0_ |= 0x00000002; + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * @param value the uIds to add + * @return this + */ + public FriendSendEnergyReq addUIds(final long value) { + bitField0_ |= 0x00000002; + uIds.add(value); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @param values the uIds to add + * @return this + */ + public FriendSendEnergyReq addAllUIds(final long... values) { + bitField0_ |= 0x00000002; + uIds.addAll(values); + return this; + } + + @Override + public FriendSendEnergyReq copyFrom(final FriendSendEnergyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + uIds.copyFrom(other.uIds); + } + return this; + } + + @Override + public FriendSendEnergyReq mergeFrom(final FriendSendEnergyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasUIds()) { + getMutableUIds().addAll(other.uIds); + } + return this; + } + + @Override + public FriendSendEnergyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public FriendSendEnergyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendSendEnergyReq)) { + return false; + } + FriendSendEnergyReq other = (FriendSendEnergyReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasUIds() || uIds.equals(other.uIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < uIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * uIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(uIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendSendEnergyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // uIds [packed=true] + input.readPackedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // uIds [packed=false] + tag = input.readRepeatedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt64(FieldNames.uIds, uIds); + } + output.endObject(); + } + + @Override + public FriendSendEnergyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2605603: { + if (input.isAtField(FieldNames.uIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(uIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendSendEnergyReq clone() { + return new FriendSendEnergyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendSendEnergyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendSendEnergyReq(), data).checkInitialized(); + } + + public static FriendSendEnergyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendSendEnergyReq(), input).checkInitialized(); + } + + public static FriendSendEnergyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendSendEnergyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendSendEnergyReq messages + */ + public static MessageFactory getFactory() { + return FriendSendEnergyReqFactory.INSTANCE; + } + + private enum FriendSendEnergyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendSendEnergyReq create() { + return FriendSendEnergyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName uIds = FieldName.forField("UIds"); + } + } + + /** + * Protobuf type {@code FriendSendEnergyResp} + */ + public static final class FriendSendEnergyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint64 UIds = 1; + */ + private final RepeatedLong uIds = RepeatedLong.newEmptyInstance(); + + private FriendSendEnergyResp() { + } + + /** + * @return a new empty instance of {@code FriendSendEnergyResp} + */ + public static FriendSendEnergyResp newInstance() { + return new FriendSendEnergyResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendSendEnergyResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendSendEnergyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendSendEnergyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendSendEnergyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @return whether the uIds field is set + */ + public boolean hasUIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint64 UIds = 1; + * @return this + */ + public FriendSendEnergyResp clearUIds() { + bitField0_ &= ~0x00000002; + uIds.clear(); + return this; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableUIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getUIds() { + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableUIds() { + bitField0_ |= 0x00000002; + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * @param value the uIds to add + * @return this + */ + public FriendSendEnergyResp addUIds(final long value) { + bitField0_ |= 0x00000002; + uIds.add(value); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @param values the uIds to add + * @return this + */ + public FriendSendEnergyResp addAllUIds(final long... values) { + bitField0_ |= 0x00000002; + uIds.addAll(values); + return this; + } + + @Override + public FriendSendEnergyResp copyFrom(final FriendSendEnergyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + uIds.copyFrom(other.uIds); + } + return this; + } + + @Override + public FriendSendEnergyResp mergeFrom(final FriendSendEnergyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasUIds()) { + getMutableUIds().addAll(other.uIds); + } + return this; + } + + @Override + public FriendSendEnergyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public FriendSendEnergyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendSendEnergyResp)) { + return false; + } + FriendSendEnergyResp other = (FriendSendEnergyResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasUIds() || uIds.equals(other.uIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < uIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * uIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(uIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendSendEnergyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // uIds [packed=true] + input.readPackedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // uIds [packed=false] + tag = input.readRepeatedUInt64(uIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt64(FieldNames.uIds, uIds); + } + output.endObject(); + } + + @Override + public FriendSendEnergyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2605603: { + if (input.isAtField(FieldNames.uIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(uIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendSendEnergyResp clone() { + return new FriendSendEnergyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendSendEnergyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendSendEnergyResp(), data).checkInitialized(); + } + + public static FriendSendEnergyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendSendEnergyResp(), input).checkInitialized(); + } + + public static FriendSendEnergyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendSendEnergyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendSendEnergyResp messages + */ + public static MessageFactory getFactory() { + return FriendSendEnergyRespFactory.INSTANCE; + } + + private enum FriendSendEnergyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendSendEnergyResp create() { + return FriendSendEnergyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName uIds = FieldName.forField("UIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendStarSet.java b/src/generated/main/emu/nebula/proto/FriendStarSet.java new file mode 100644 index 0000000..af877fa --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendStarSet.java @@ -0,0 +1,504 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; + +public final class FriendStarSet { + /** + * Protobuf type {@code FriendStarSetReq} + */ + public static final class FriendStarSetReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool Star = 2; + */ + private boolean star; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint64 UIds = 1; + */ + private final RepeatedLong uIds = RepeatedLong.newEmptyInstance(); + + private FriendStarSetReq() { + } + + /** + * @return a new empty instance of {@code FriendStarSetReq} + */ + public static FriendStarSetReq newInstance() { + return new FriendStarSetReq(); + } + + /** + * optional bool Star = 2; + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool Star = 2; + * @return this + */ + public FriendStarSetReq clearStar() { + bitField0_ &= ~0x00000001; + star = false; + return this; + } + + /** + * optional bool Star = 2; + * @return the star + */ + public boolean getStar() { + return star; + } + + /** + * optional bool Star = 2; + * @param value the star to set + * @return this + */ + public FriendStarSetReq setStar(final boolean value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendStarSetReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendStarSetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendStarSetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendStarSetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @return whether the uIds field is set + */ + public boolean hasUIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint64 UIds = 1; + * @return this + */ + public FriendStarSetReq clearUIds() { + bitField0_ &= ~0x00000004; + uIds.clear(); + return this; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableUIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getUIds() { + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableUIds() { + bitField0_ |= 0x00000004; + return uIds; + } + + /** + * repeated uint64 UIds = 1; + * @param value the uIds to add + * @return this + */ + public FriendStarSetReq addUIds(final long value) { + bitField0_ |= 0x00000004; + uIds.add(value); + return this; + } + + /** + * repeated uint64 UIds = 1; + * @param values the uIds to add + * @return this + */ + public FriendStarSetReq addAllUIds(final long... values) { + bitField0_ |= 0x00000004; + uIds.addAll(values); + return this; + } + + @Override + public FriendStarSetReq copyFrom(final FriendStarSetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + uIds.copyFrom(other.uIds); + } + return this; + } + + @Override + public FriendStarSetReq mergeFrom(final FriendStarSetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasUIds()) { + getMutableUIds().addAll(other.uIds); + } + return this; + } + + @Override + public FriendStarSetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = false; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public FriendStarSetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendStarSetReq)) { + return false; + } + FriendStarSetReq other = (FriendStarSetReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasUIds() || uIds.equals(other.uIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < uIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * uIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(uIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendStarSetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // star + star = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // uIds [packed=true] + input.readPackedUInt64(uIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // uIds [packed=false] + tag = input.readRepeatedUInt64(uIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt64(FieldNames.uIds, uIds); + } + output.endObject(); + } + + @Override + public FriendStarSetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2605603: { + if (input.isAtField(FieldNames.uIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(uIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendStarSetReq clone() { + return new FriendStarSetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendStarSetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendStarSetReq(), data).checkInitialized(); + } + + public static FriendStarSetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendStarSetReq(), input).checkInitialized(); + } + + public static FriendStarSetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendStarSetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendStarSetReq messages + */ + public static MessageFactory getFactory() { + return FriendStarSetReqFactory.INSTANCE; + } + + private enum FriendStarSetReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendStarSetReq create() { + return FriendStarSetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName uIds = FieldName.forField("UIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/FriendUidSearch.java b/src/generated/main/emu/nebula/proto/FriendUidSearch.java new file mode 100644 index 0000000..87fc709 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/FriendUidSearch.java @@ -0,0 +1,772 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class FriendUidSearch { + /** + * Protobuf type {@code FriendUIdSearchReq} + */ + public static final class FriendUIdSearchReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Id = 1; + */ + private long id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendUIdSearchReq() { + } + + /** + * @return a new empty instance of {@code FriendUIdSearchReq} + */ + public static FriendUIdSearchReq newInstance() { + return new FriendUIdSearchReq(); + } + + /** + * optional uint64 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Id = 1; + * @return this + */ + public FriendUIdSearchReq clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * optional uint64 Id = 1; + * @return the id + */ + public long getId() { + return id; + } + + /** + * optional uint64 Id = 1; + * @param value the id to set + * @return this + */ + public FriendUIdSearchReq setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendUIdSearchReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendUIdSearchReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendUIdSearchReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendUIdSearchReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendUIdSearchReq copyFrom(final FriendUIdSearchReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendUIdSearchReq mergeFrom(final FriendUIdSearchReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendUIdSearchReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + nextPackage.clear(); + return this; + } + + @Override + public FriendUIdSearchReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendUIdSearchReq)) { + return false; + } + FriendUIdSearchReq other = (FriendUIdSearchReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendUIdSearchReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendUIdSearchReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendUIdSearchReq clone() { + return new FriendUIdSearchReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendUIdSearchReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendUIdSearchReq(), data).checkInitialized(); + } + + public static FriendUIdSearchReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendUIdSearchReq(), input).checkInitialized(); + } + + public static FriendUIdSearchReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendUIdSearchReq(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendUIdSearchReq messages + */ + public static MessageFactory getFactory() { + return FriendUIdSearchReqFactory.INSTANCE; + } + + private enum FriendUIdSearchReqFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendUIdSearchReq create() { + return FriendUIdSearchReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FriendUIdSearchResp} + */ + public static final class FriendUIdSearchResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .Friend Friend = 1; + */ + private final Public.Friend friend = Public.Friend.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendUIdSearchResp() { + } + + /** + * @return a new empty instance of {@code FriendUIdSearchResp} + */ + public static FriendUIdSearchResp newInstance() { + return new FriendUIdSearchResp(); + } + + /** + * optional .Friend Friend = 1; + * @return whether the friend field is set + */ + public boolean hasFriend() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .Friend Friend = 1; + * @return this + */ + public FriendUIdSearchResp clearFriend() { + bitField0_ &= ~0x00000001; + friend.clear(); + return this; + } + + /** + * optional .Friend Friend = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFriend()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Friend getFriend() { + return friend; + } + + /** + * optional .Friend Friend = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Friend getMutableFriend() { + bitField0_ |= 0x00000001; + return friend; + } + + /** + * optional .Friend Friend = 1; + * @param value the friend to set + * @return this + */ + public FriendUIdSearchResp setFriend(final Public.Friend value) { + bitField0_ |= 0x00000001; + friend.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendUIdSearchResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendUIdSearchResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendUIdSearchResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendUIdSearchResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendUIdSearchResp copyFrom(final FriendUIdSearchResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + friend.copyFrom(other.friend); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendUIdSearchResp mergeFrom(final FriendUIdSearchResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFriend()) { + getMutableFriend().mergeFrom(other.friend); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendUIdSearchResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + friend.clear(); + nextPackage.clear(); + return this; + } + + @Override + public FriendUIdSearchResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + friend.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendUIdSearchResp)) { + return false; + } + FriendUIdSearchResp other = (FriendUIdSearchResp) o; + return bitField0_ == other.bitField0_ + && (!hasFriend() || friend.equals(other.friend)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(friend); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(friend); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendUIdSearchResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // friend + input.readMessage(friend); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.friend, friend); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendUIdSearchResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2112550590: { + if (input.isAtField(FieldNames.friend)) { + if (!input.trySkipNullValue()) { + input.readMessage(friend); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendUIdSearchResp clone() { + return new FriendUIdSearchResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendUIdSearchResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendUIdSearchResp(), data).checkInitialized(); + } + + public static FriendUIdSearchResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendUIdSearchResp(), input).checkInitialized(); + } + + public static FriendUIdSearchResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendUIdSearchResp(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendUIdSearchResp messages + */ + public static MessageFactory getFactory() { + return FriendUIdSearchRespFactory.INSTANCE; + } + + private enum FriendUIdSearchRespFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendUIdSearchResp create() { + return FriendUIdSearchResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName friend = FieldName.forField("Friend"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GachaGuaranteeRewardReceive.java b/src/generated/main/emu/nebula/proto/GachaGuaranteeRewardReceive.java new file mode 100644 index 0000000..242868d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaGuaranteeRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class GachaGuaranteeRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/GachaHistoriesOuterClass.java b/src/generated/main/emu/nebula/proto/GachaHistoriesOuterClass.java new file mode 100644 index 0000000..ab84712 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaHistoriesOuterClass.java @@ -0,0 +1,985 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class GachaHistoriesOuterClass { + /** + * Protobuf type {@code GachaHistory} + */ + public static final class GachaHistory extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Time = 2; + */ + private long time; + + /** + * optional uint32 Gid = 3; + */ + private int gid; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Ids = 1; + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + private GachaHistory() { + } + + /** + * @return a new empty instance of {@code GachaHistory} + */ + public static GachaHistory newInstance() { + return new GachaHistory(); + } + + /** + * optional int64 Time = 2; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Time = 2; + * @return this + */ + public GachaHistory clearTime() { + bitField0_ &= ~0x00000001; + time = 0L; + return this; + } + + /** + * optional int64 Time = 2; + * @return the time + */ + public long getTime() { + return time; + } + + /** + * optional int64 Time = 2; + * @param value the time to set + * @return this + */ + public GachaHistory setTime(final long value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * optional uint32 Gid = 3; + * @return whether the gid field is set + */ + public boolean hasGid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Gid = 3; + * @return this + */ + public GachaHistory clearGid() { + bitField0_ &= ~0x00000002; + gid = 0; + return this; + } + + /** + * optional uint32 Gid = 3; + * @return the gid + */ + public int getGid() { + return gid; + } + + /** + * optional uint32 Gid = 3; + * @param value the gid to set + * @return this + */ + public GachaHistory setGid(final int value) { + bitField0_ |= 0x00000002; + gid = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaHistory clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaHistory addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaHistory addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaHistory setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated uint32 Ids = 1; + * @return this + */ + public GachaHistory clearIds() { + bitField0_ &= ~0x00000008; + ids.clear(); + return this; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000008; + return ids; + } + + /** + * repeated uint32 Ids = 1; + * @param value the ids to add + * @return this + */ + public GachaHistory addIds(final int value) { + bitField0_ |= 0x00000008; + ids.add(value); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @param values the ids to add + * @return this + */ + public GachaHistory addAllIds(final int... values) { + bitField0_ |= 0x00000008; + ids.addAll(values); + return this; + } + + @Override + public GachaHistory copyFrom(final GachaHistory other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + gid = other.gid; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + } + return this; + } + + @Override + public GachaHistory mergeFrom(final GachaHistory other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasGid()) { + setGid(other.gid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + return this; + } + + @Override + public GachaHistory clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0L; + gid = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public GachaHistory clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaHistory)) { + return false; + } + GachaHistory other = (GachaHistory) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || time == other.time) + && (!hasGid() || gid == other.gid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(gid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(gid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaHistory mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // time + time = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // gid + gid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.gid, gid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + output.endObject(); + } + + @Override + public GachaHistory mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 71586: { + if (input.isAtField(FieldNames.gid)) { + if (!input.trySkipNullValue()) { + gid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaHistory clone() { + return new GachaHistory().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaHistory parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaHistory(), data).checkInitialized(); + } + + public static GachaHistory parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaHistory(), input).checkInitialized(); + } + + public static GachaHistory parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaHistory(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaHistory messages + */ + public static MessageFactory getFactory() { + return GachaHistoryFactory.INSTANCE; + } + + private enum GachaHistoryFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaHistory create() { + return GachaHistory.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("Time"); + + static final FieldName gid = FieldName.forField("Gid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + } + } + + /** + * Protobuf type {@code GachaHistories} + */ + public static final class GachaHistories extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .GachaHistory List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(GachaHistory.getFactory()); + + private GachaHistories() { + } + + /** + * @return a new empty instance of {@code GachaHistories} + */ + public static GachaHistories newInstance() { + return new GachaHistories(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaHistories clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaHistories addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaHistories addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaHistories setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .GachaHistory List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .GachaHistory List = 1; + * @return this + */ + public GachaHistories clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .GachaHistory List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .GachaHistory List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .GachaHistory List = 1; + * @param value the list to add + * @return this + */ + public GachaHistories addList(final GachaHistory value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .GachaHistory List = 1; + * @param values the list to add + * @return this + */ + public GachaHistories addAllList(final GachaHistory... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public GachaHistories copyFrom(final GachaHistories other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public GachaHistories mergeFrom(final GachaHistories other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public GachaHistories clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public GachaHistories clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaHistories)) { + return false; + } + GachaHistories other = (GachaHistories) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaHistories mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public GachaHistories mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaHistories clone() { + return new GachaHistories().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaHistories parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaHistories(), data).checkInitialized(); + } + + public static GachaHistories parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaHistories(), input).checkInitialized(); + } + + public static GachaHistories parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaHistories(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaHistories messages + */ + public static MessageFactory getFactory() { + return GachaHistoriesFactory.INSTANCE; + } + + private enum GachaHistoriesFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaHistories create() { + return GachaHistories.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GachaInformation.java b/src/generated/main/emu/nebula/proto/GachaInformation.java new file mode 100644 index 0000000..a895856 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaInformation.java @@ -0,0 +1,1424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class GachaInformation { + /** + * Protobuf type {@code GachaInfo} + */ + public static final class GachaInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 DaysCount = 2; + */ + private int daysCount; + + /** + * optional uint32 AupMissTimes = 3; + */ + private int aupMissTimes; + + /** + * optional uint32 AMissTimes = 4; + */ + private int aMissTimes; + + /** + * optional uint32 GachaTotalTimes = 13; + */ + private int gachaTotalTimes; + + /** + * optional uint32 TotalTimes = 14; + */ + private int totalTimes; + + /** + * optional uint32 AupGuaranteeTimes = 15; + */ + private int aupGuaranteeTimes; + + /** + * optional bool ReveFirstTenReward = 11; + */ + private boolean reveFirstTenReward; + + /** + * optional bool RecvGuaranteeReward = 12; + */ + private boolean recvGuaranteeReward; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private GachaInfo() { + } + + /** + * @return a new empty instance of {@code GachaInfo} + */ + public static GachaInfo newInstance() { + return new GachaInfo(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public GachaInfo clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public GachaInfo setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 DaysCount = 2; + * @return whether the daysCount field is set + */ + public boolean hasDaysCount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 DaysCount = 2; + * @return this + */ + public GachaInfo clearDaysCount() { + bitField0_ &= ~0x00000002; + daysCount = 0; + return this; + } + + /** + * optional uint32 DaysCount = 2; + * @return the daysCount + */ + public int getDaysCount() { + return daysCount; + } + + /** + * optional uint32 DaysCount = 2; + * @param value the daysCount to set + * @return this + */ + public GachaInfo setDaysCount(final int value) { + bitField0_ |= 0x00000002; + daysCount = value; + return this; + } + + /** + * optional uint32 AupMissTimes = 3; + * @return whether the aupMissTimes field is set + */ + public boolean hasAupMissTimes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 AupMissTimes = 3; + * @return this + */ + public GachaInfo clearAupMissTimes() { + bitField0_ &= ~0x00000004; + aupMissTimes = 0; + return this; + } + + /** + * optional uint32 AupMissTimes = 3; + * @return the aupMissTimes + */ + public int getAupMissTimes() { + return aupMissTimes; + } + + /** + * optional uint32 AupMissTimes = 3; + * @param value the aupMissTimes to set + * @return this + */ + public GachaInfo setAupMissTimes(final int value) { + bitField0_ |= 0x00000004; + aupMissTimes = value; + return this; + } + + /** + * optional uint32 AMissTimes = 4; + * @return whether the aMissTimes field is set + */ + public boolean hasAMissTimes() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 AMissTimes = 4; + * @return this + */ + public GachaInfo clearAMissTimes() { + bitField0_ &= ~0x00000008; + aMissTimes = 0; + return this; + } + + /** + * optional uint32 AMissTimes = 4; + * @return the aMissTimes + */ + public int getAMissTimes() { + return aMissTimes; + } + + /** + * optional uint32 AMissTimes = 4; + * @param value the aMissTimes to set + * @return this + */ + public GachaInfo setAMissTimes(final int value) { + bitField0_ |= 0x00000008; + aMissTimes = value; + return this; + } + + /** + * optional uint32 GachaTotalTimes = 13; + * @return whether the gachaTotalTimes field is set + */ + public boolean hasGachaTotalTimes() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 GachaTotalTimes = 13; + * @return this + */ + public GachaInfo clearGachaTotalTimes() { + bitField0_ &= ~0x00000010; + gachaTotalTimes = 0; + return this; + } + + /** + * optional uint32 GachaTotalTimes = 13; + * @return the gachaTotalTimes + */ + public int getGachaTotalTimes() { + return gachaTotalTimes; + } + + /** + * optional uint32 GachaTotalTimes = 13; + * @param value the gachaTotalTimes to set + * @return this + */ + public GachaInfo setGachaTotalTimes(final int value) { + bitField0_ |= 0x00000010; + gachaTotalTimes = value; + return this; + } + + /** + * optional uint32 TotalTimes = 14; + * @return whether the totalTimes field is set + */ + public boolean hasTotalTimes() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 TotalTimes = 14; + * @return this + */ + public GachaInfo clearTotalTimes() { + bitField0_ &= ~0x00000020; + totalTimes = 0; + return this; + } + + /** + * optional uint32 TotalTimes = 14; + * @return the totalTimes + */ + public int getTotalTimes() { + return totalTimes; + } + + /** + * optional uint32 TotalTimes = 14; + * @param value the totalTimes to set + * @return this + */ + public GachaInfo setTotalTimes(final int value) { + bitField0_ |= 0x00000020; + totalTimes = value; + return this; + } + + /** + * optional uint32 AupGuaranteeTimes = 15; + * @return whether the aupGuaranteeTimes field is set + */ + public boolean hasAupGuaranteeTimes() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional uint32 AupGuaranteeTimes = 15; + * @return this + */ + public GachaInfo clearAupGuaranteeTimes() { + bitField0_ &= ~0x00000040; + aupGuaranteeTimes = 0; + return this; + } + + /** + * optional uint32 AupGuaranteeTimes = 15; + * @return the aupGuaranteeTimes + */ + public int getAupGuaranteeTimes() { + return aupGuaranteeTimes; + } + + /** + * optional uint32 AupGuaranteeTimes = 15; + * @param value the aupGuaranteeTimes to set + * @return this + */ + public GachaInfo setAupGuaranteeTimes(final int value) { + bitField0_ |= 0x00000040; + aupGuaranteeTimes = value; + return this; + } + + /** + * optional bool ReveFirstTenReward = 11; + * @return whether the reveFirstTenReward field is set + */ + public boolean hasReveFirstTenReward() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional bool ReveFirstTenReward = 11; + * @return this + */ + public GachaInfo clearReveFirstTenReward() { + bitField0_ &= ~0x00000080; + reveFirstTenReward = false; + return this; + } + + /** + * optional bool ReveFirstTenReward = 11; + * @return the reveFirstTenReward + */ + public boolean getReveFirstTenReward() { + return reveFirstTenReward; + } + + /** + * optional bool ReveFirstTenReward = 11; + * @param value the reveFirstTenReward to set + * @return this + */ + public GachaInfo setReveFirstTenReward(final boolean value) { + bitField0_ |= 0x00000080; + reveFirstTenReward = value; + return this; + } + + /** + * optional bool RecvGuaranteeReward = 12; + * @return whether the recvGuaranteeReward field is set + */ + public boolean hasRecvGuaranteeReward() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional bool RecvGuaranteeReward = 12; + * @return this + */ + public GachaInfo clearRecvGuaranteeReward() { + bitField0_ &= ~0x00000100; + recvGuaranteeReward = false; + return this; + } + + /** + * optional bool RecvGuaranteeReward = 12; + * @return the recvGuaranteeReward + */ + public boolean getRecvGuaranteeReward() { + return recvGuaranteeReward; + } + + /** + * optional bool RecvGuaranteeReward = 12; + * @param value the recvGuaranteeReward to set + * @return this + */ + public GachaInfo setRecvGuaranteeReward(final boolean value) { + bitField0_ |= 0x00000100; + recvGuaranteeReward = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaInfo clearNextPackage() { + bitField0_ &= ~0x00000200; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000200; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000200; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.copyFrom(values); + return this; + } + + @Override + public GachaInfo copyFrom(final GachaInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + daysCount = other.daysCount; + aupMissTimes = other.aupMissTimes; + aMissTimes = other.aMissTimes; + gachaTotalTimes = other.gachaTotalTimes; + totalTimes = other.totalTimes; + aupGuaranteeTimes = other.aupGuaranteeTimes; + reveFirstTenReward = other.reveFirstTenReward; + recvGuaranteeReward = other.recvGuaranteeReward; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaInfo mergeFrom(final GachaInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasDaysCount()) { + setDaysCount(other.daysCount); + } + if (other.hasAupMissTimes()) { + setAupMissTimes(other.aupMissTimes); + } + if (other.hasAMissTimes()) { + setAMissTimes(other.aMissTimes); + } + if (other.hasGachaTotalTimes()) { + setGachaTotalTimes(other.gachaTotalTimes); + } + if (other.hasTotalTimes()) { + setTotalTimes(other.totalTimes); + } + if (other.hasAupGuaranteeTimes()) { + setAupGuaranteeTimes(other.aupGuaranteeTimes); + } + if (other.hasReveFirstTenReward()) { + setReveFirstTenReward(other.reveFirstTenReward); + } + if (other.hasRecvGuaranteeReward()) { + setRecvGuaranteeReward(other.recvGuaranteeReward); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + daysCount = 0; + aupMissTimes = 0; + aMissTimes = 0; + gachaTotalTimes = 0; + totalTimes = 0; + aupGuaranteeTimes = 0; + reveFirstTenReward = false; + recvGuaranteeReward = false; + nextPackage.clear(); + return this; + } + + @Override + public GachaInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaInfo)) { + return false; + } + GachaInfo other = (GachaInfo) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasDaysCount() || daysCount == other.daysCount) + && (!hasAupMissTimes() || aupMissTimes == other.aupMissTimes) + && (!hasAMissTimes() || aMissTimes == other.aMissTimes) + && (!hasGachaTotalTimes() || gachaTotalTimes == other.gachaTotalTimes) + && (!hasTotalTimes() || totalTimes == other.totalTimes) + && (!hasAupGuaranteeTimes() || aupGuaranteeTimes == other.aupGuaranteeTimes) + && (!hasReveFirstTenReward() || reveFirstTenReward == other.reveFirstTenReward) + && (!hasRecvGuaranteeReward() || recvGuaranteeReward == other.recvGuaranteeReward) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(daysCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(aupMissTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(aMissTimes); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 104); + output.writeUInt32NoTag(gachaTotalTimes); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(totalTimes); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(aupGuaranteeTimes); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 88); + output.writeBoolNoTag(reveFirstTenReward); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 96); + output.writeBoolNoTag(recvGuaranteeReward); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(daysCount); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(aupMissTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(aMissTimes); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaTotalTimes); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(totalTimes); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(aupGuaranteeTimes); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000200) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // daysCount + daysCount = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // aupMissTimes + aupMissTimes = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // aMissTimes + aMissTimes = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 104) { + break; + } + } + case 104: { + // gachaTotalTimes + gachaTotalTimes = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // totalTimes + totalTimes = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // aupGuaranteeTimes + aupGuaranteeTimes = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 88) { + break; + } + } + case 88: { + // reveFirstTenReward + reveFirstTenReward = input.readBool(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 96) { + break; + } + } + case 96: { + // recvGuaranteeReward + recvGuaranteeReward = input.readBool(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.daysCount, daysCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.aupMissTimes, aupMissTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.aMissTimes, aMissTimes); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.gachaTotalTimes, gachaTotalTimes); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.totalTimes, totalTimes); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.aupGuaranteeTimes, aupGuaranteeTimes); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBool(FieldNames.reveFirstTenReward, reveFirstTenReward); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBool(FieldNames.recvGuaranteeReward, recvGuaranteeReward); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public GachaInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022494504: { + if (input.isAtField(FieldNames.daysCount)) { + if (!input.trySkipNullValue()) { + daysCount = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1590821778: { + if (input.isAtField(FieldNames.aupMissTimes)) { + if (!input.trySkipNullValue()) { + aupMissTimes = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -955152279: { + if (input.isAtField(FieldNames.aMissTimes)) { + if (!input.trySkipNullValue()) { + aMissTimes = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1802973852: { + if (input.isAtField(FieldNames.gachaTotalTimes)) { + if (!input.trySkipNullValue()) { + gachaTotalTimes = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1277592194: { + if (input.isAtField(FieldNames.totalTimes)) { + if (!input.trySkipNullValue()) { + totalTimes = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1466287270: { + if (input.isAtField(FieldNames.aupGuaranteeTimes)) { + if (!input.trySkipNullValue()) { + aupGuaranteeTimes = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1124399682: { + if (input.isAtField(FieldNames.reveFirstTenReward)) { + if (!input.trySkipNullValue()) { + reveFirstTenReward = input.readBool(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1985982223: { + if (input.isAtField(FieldNames.recvGuaranteeReward)) { + if (!input.trySkipNullValue()) { + recvGuaranteeReward = input.readBool(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaInfo clone() { + return new GachaInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaInfo(), data).checkInitialized(); + } + + public static GachaInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaInfo(), input).checkInitialized(); + } + + public static GachaInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaInfo messages + */ + public static MessageFactory getFactory() { + return GachaInfoFactory.INSTANCE; + } + + private enum GachaInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaInfo create() { + return GachaInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName daysCount = FieldName.forField("DaysCount"); + + static final FieldName aupMissTimes = FieldName.forField("AupMissTimes"); + + static final FieldName aMissTimes = FieldName.forField("AMissTimes"); + + static final FieldName gachaTotalTimes = FieldName.forField("GachaTotalTimes"); + + static final FieldName totalTimes = FieldName.forField("TotalTimes"); + + static final FieldName aupGuaranteeTimes = FieldName.forField("AupGuaranteeTimes"); + + static final FieldName reveFirstTenReward = FieldName.forField("ReveFirstTenReward"); + + static final FieldName recvGuaranteeReward = FieldName.forField("RecvGuaranteeReward"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code GachaInformationResp} + */ + public static final class GachaInformationResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .GachaInfo Information = 1; + */ + private final RepeatedMessage information = RepeatedMessage.newEmptyInstance(GachaInfo.getFactory()); + + private GachaInformationResp() { + } + + /** + * @return a new empty instance of {@code GachaInformationResp} + */ + public static GachaInformationResp newInstance() { + return new GachaInformationResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaInformationResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaInformationResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaInformationResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaInformationResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .GachaInfo Information = 1; + * @return whether the information field is set + */ + public boolean hasInformation() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .GachaInfo Information = 1; + * @return this + */ + public GachaInformationResp clearInformation() { + bitField0_ &= ~0x00000002; + information.clear(); + return this; + } + + /** + * repeated .GachaInfo Information = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInformation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInformation() { + return information; + } + + /** + * repeated .GachaInfo Information = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInformation() { + bitField0_ |= 0x00000002; + return information; + } + + /** + * repeated .GachaInfo Information = 1; + * @param value the information to add + * @return this + */ + public GachaInformationResp addInformation(final GachaInfo value) { + bitField0_ |= 0x00000002; + information.add(value); + return this; + } + + /** + * repeated .GachaInfo Information = 1; + * @param values the information to add + * @return this + */ + public GachaInformationResp addAllInformation(final GachaInfo... values) { + bitField0_ |= 0x00000002; + information.addAll(values); + return this; + } + + @Override + public GachaInformationResp copyFrom(final GachaInformationResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + information.copyFrom(other.information); + } + return this; + } + + @Override + public GachaInformationResp mergeFrom(final GachaInformationResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInformation()) { + getMutableInformation().addAll(other.information); + } + return this; + } + + @Override + public GachaInformationResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + information.clear(); + return this; + } + + @Override + public GachaInformationResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + information.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaInformationResp)) { + return false; + } + GachaInformationResp other = (GachaInformationResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInformation() || information.equals(other.information)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < information.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(information.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * information.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(information); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaInformationResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // information + tag = input.readRepeatedMessage(information, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.information, information); + } + output.endObject(); + } + + @Override + public GachaInformationResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -658498292: { + if (input.isAtField(FieldNames.information)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(information); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaInformationResp clone() { + return new GachaInformationResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaInformationResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaInformationResp(), data).checkInitialized(); + } + + public static GachaInformationResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaInformationResp(), input).checkInitialized(); + } + + public static GachaInformationResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaInformationResp(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaInformationResp messages + */ + public static MessageFactory getFactory() { + return GachaInformationRespFactory.INSTANCE; + } + + private enum GachaInformationRespFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaInformationResp create() { + return GachaInformationResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName information = FieldName.forField("Information"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GachaNewbieInfoOuterClass.java b/src/generated/main/emu/nebula/proto/GachaNewbieInfoOuterClass.java new file mode 100644 index 0000000..b742408 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaNewbieInfoOuterClass.java @@ -0,0 +1,1567 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class GachaNewbieInfoOuterClass { + /** + * Protobuf type {@code UI32s} + */ + public static final class UI32s extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Values = 1; + */ + private final RepeatedInt values_ = RepeatedInt.newEmptyInstance(); + + private UI32s() { + } + + /** + * @return a new empty instance of {@code UI32s} + */ + public static UI32s newInstance() { + return new UI32s(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public UI32s clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public UI32s addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public UI32s addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public UI32s setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Values = 1; + * @return whether the values_ field is set + */ + public boolean hasValues() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Values = 1; + * @return this + */ + public UI32s clearValues() { + bitField0_ &= ~0x00000002; + values_.clear(); + return this; + } + + /** + * repeated uint32 Values = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableValues()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getValues() { + return values_; + } + + /** + * repeated uint32 Values = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableValues() { + bitField0_ |= 0x00000002; + return values_; + } + + /** + * repeated uint32 Values = 1; + * @param value the values_ to add + * @return this + */ + public UI32s addValues(final int value) { + bitField0_ |= 0x00000002; + values_.add(value); + return this; + } + + /** + * repeated uint32 Values = 1; + * @param values the values_ to add + * @return this + */ + public UI32s addAllValues(final int... values) { + bitField0_ |= 0x00000002; + values_.addAll(values); + return this; + } + + @Override + public UI32s copyFrom(final UI32s other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + values_.copyFrom(other.values_); + } + return this; + } + + @Override + public UI32s mergeFrom(final UI32s other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasValues()) { + getMutableValues().addAll(other.values_); + } + return this; + } + + @Override + public UI32s clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + values_.clear(); + return this; + } + + @Override + public UI32s clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + values_.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UI32s)) { + return false; + } + UI32s other = (UI32s) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasValues() || values_.equals(other.values_)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < values_.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(values_.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * values_.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(values_); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public UI32s mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // values_ [packed=true] + input.readPackedUInt32(values_, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // values_ [packed=false] + tag = input.readRepeatedUInt32(values_, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.values_, values_); + } + output.endObject(); + } + + @Override + public UI32s mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1739945662: { + if (input.isAtField(FieldNames.values_)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(values_); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public UI32s clone() { + return new UI32s().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static UI32s parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new UI32s(), data).checkInitialized(); + } + + public static UI32s parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI32s(), input).checkInitialized(); + } + + public static UI32s parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI32s(), input).checkInitialized(); + } + + /** + * @return factory for creating UI32s messages + */ + public static MessageFactory getFactory() { + return UI32sFactory.INSTANCE; + } + + private enum UI32sFactory implements MessageFactory { + INSTANCE; + + @Override + public UI32s create() { + return UI32s.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName values_ = FieldName.forField("Values"); + } + } + + /** + * Protobuf type {@code GachaNewbieInfo} + */ + public static final class GachaNewbieInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Times = 3; + */ + private int times; + + /** + * optional bool Receive = 2; + */ + private boolean receive; + + /** + * optional .UI32s Temp = 15; + */ + private final UI32s temp = UI32s.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .UI32s Cards = 14; + */ + private final RepeatedMessage cards = RepeatedMessage.newEmptyInstance(UI32s.getFactory()); + + private GachaNewbieInfo() { + } + + /** + * @return a new empty instance of {@code GachaNewbieInfo} + */ + public static GachaNewbieInfo newInstance() { + return new GachaNewbieInfo(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public GachaNewbieInfo clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public GachaNewbieInfo setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Times = 3; + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Times = 3; + * @return this + */ + public GachaNewbieInfo clearTimes() { + bitField0_ &= ~0x00000002; + times = 0; + return this; + } + + /** + * optional uint32 Times = 3; + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * optional uint32 Times = 3; + * @param value the times to set + * @return this + */ + public GachaNewbieInfo setTimes(final int value) { + bitField0_ |= 0x00000002; + times = value; + return this; + } + + /** + * optional bool Receive = 2; + * @return whether the receive field is set + */ + public boolean hasReceive() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bool Receive = 2; + * @return this + */ + public GachaNewbieInfo clearReceive() { + bitField0_ &= ~0x00000004; + receive = false; + return this; + } + + /** + * optional bool Receive = 2; + * @return the receive + */ + public boolean getReceive() { + return receive; + } + + /** + * optional bool Receive = 2; + * @param value the receive to set + * @return this + */ + public GachaNewbieInfo setReceive(final boolean value) { + bitField0_ |= 0x00000004; + receive = value; + return this; + } + + /** + * optional .UI32s Temp = 15; + * @return whether the temp field is set + */ + public boolean hasTemp() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .UI32s Temp = 15; + * @return this + */ + public GachaNewbieInfo clearTemp() { + bitField0_ &= ~0x00000008; + temp.clear(); + return this; + } + + /** + * optional .UI32s Temp = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTemp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public UI32s getTemp() { + return temp; + } + + /** + * optional .UI32s Temp = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public UI32s getMutableTemp() { + bitField0_ |= 0x00000008; + return temp; + } + + /** + * optional .UI32s Temp = 15; + * @param value the temp to set + * @return this + */ + public GachaNewbieInfo setTemp(final UI32s value) { + bitField0_ |= 0x00000008; + temp.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaNewbieInfo clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaNewbieInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaNewbieInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaNewbieInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .UI32s Cards = 14; + * @return whether the cards field is set + */ + public boolean hasCards() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * repeated .UI32s Cards = 14; + * @return this + */ + public GachaNewbieInfo clearCards() { + bitField0_ &= ~0x00000020; + cards.clear(); + return this; + } + + /** + * repeated .UI32s Cards = 14; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCards() { + return cards; + } + + /** + * repeated .UI32s Cards = 14; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCards() { + bitField0_ |= 0x00000020; + return cards; + } + + /** + * repeated .UI32s Cards = 14; + * @param value the cards to add + * @return this + */ + public GachaNewbieInfo addCards(final UI32s value) { + bitField0_ |= 0x00000020; + cards.add(value); + return this; + } + + /** + * repeated .UI32s Cards = 14; + * @param values the cards to add + * @return this + */ + public GachaNewbieInfo addAllCards(final UI32s... values) { + bitField0_ |= 0x00000020; + cards.addAll(values); + return this; + } + + @Override + public GachaNewbieInfo copyFrom(final GachaNewbieInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + times = other.times; + receive = other.receive; + temp.copyFrom(other.temp); + nextPackage.copyFrom(other.nextPackage); + cards.copyFrom(other.cards); + } + return this; + } + + @Override + public GachaNewbieInfo mergeFrom(final GachaNewbieInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasReceive()) { + setReceive(other.receive); + } + if (other.hasTemp()) { + getMutableTemp().mergeFrom(other.temp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCards()) { + getMutableCards().addAll(other.cards); + } + return this; + } + + @Override + public GachaNewbieInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + times = 0; + receive = false; + temp.clear(); + nextPackage.clear(); + cards.clear(); + return this; + } + + @Override + public GachaNewbieInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + temp.clearQuick(); + nextPackage.clear(); + cards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaNewbieInfo)) { + return false; + } + GachaNewbieInfo other = (GachaNewbieInfo) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTimes() || times == other.times) + && (!hasReceive() || receive == other.receive) + && (!hasTemp() || temp.equals(other.temp)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCards() || cards.equals(other.cards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(receive); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(temp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < cards.length(); i++) { + output.writeRawByte((byte) 114); + output.writeMessageNoTag(cards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(temp); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * cards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(cards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaNewbieInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // receive + receive = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // temp + input.readMessage(temp); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 114) { + break; + } + } + case 114: { + // cards + tag = input.readRepeatedMessage(cards, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.receive, receive); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.temp, temp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.cards, cards); + } + output.endObject(); + } + + @Override + public GachaNewbieInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1548023101: { + if (input.isAtField(FieldNames.receive)) { + if (!input.trySkipNullValue()) { + receive = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2602996: { + if (input.isAtField(FieldNames.temp)) { + if (!input.trySkipNullValue()) { + input.readMessage(temp); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64878403: { + if (input.isAtField(FieldNames.cards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(cards); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaNewbieInfo clone() { + return new GachaNewbieInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaNewbieInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaNewbieInfo(), data).checkInitialized(); + } + + public static GachaNewbieInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieInfo(), input).checkInitialized(); + } + + public static GachaNewbieInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaNewbieInfo messages + */ + public static MessageFactory getFactory() { + return GachaNewbieInfoFactory.INSTANCE; + } + + private enum GachaNewbieInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaNewbieInfo create() { + return GachaNewbieInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName times = FieldName.forField("Times"); + + static final FieldName receive = FieldName.forField("Receive"); + + static final FieldName temp = FieldName.forField("Temp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cards = FieldName.forField("Cards"); + } + } + + /** + * Protobuf type {@code GachaNewbieInfoResp} + */ + public static final class GachaNewbieInfoResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .GachaNewbieInfo List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(GachaNewbieInfo.getFactory()); + + private GachaNewbieInfoResp() { + } + + /** + * @return a new empty instance of {@code GachaNewbieInfoResp} + */ + public static GachaNewbieInfoResp newInstance() { + return new GachaNewbieInfoResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaNewbieInfoResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaNewbieInfoResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaNewbieInfoResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaNewbieInfoResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .GachaNewbieInfo List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .GachaNewbieInfo List = 1; + * @return this + */ + public GachaNewbieInfoResp clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .GachaNewbieInfo List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .GachaNewbieInfo List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .GachaNewbieInfo List = 1; + * @param value the list to add + * @return this + */ + public GachaNewbieInfoResp addList(final GachaNewbieInfo value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .GachaNewbieInfo List = 1; + * @param values the list to add + * @return this + */ + public GachaNewbieInfoResp addAllList(final GachaNewbieInfo... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public GachaNewbieInfoResp copyFrom(final GachaNewbieInfoResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public GachaNewbieInfoResp mergeFrom(final GachaNewbieInfoResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public GachaNewbieInfoResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public GachaNewbieInfoResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaNewbieInfoResp)) { + return false; + } + GachaNewbieInfoResp other = (GachaNewbieInfoResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaNewbieInfoResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public GachaNewbieInfoResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaNewbieInfoResp clone() { + return new GachaNewbieInfoResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaNewbieInfoResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaNewbieInfoResp(), data).checkInitialized(); + } + + public static GachaNewbieInfoResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieInfoResp(), input).checkInitialized(); + } + + public static GachaNewbieInfoResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieInfoResp(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaNewbieInfoResp messages + */ + public static MessageFactory getFactory() { + return GachaNewbieInfoRespFactory.INSTANCE; + } + + private enum GachaNewbieInfoRespFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaNewbieInfoResp create() { + return GachaNewbieInfoResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GachaNewbieObtain.java b/src/generated/main/emu/nebula/proto/GachaNewbieObtain.java new file mode 100644 index 0000000..a0f6964 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaNewbieObtain.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class GachaNewbieObtain { + /** + * Protobuf type {@code GachaNewbieObtainReq} + */ + public static final class GachaNewbieObtainReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Idx = 2; + */ + private int idx; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private GachaNewbieObtainReq() { + } + + /** + * @return a new empty instance of {@code GachaNewbieObtainReq} + */ + public static GachaNewbieObtainReq newInstance() { + return new GachaNewbieObtainReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public GachaNewbieObtainReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public GachaNewbieObtainReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Idx = 2; + * @return whether the idx field is set + */ + public boolean hasIdx() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Idx = 2; + * @return this + */ + public GachaNewbieObtainReq clearIdx() { + bitField0_ &= ~0x00000002; + idx = 0; + return this; + } + + /** + * optional uint32 Idx = 2; + * @return the idx + */ + public int getIdx() { + return idx; + } + + /** + * optional uint32 Idx = 2; + * @param value the idx to set + * @return this + */ + public GachaNewbieObtainReq setIdx(final int value) { + bitField0_ |= 0x00000002; + idx = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaNewbieObtainReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaNewbieObtainReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaNewbieObtainReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaNewbieObtainReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public GachaNewbieObtainReq copyFrom(final GachaNewbieObtainReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + idx = other.idx; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaNewbieObtainReq mergeFrom(final GachaNewbieObtainReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasIdx()) { + setIdx(other.idx); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaNewbieObtainReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + idx = 0; + nextPackage.clear(); + return this; + } + + @Override + public GachaNewbieObtainReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaNewbieObtainReq)) { + return false; + } + GachaNewbieObtainReq other = (GachaNewbieObtainReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasIdx() || idx == other.idx) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(idx); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(idx); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaNewbieObtainReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // idx + idx = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.idx, idx); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public GachaNewbieObtainReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73373: { + if (input.isAtField(FieldNames.idx)) { + if (!input.trySkipNullValue()) { + idx = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaNewbieObtainReq clone() { + return new GachaNewbieObtainReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaNewbieObtainReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaNewbieObtainReq(), data).checkInitialized(); + } + + public static GachaNewbieObtainReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieObtainReq(), input).checkInitialized(); + } + + public static GachaNewbieObtainReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieObtainReq(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaNewbieObtainReq messages + */ + public static MessageFactory getFactory() { + return GachaNewbieObtainReqFactory.INSTANCE; + } + + private enum GachaNewbieObtainReqFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaNewbieObtainReq create() { + return GachaNewbieObtainReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName idx = FieldName.forField("Idx"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GachaNewbieSave.java b/src/generated/main/emu/nebula/proto/GachaNewbieSave.java new file mode 100644 index 0000000..c9518e6 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaNewbieSave.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class GachaNewbieSave { + /** + * Protobuf type {@code GachaNewbieSaveReq} + */ + public static final class GachaNewbieSaveReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Idx = 2; + */ + private int idx; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private GachaNewbieSaveReq() { + } + + /** + * @return a new empty instance of {@code GachaNewbieSaveReq} + */ + public static GachaNewbieSaveReq newInstance() { + return new GachaNewbieSaveReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public GachaNewbieSaveReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public GachaNewbieSaveReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Idx = 2; + * @return whether the idx field is set + */ + public boolean hasIdx() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Idx = 2; + * @return this + */ + public GachaNewbieSaveReq clearIdx() { + bitField0_ &= ~0x00000002; + idx = 0; + return this; + } + + /** + * optional uint32 Idx = 2; + * @return the idx + */ + public int getIdx() { + return idx; + } + + /** + * optional uint32 Idx = 2; + * @param value the idx to set + * @return this + */ + public GachaNewbieSaveReq setIdx(final int value) { + bitField0_ |= 0x00000002; + idx = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaNewbieSaveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaNewbieSaveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaNewbieSaveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaNewbieSaveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public GachaNewbieSaveReq copyFrom(final GachaNewbieSaveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + idx = other.idx; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaNewbieSaveReq mergeFrom(final GachaNewbieSaveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasIdx()) { + setIdx(other.idx); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaNewbieSaveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + idx = 0; + nextPackage.clear(); + return this; + } + + @Override + public GachaNewbieSaveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaNewbieSaveReq)) { + return false; + } + GachaNewbieSaveReq other = (GachaNewbieSaveReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasIdx() || idx == other.idx) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(idx); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(idx); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaNewbieSaveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // idx + idx = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.idx, idx); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public GachaNewbieSaveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73373: { + if (input.isAtField(FieldNames.idx)) { + if (!input.trySkipNullValue()) { + idx = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaNewbieSaveReq clone() { + return new GachaNewbieSaveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaNewbieSaveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaNewbieSaveReq(), data).checkInitialized(); + } + + public static GachaNewbieSaveReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieSaveReq(), input).checkInitialized(); + } + + public static GachaNewbieSaveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieSaveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaNewbieSaveReq messages + */ + public static MessageFactory getFactory() { + return GachaNewbieSaveReqFactory.INSTANCE; + } + + private enum GachaNewbieSaveReqFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaNewbieSaveReq create() { + return GachaNewbieSaveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName idx = FieldName.forField("Idx"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GachaNewbieSpin.java b/src/generated/main/emu/nebula/proto/GachaNewbieSpin.java new file mode 100644 index 0000000..5f07643 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaNewbieSpin.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class GachaNewbieSpin { + /** + * Protobuf type {@code GachaNewbieSpinResp} + */ + public static final class GachaNewbieSpinResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Cards = 1; + */ + private final RepeatedInt cards = RepeatedInt.newEmptyInstance(); + + private GachaNewbieSpinResp() { + } + + /** + * @return a new empty instance of {@code GachaNewbieSpinResp} + */ + public static GachaNewbieSpinResp newInstance() { + return new GachaNewbieSpinResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaNewbieSpinResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaNewbieSpinResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaNewbieSpinResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaNewbieSpinResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Cards = 1; + * @return whether the cards field is set + */ + public boolean hasCards() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Cards = 1; + * @return this + */ + public GachaNewbieSpinResp clearCards() { + bitField0_ &= ~0x00000002; + cards.clear(); + return this; + } + + /** + * repeated uint32 Cards = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCards() { + return cards; + } + + /** + * repeated uint32 Cards = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCards() { + bitField0_ |= 0x00000002; + return cards; + } + + /** + * repeated uint32 Cards = 1; + * @param value the cards to add + * @return this + */ + public GachaNewbieSpinResp addCards(final int value) { + bitField0_ |= 0x00000002; + cards.add(value); + return this; + } + + /** + * repeated uint32 Cards = 1; + * @param values the cards to add + * @return this + */ + public GachaNewbieSpinResp addAllCards(final int... values) { + bitField0_ |= 0x00000002; + cards.addAll(values); + return this; + } + + @Override + public GachaNewbieSpinResp copyFrom(final GachaNewbieSpinResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + cards.copyFrom(other.cards); + } + return this; + } + + @Override + public GachaNewbieSpinResp mergeFrom(final GachaNewbieSpinResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCards()) { + getMutableCards().addAll(other.cards); + } + return this; + } + + @Override + public GachaNewbieSpinResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cards.clear(); + return this; + } + + @Override + public GachaNewbieSpinResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cards.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaNewbieSpinResp)) { + return false; + } + GachaNewbieSpinResp other = (GachaNewbieSpinResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCards() || cards.equals(other.cards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < cards.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(cards.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * cards.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(cards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaNewbieSpinResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // cards [packed=true] + input.readPackedUInt32(cards, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // cards [packed=false] + tag = input.readRepeatedUInt32(cards, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.cards, cards); + } + output.endObject(); + } + + @Override + public GachaNewbieSpinResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64878403: { + if (input.isAtField(FieldNames.cards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(cards); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaNewbieSpinResp clone() { + return new GachaNewbieSpinResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaNewbieSpinResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaNewbieSpinResp(), data).checkInitialized(); + } + + public static GachaNewbieSpinResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieSpinResp(), input).checkInitialized(); + } + + public static GachaNewbieSpinResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaNewbieSpinResp(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaNewbieSpinResp messages + */ + public static MessageFactory getFactory() { + return GachaNewbieSpinRespFactory.INSTANCE; + } + + private enum GachaNewbieSpinRespFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaNewbieSpinResp create() { + return GachaNewbieSpinResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cards = FieldName.forField("Cards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GachaSpin.java b/src/generated/main/emu/nebula/proto/GachaSpin.java new file mode 100644 index 0000000..1ae07d9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GachaSpin.java @@ -0,0 +1,2025 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class GachaSpin { + /** + * Protobuf type {@code GachaSpinReq} + */ + public static final class GachaSpinReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Mode = 2; + */ + private int mode; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private GachaSpinReq() { + } + + /** + * @return a new empty instance of {@code GachaSpinReq} + */ + public static GachaSpinReq newInstance() { + return new GachaSpinReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public GachaSpinReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public GachaSpinReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Mode = 2; + * @return whether the mode field is set + */ + public boolean hasMode() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Mode = 2; + * @return this + */ + public GachaSpinReq clearMode() { + bitField0_ &= ~0x00000002; + mode = 0; + return this; + } + + /** + * optional uint32 Mode = 2; + * @return the mode + */ + public int getMode() { + return mode; + } + + /** + * optional uint32 Mode = 2; + * @param value the mode to set + * @return this + */ + public GachaSpinReq setMode(final int value) { + bitField0_ |= 0x00000002; + mode = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaSpinReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaSpinReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaSpinReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaSpinReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public GachaSpinReq copyFrom(final GachaSpinReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + mode = other.mode; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaSpinReq mergeFrom(final GachaSpinReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasMode()) { + setMode(other.mode); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GachaSpinReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + mode = 0; + nextPackage.clear(); + return this; + } + + @Override + public GachaSpinReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaSpinReq)) { + return false; + } + GachaSpinReq other = (GachaSpinReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasMode() || mode == other.mode) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(mode); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mode); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaSpinReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // mode + mode = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.mode, mode); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public GachaSpinReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2403779: { + if (input.isAtField(FieldNames.mode)) { + if (!input.trySkipNullValue()) { + mode = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaSpinReq clone() { + return new GachaSpinReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaSpinReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaSpinReq(), data).checkInitialized(); + } + + public static GachaSpinReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaSpinReq(), input).checkInitialized(); + } + + public static GachaSpinReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaSpinReq(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaSpinReq messages + */ + public static MessageFactory getFactory() { + return GachaSpinReqFactory.INSTANCE; + } + + private enum GachaSpinReqFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaSpinReq create() { + return GachaSpinReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName mode = FieldName.forField("Mode"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code GachaSpinResp} + */ + public static final class GachaSpinResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Time = 3; + */ + private long time; + + /** + * optional uint32 AMissTimes = 10; + */ + private int aMissTimes; + + /** + * optional uint32 GachaTotalTimes = 11; + */ + private int gachaTotalTimes; + + /** + * optional uint32 TotalTimes = 12; + */ + private int totalTimes; + + /** + * optional uint32 AupGuaranteeTimes = 13; + */ + private int aupGuaranteeTimes; + + /** + * optional uint32 AupMissTimes = 14; + */ + private int aupMissTimes; + + /** + * optional uint32 DaysCount = 15; + */ + private int daysCount; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .GachaCard Cards = 1; + */ + private final RepeatedMessage cards = RepeatedMessage.newEmptyInstance(GachaCard.getFactory()); + + private GachaSpinResp() { + } + + /** + * @return a new empty instance of {@code GachaSpinResp} + */ + public static GachaSpinResp newInstance() { + return new GachaSpinResp(); + } + + /** + * optional int64 Time = 3; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Time = 3; + * @return this + */ + public GachaSpinResp clearTime() { + bitField0_ &= ~0x00000001; + time = 0L; + return this; + } + + /** + * optional int64 Time = 3; + * @return the time + */ + public long getTime() { + return time; + } + + /** + * optional int64 Time = 3; + * @param value the time to set + * @return this + */ + public GachaSpinResp setTime(final long value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * optional uint32 AMissTimes = 10; + * @return whether the aMissTimes field is set + */ + public boolean hasAMissTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 AMissTimes = 10; + * @return this + */ + public GachaSpinResp clearAMissTimes() { + bitField0_ &= ~0x00000002; + aMissTimes = 0; + return this; + } + + /** + * optional uint32 AMissTimes = 10; + * @return the aMissTimes + */ + public int getAMissTimes() { + return aMissTimes; + } + + /** + * optional uint32 AMissTimes = 10; + * @param value the aMissTimes to set + * @return this + */ + public GachaSpinResp setAMissTimes(final int value) { + bitField0_ |= 0x00000002; + aMissTimes = value; + return this; + } + + /** + * optional uint32 GachaTotalTimes = 11; + * @return whether the gachaTotalTimes field is set + */ + public boolean hasGachaTotalTimes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 GachaTotalTimes = 11; + * @return this + */ + public GachaSpinResp clearGachaTotalTimes() { + bitField0_ &= ~0x00000004; + gachaTotalTimes = 0; + return this; + } + + /** + * optional uint32 GachaTotalTimes = 11; + * @return the gachaTotalTimes + */ + public int getGachaTotalTimes() { + return gachaTotalTimes; + } + + /** + * optional uint32 GachaTotalTimes = 11; + * @param value the gachaTotalTimes to set + * @return this + */ + public GachaSpinResp setGachaTotalTimes(final int value) { + bitField0_ |= 0x00000004; + gachaTotalTimes = value; + return this; + } + + /** + * optional uint32 TotalTimes = 12; + * @return whether the totalTimes field is set + */ + public boolean hasTotalTimes() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 TotalTimes = 12; + * @return this + */ + public GachaSpinResp clearTotalTimes() { + bitField0_ &= ~0x00000008; + totalTimes = 0; + return this; + } + + /** + * optional uint32 TotalTimes = 12; + * @return the totalTimes + */ + public int getTotalTimes() { + return totalTimes; + } + + /** + * optional uint32 TotalTimes = 12; + * @param value the totalTimes to set + * @return this + */ + public GachaSpinResp setTotalTimes(final int value) { + bitField0_ |= 0x00000008; + totalTimes = value; + return this; + } + + /** + * optional uint32 AupGuaranteeTimes = 13; + * @return whether the aupGuaranteeTimes field is set + */ + public boolean hasAupGuaranteeTimes() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 AupGuaranteeTimes = 13; + * @return this + */ + public GachaSpinResp clearAupGuaranteeTimes() { + bitField0_ &= ~0x00000010; + aupGuaranteeTimes = 0; + return this; + } + + /** + * optional uint32 AupGuaranteeTimes = 13; + * @return the aupGuaranteeTimes + */ + public int getAupGuaranteeTimes() { + return aupGuaranteeTimes; + } + + /** + * optional uint32 AupGuaranteeTimes = 13; + * @param value the aupGuaranteeTimes to set + * @return this + */ + public GachaSpinResp setAupGuaranteeTimes(final int value) { + bitField0_ |= 0x00000010; + aupGuaranteeTimes = value; + return this; + } + + /** + * optional uint32 AupMissTimes = 14; + * @return whether the aupMissTimes field is set + */ + public boolean hasAupMissTimes() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 AupMissTimes = 14; + * @return this + */ + public GachaSpinResp clearAupMissTimes() { + bitField0_ &= ~0x00000020; + aupMissTimes = 0; + return this; + } + + /** + * optional uint32 AupMissTimes = 14; + * @return the aupMissTimes + */ + public int getAupMissTimes() { + return aupMissTimes; + } + + /** + * optional uint32 AupMissTimes = 14; + * @param value the aupMissTimes to set + * @return this + */ + public GachaSpinResp setAupMissTimes(final int value) { + bitField0_ |= 0x00000020; + aupMissTimes = value; + return this; + } + + /** + * optional uint32 DaysCount = 15; + * @return whether the daysCount field is set + */ + public boolean hasDaysCount() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional uint32 DaysCount = 15; + * @return this + */ + public GachaSpinResp clearDaysCount() { + bitField0_ &= ~0x00000040; + daysCount = 0; + return this; + } + + /** + * optional uint32 DaysCount = 15; + * @return the daysCount + */ + public int getDaysCount() { + return daysCount; + } + + /** + * optional uint32 DaysCount = 15; + * @param value the daysCount to set + * @return this + */ + public GachaSpinResp setDaysCount(final int value) { + bitField0_ |= 0x00000040; + daysCount = value; + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public GachaSpinResp clearChange() { + bitField0_ &= ~0x00000080; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000080; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public GachaSpinResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000080; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaSpinResp clearNextPackage() { + bitField0_ &= ~0x00000100; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000100; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaSpinResp addNextPackage(final byte value) { + bitField0_ |= 0x00000100; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaSpinResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaSpinResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .GachaCard Cards = 1; + * @return whether the cards field is set + */ + public boolean hasCards() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * repeated .GachaCard Cards = 1; + * @return this + */ + public GachaSpinResp clearCards() { + bitField0_ &= ~0x00000200; + cards.clear(); + return this; + } + + /** + * repeated .GachaCard Cards = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCards() { + return cards; + } + + /** + * repeated .GachaCard Cards = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCards() { + bitField0_ |= 0x00000200; + return cards; + } + + /** + * repeated .GachaCard Cards = 1; + * @param value the cards to add + * @return this + */ + public GachaSpinResp addCards(final GachaCard value) { + bitField0_ |= 0x00000200; + cards.add(value); + return this; + } + + /** + * repeated .GachaCard Cards = 1; + * @param values the cards to add + * @return this + */ + public GachaSpinResp addAllCards(final GachaCard... values) { + bitField0_ |= 0x00000200; + cards.addAll(values); + return this; + } + + @Override + public GachaSpinResp copyFrom(final GachaSpinResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + aMissTimes = other.aMissTimes; + gachaTotalTimes = other.gachaTotalTimes; + totalTimes = other.totalTimes; + aupGuaranteeTimes = other.aupGuaranteeTimes; + aupMissTimes = other.aupMissTimes; + daysCount = other.daysCount; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + cards.copyFrom(other.cards); + } + return this; + } + + @Override + public GachaSpinResp mergeFrom(final GachaSpinResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasAMissTimes()) { + setAMissTimes(other.aMissTimes); + } + if (other.hasGachaTotalTimes()) { + setGachaTotalTimes(other.gachaTotalTimes); + } + if (other.hasTotalTimes()) { + setTotalTimes(other.totalTimes); + } + if (other.hasAupGuaranteeTimes()) { + setAupGuaranteeTimes(other.aupGuaranteeTimes); + } + if (other.hasAupMissTimes()) { + setAupMissTimes(other.aupMissTimes); + } + if (other.hasDaysCount()) { + setDaysCount(other.daysCount); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCards()) { + getMutableCards().addAll(other.cards); + } + return this; + } + + @Override + public GachaSpinResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0L; + aMissTimes = 0; + gachaTotalTimes = 0; + totalTimes = 0; + aupGuaranteeTimes = 0; + aupMissTimes = 0; + daysCount = 0; + change.clear(); + nextPackage.clear(); + cards.clear(); + return this; + } + + @Override + public GachaSpinResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + cards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaSpinResp)) { + return false; + } + GachaSpinResp other = (GachaSpinResp) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || time == other.time) + && (!hasAMissTimes() || aMissTimes == other.aMissTimes) + && (!hasGachaTotalTimes() || gachaTotalTimes == other.gachaTotalTimes) + && (!hasTotalTimes() || totalTimes == other.totalTimes) + && (!hasAupGuaranteeTimes() || aupGuaranteeTimes == other.aupGuaranteeTimes) + && (!hasAupMissTimes() || aupMissTimes == other.aupMissTimes) + && (!hasDaysCount() || daysCount == other.daysCount) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCards() || cards.equals(other.cards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(aMissTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 88); + output.writeUInt32NoTag(gachaTotalTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(totalTimes); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 104); + output.writeUInt32NoTag(aupGuaranteeTimes); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(aupMissTimes); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(daysCount); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + for (int i = 0; i < cards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(cards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(aMissTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaTotalTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(totalTimes); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(aupGuaranteeTimes); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(aupMissTimes); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(daysCount); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + size += (1 * cards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(cards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaSpinResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // time + time = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 80) { + break; + } + } + case 80: { + // aMissTimes + aMissTimes = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 88) { + break; + } + } + case 88: { + // gachaTotalTimes + gachaTotalTimes = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 96) { + break; + } + } + case 96: { + // totalTimes + totalTimes = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 104) { + break; + } + } + case 104: { + // aupGuaranteeTimes + aupGuaranteeTimes = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // aupMissTimes + aupMissTimes = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // daysCount + daysCount = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // cards + tag = input.readRepeatedMessage(cards, tag); + bitField0_ |= 0x00000200; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.aMissTimes, aMissTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.gachaTotalTimes, gachaTotalTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.totalTimes, totalTimes); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.aupGuaranteeTimes, aupGuaranteeTimes); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.aupMissTimes, aupMissTimes); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.daysCount, daysCount); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRepeatedMessage(FieldNames.cards, cards); + } + output.endObject(); + } + + @Override + public GachaSpinResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -955152279: { + if (input.isAtField(FieldNames.aMissTimes)) { + if (!input.trySkipNullValue()) { + aMissTimes = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1802973852: { + if (input.isAtField(FieldNames.gachaTotalTimes)) { + if (!input.trySkipNullValue()) { + gachaTotalTimes = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1277592194: { + if (input.isAtField(FieldNames.totalTimes)) { + if (!input.trySkipNullValue()) { + totalTimes = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1466287270: { + if (input.isAtField(FieldNames.aupGuaranteeTimes)) { + if (!input.trySkipNullValue()) { + aupGuaranteeTimes = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1590821778: { + if (input.isAtField(FieldNames.aupMissTimes)) { + if (!input.trySkipNullValue()) { + aupMissTimes = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022494504: { + if (input.isAtField(FieldNames.daysCount)) { + if (!input.trySkipNullValue()) { + daysCount = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64878403: { + if (input.isAtField(FieldNames.cards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(cards); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaSpinResp clone() { + return new GachaSpinResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaSpinResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaSpinResp(), data).checkInitialized(); + } + + public static GachaSpinResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaSpinResp(), input).checkInitialized(); + } + + public static GachaSpinResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaSpinResp(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaSpinResp messages + */ + public static MessageFactory getFactory() { + return GachaSpinRespFactory.INSTANCE; + } + + private enum GachaSpinRespFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaSpinResp create() { + return GachaSpinResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("Time"); + + static final FieldName aMissTimes = FieldName.forField("AMissTimes"); + + static final FieldName gachaTotalTimes = FieldName.forField("GachaTotalTimes"); + + static final FieldName totalTimes = FieldName.forField("TotalTimes"); + + static final FieldName aupGuaranteeTimes = FieldName.forField("AupGuaranteeTimes"); + + static final FieldName aupMissTimes = FieldName.forField("AupMissTimes"); + + static final FieldName daysCount = FieldName.forField("DaysCount"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cards = FieldName.forField("Cards"); + } + } + + /** + * Protobuf type {@code GachaCard} + */ + public static final class GachaCard extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ItemTpl Card = 1; + */ + private final Public.ItemTpl card = Public.ItemTpl.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Rewards = 2; + */ + private final RepeatedMessage rewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private GachaCard() { + } + + /** + * @return a new empty instance of {@code GachaCard} + */ + public static GachaCard newInstance() { + return new GachaCard(); + } + + /** + * optional .ItemTpl Card = 1; + * @return whether the card field is set + */ + public boolean hasCard() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ItemTpl Card = 1; + * @return this + */ + public GachaCard clearCard() { + bitField0_ &= ~0x00000001; + card.clear(); + return this; + } + + /** + * optional .ItemTpl Card = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCard()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ItemTpl getCard() { + return card; + } + + /** + * optional .ItemTpl Card = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ItemTpl getMutableCard() { + bitField0_ |= 0x00000001; + return card; + } + + /** + * optional .ItemTpl Card = 1; + * @param value the card to set + * @return this + */ + public GachaCard setCard(final Public.ItemTpl value) { + bitField0_ |= 0x00000001; + card.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GachaCard clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GachaCard addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GachaCard addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GachaCard setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @return this + */ + public GachaCard clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * repeated .ItemTpl Rewards = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewards() { + return rewards; + } + + /** + * repeated .ItemTpl Rewards = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @param value the rewards to add + * @return this + */ + public GachaCard addRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * repeated .ItemTpl Rewards = 2; + * @param values the rewards to add + * @return this + */ + public GachaCard addAllRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public GachaCard copyFrom(final GachaCard other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + card.copyFrom(other.card); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public GachaCard mergeFrom(final GachaCard other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCard()) { + getMutableCard().mergeFrom(other.card); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public GachaCard clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + card.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public GachaCard clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + card.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GachaCard)) { + return false; + } + GachaCard other = (GachaCard) o; + return bitField0_ == other.bitField0_ + && (!hasCard() || card.equals(other.card)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(card); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(card); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GachaCard mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // card + input.readMessage(card); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.card, card); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public GachaCard mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2092848: { + if (input.isAtField(FieldNames.card)) { + if (!input.trySkipNullValue()) { + input.readMessage(card); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GachaCard clone() { + return new GachaCard().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GachaCard parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GachaCard(), data).checkInitialized(); + } + + public static GachaCard parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaCard(), input).checkInitialized(); + } + + public static GachaCard parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GachaCard(), input).checkInitialized(); + } + + /** + * @return factory for creating GachaCard messages + */ + public static MessageFactory getFactory() { + return GachaCardFactory.INSTANCE; + } + + private enum GachaCardFactory implements MessageFactory { + INSTANCE; + + @Override + public GachaCard create() { + return GachaCard.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName card = FieldName.forField("Card"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/GemConvert.java b/src/generated/main/emu/nebula/proto/GemConvert.java new file mode 100644 index 0000000..95e9518 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GemConvert.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class GemConvert { +} diff --git a/src/generated/main/emu/nebula/proto/GmSudo.java b/src/generated/main/emu/nebula/proto/GmSudo.java new file mode 100644 index 0000000..b41dbb7 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/GmSudo.java @@ -0,0 +1,521 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class GmSudo { + /** + * Protobuf type {@code SudoCommand} + */ + public static final class SudoCommand extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Action = 1; + */ + private final Utf8String action = Utf8String.newEmptyInstance(); + + /** + * optional string Args = 2; + */ + private final Utf8String args = Utf8String.newEmptyInstance(); + + private SudoCommand() { + } + + /** + * @return a new empty instance of {@code SudoCommand} + */ + public static SudoCommand newInstance() { + return new SudoCommand(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public SudoCommand clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public SudoCommand addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public SudoCommand addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public SudoCommand setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Action = 1; + * @return whether the action field is set + */ + public boolean hasAction() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Action = 1; + * @return this + */ + public SudoCommand clearAction() { + bitField0_ &= ~0x00000002; + action.clear(); + return this; + } + + /** + * optional string Action = 1; + * @return the action + */ + public String getAction() { + return action.getString(); + } + + /** + * optional string Action = 1; + * @return internal {@code Utf8String} representation of action for reading + */ + public Utf8String getActionBytes() { + return this.action; + } + + /** + * optional string Action = 1; + * @return internal {@code Utf8String} representation of action for modifications + */ + public Utf8String getMutableActionBytes() { + bitField0_ |= 0x00000002; + return this.action; + } + + /** + * optional string Action = 1; + * @param value the action to set + * @return this + */ + public SudoCommand setAction(final CharSequence value) { + bitField0_ |= 0x00000002; + action.copyFrom(value); + return this; + } + + /** + * optional string Action = 1; + * @param value the action to set + * @return this + */ + public SudoCommand setAction(final Utf8String value) { + bitField0_ |= 0x00000002; + action.copyFrom(value); + return this; + } + + /** + * optional string Args = 2; + * @return whether the args field is set + */ + public boolean hasArgs() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Args = 2; + * @return this + */ + public SudoCommand clearArgs() { + bitField0_ &= ~0x00000004; + args.clear(); + return this; + } + + /** + * optional string Args = 2; + * @return the args + */ + public String getArgs() { + return args.getString(); + } + + /** + * optional string Args = 2; + * @return internal {@code Utf8String} representation of args for reading + */ + public Utf8String getArgsBytes() { + return this.args; + } + + /** + * optional string Args = 2; + * @return internal {@code Utf8String} representation of args for modifications + */ + public Utf8String getMutableArgsBytes() { + bitField0_ |= 0x00000004; + return this.args; + } + + /** + * optional string Args = 2; + * @param value the args to set + * @return this + */ + public SudoCommand setArgs(final CharSequence value) { + bitField0_ |= 0x00000004; + args.copyFrom(value); + return this; + } + + /** + * optional string Args = 2; + * @param value the args to set + * @return this + */ + public SudoCommand setArgs(final Utf8String value) { + bitField0_ |= 0x00000004; + args.copyFrom(value); + return this; + } + + @Override + public SudoCommand copyFrom(final SudoCommand other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + action.copyFrom(other.action); + args.copyFrom(other.args); + } + return this; + } + + @Override + public SudoCommand mergeFrom(final SudoCommand other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAction()) { + getMutableActionBytes().copyFrom(other.action); + } + if (other.hasArgs()) { + getMutableArgsBytes().copyFrom(other.args); + } + return this; + } + + @Override + public SudoCommand clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + action.clear(); + args.clear(); + return this; + } + + @Override + public SudoCommand clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + action.clear(); + args.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SudoCommand)) { + return false; + } + SudoCommand other = (SudoCommand) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAction() || action.equals(other.action)) + && (!hasArgs() || args.equals(other.args)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(action); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(args); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(action); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(args); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SudoCommand mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // action + input.readString(action); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // args + input.readString(args); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.action, action); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.args, args); + } + output.endObject(); + } + + @Override + public SudoCommand mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1955883606: { + if (input.isAtField(FieldNames.action)) { + if (!input.trySkipNullValue()) { + input.readString(action); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2049277: { + if (input.isAtField(FieldNames.args)) { + if (!input.trySkipNullValue()) { + input.readString(args); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SudoCommand clone() { + return new SudoCommand().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SudoCommand parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SudoCommand(), data).checkInitialized(); + } + + public static SudoCommand parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SudoCommand(), input).checkInitialized(); + } + + public static SudoCommand parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SudoCommand(), input).checkInitialized(); + } + + /** + * @return factory for creating SudoCommand messages + */ + public static MessageFactory getFactory() { + return SudoCommandFactory.INSTANCE; + } + + private enum SudoCommandFactory implements MessageFactory { + INSTANCE; + + @Override + public SudoCommand create() { + return SudoCommand.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName action = FieldName.forField("Action"); + + static final FieldName args = FieldName.forField("Args"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/Ike.java b/src/generated/main/emu/nebula/proto/Ike.java new file mode 100644 index 0000000..853f6a1 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/Ike.java @@ -0,0 +1,1265 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class Ike { + /** + * Protobuf type {@code IKEReq} + */ + public static final class IKEReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 ClientTs = 2; + */ + private long clientTs; + + /** + * optional int32 ProtoVersion = 1; + */ + private int protoVersion; + + /** + * optional bytes PubKey = 3; + */ + private final RepeatedByte pubKey = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private IKEReq() { + } + + /** + * @return a new empty instance of {@code IKEReq} + */ + public static IKEReq newInstance() { + return new IKEReq(); + } + + /** + * optional int64 ClientTs = 2; + * @return whether the clientTs field is set + */ + public boolean hasClientTs() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 ClientTs = 2; + * @return this + */ + public IKEReq clearClientTs() { + bitField0_ &= ~0x00000001; + clientTs = 0L; + return this; + } + + /** + * optional int64 ClientTs = 2; + * @return the clientTs + */ + public long getClientTs() { + return clientTs; + } + + /** + * optional int64 ClientTs = 2; + * @param value the clientTs to set + * @return this + */ + public IKEReq setClientTs(final long value) { + bitField0_ |= 0x00000001; + clientTs = value; + return this; + } + + /** + * optional int32 ProtoVersion = 1; + * @return whether the protoVersion field is set + */ + public boolean hasProtoVersion() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int32 ProtoVersion = 1; + * @return this + */ + public IKEReq clearProtoVersion() { + bitField0_ &= ~0x00000002; + protoVersion = 0; + return this; + } + + /** + * optional int32 ProtoVersion = 1; + * @return the protoVersion + */ + public int getProtoVersion() { + return protoVersion; + } + + /** + * optional int32 ProtoVersion = 1; + * @param value the protoVersion to set + * @return this + */ + public IKEReq setProtoVersion(final int value) { + bitField0_ |= 0x00000002; + protoVersion = value; + return this; + } + + /** + * optional bytes PubKey = 3; + * @return whether the pubKey field is set + */ + public boolean hasPubKey() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes PubKey = 3; + * @return this + */ + public IKEReq clearPubKey() { + bitField0_ &= ~0x00000004; + pubKey.clear(); + return this; + } + + /** + * optional bytes PubKey = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePubKey()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getPubKey() { + return pubKey; + } + + /** + * optional bytes PubKey = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutablePubKey() { + bitField0_ |= 0x00000004; + return pubKey; + } + + /** + * optional bytes PubKey = 3; + * @param value the pubKey to add + * @return this + */ + public IKEReq addPubKey(final byte value) { + bitField0_ |= 0x00000004; + pubKey.add(value); + return this; + } + + /** + * optional bytes PubKey = 3; + * @param values the pubKey to add + * @return this + */ + public IKEReq addAllPubKey(final byte... values) { + bitField0_ |= 0x00000004; + pubKey.addAll(values); + return this; + } + + /** + * optional bytes PubKey = 3; + * @param values the pubKey to set + * @return this + */ + public IKEReq setPubKey(final byte... values) { + bitField0_ |= 0x00000004; + pubKey.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public IKEReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public IKEReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public IKEReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public IKEReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public IKEReq copyFrom(final IKEReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + clientTs = other.clientTs; + protoVersion = other.protoVersion; + pubKey.copyFrom(other.pubKey); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public IKEReq mergeFrom(final IKEReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasClientTs()) { + setClientTs(other.clientTs); + } + if (other.hasProtoVersion()) { + setProtoVersion(other.protoVersion); + } + if (other.hasPubKey()) { + getMutablePubKey().copyFrom(other.pubKey); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public IKEReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + clientTs = 0L; + protoVersion = 0; + pubKey.clear(); + nextPackage.clear(); + return this; + } + + @Override + public IKEReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + pubKey.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof IKEReq)) { + return false; + } + IKEReq other = (IKEReq) o; + return bitField0_ == other.bitField0_ + && (!hasClientTs() || clientTs == other.clientTs) + && (!hasProtoVersion() || protoVersion == other.protoVersion) + && (!hasPubKey() || pubKey.equals(other.pubKey)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(clientTs); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeInt32NoTag(protoVersion); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeBytesNoTag(pubKey); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(clientTs); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(protoVersion); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(pubKey); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public IKEReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // clientTs + clientTs = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // protoVersion + protoVersion = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // pubKey + input.readBytes(pubKey); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.clientTs, clientTs); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.protoVersion, protoVersion); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.pubKey, pubKey); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public IKEReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 973052874: { + if (input.isAtField(FieldNames.clientTs)) { + if (!input.trySkipNullValue()) { + clientTs = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1392888304: { + if (input.isAtField(FieldNames.protoVersion)) { + if (!input.trySkipNullValue()) { + protoVersion = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1893588414: { + if (input.isAtField(FieldNames.pubKey)) { + if (!input.trySkipNullValue()) { + input.readBytes(pubKey); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public IKEReq clone() { + return new IKEReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static IKEReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new IKEReq(), data).checkInitialized(); + } + + public static IKEReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new IKEReq(), input).checkInitialized(); + } + + public static IKEReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new IKEReq(), input).checkInitialized(); + } + + /** + * @return factory for creating IKEReq messages + */ + public static MessageFactory getFactory() { + return IKEReqFactory.INSTANCE; + } + + private enum IKEReqFactory implements MessageFactory { + INSTANCE; + + @Override + public IKEReq create() { + return IKEReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName clientTs = FieldName.forField("ClientTs"); + + static final FieldName protoVersion = FieldName.forField("ProtoVersion"); + + static final FieldName pubKey = FieldName.forField("PubKey"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code IKEResp} + */ + public static final class IKEResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 ServerTs = 3; + */ + private long serverTs; + + /** + * optional int32 Cipher = 2; + */ + private int cipher; + + /** + * optional bytes PubKey = 4; + */ + private final RepeatedByte pubKey = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Token = 1; + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + private IKEResp() { + } + + /** + * @return a new empty instance of {@code IKEResp} + */ + public static IKEResp newInstance() { + return new IKEResp(); + } + + /** + * optional int64 ServerTs = 3; + * @return whether the serverTs field is set + */ + public boolean hasServerTs() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 ServerTs = 3; + * @return this + */ + public IKEResp clearServerTs() { + bitField0_ &= ~0x00000001; + serverTs = 0L; + return this; + } + + /** + * optional int64 ServerTs = 3; + * @return the serverTs + */ + public long getServerTs() { + return serverTs; + } + + /** + * optional int64 ServerTs = 3; + * @param value the serverTs to set + * @return this + */ + public IKEResp setServerTs(final long value) { + bitField0_ |= 0x00000001; + serverTs = value; + return this; + } + + /** + * optional int32 Cipher = 2; + * @return whether the cipher field is set + */ + public boolean hasCipher() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int32 Cipher = 2; + * @return this + */ + public IKEResp clearCipher() { + bitField0_ &= ~0x00000002; + cipher = 0; + return this; + } + + /** + * optional int32 Cipher = 2; + * @return the cipher + */ + public int getCipher() { + return cipher; + } + + /** + * optional int32 Cipher = 2; + * @param value the cipher to set + * @return this + */ + public IKEResp setCipher(final int value) { + bitField0_ |= 0x00000002; + cipher = value; + return this; + } + + /** + * optional bytes PubKey = 4; + * @return whether the pubKey field is set + */ + public boolean hasPubKey() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes PubKey = 4; + * @return this + */ + public IKEResp clearPubKey() { + bitField0_ &= ~0x00000004; + pubKey.clear(); + return this; + } + + /** + * optional bytes PubKey = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePubKey()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getPubKey() { + return pubKey; + } + + /** + * optional bytes PubKey = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutablePubKey() { + bitField0_ |= 0x00000004; + return pubKey; + } + + /** + * optional bytes PubKey = 4; + * @param value the pubKey to add + * @return this + */ + public IKEResp addPubKey(final byte value) { + bitField0_ |= 0x00000004; + pubKey.add(value); + return this; + } + + /** + * optional bytes PubKey = 4; + * @param values the pubKey to add + * @return this + */ + public IKEResp addAllPubKey(final byte... values) { + bitField0_ |= 0x00000004; + pubKey.addAll(values); + return this; + } + + /** + * optional bytes PubKey = 4; + * @param values the pubKey to set + * @return this + */ + public IKEResp setPubKey(final byte... values) { + bitField0_ |= 0x00000004; + pubKey.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public IKEResp clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public IKEResp addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public IKEResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public IKEResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Token = 1; + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional string Token = 1; + * @return this + */ + public IKEResp clearToken() { + bitField0_ &= ~0x00000010; + token.clear(); + return this; + } + + /** + * optional string Token = 1; + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * optional string Token = 1; + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * optional string Token = 1; + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000010; + return this.token; + } + + /** + * optional string Token = 1; + * @param value the token to set + * @return this + */ + public IKEResp setToken(final CharSequence value) { + bitField0_ |= 0x00000010; + token.copyFrom(value); + return this; + } + + /** + * optional string Token = 1; + * @param value the token to set + * @return this + */ + public IKEResp setToken(final Utf8String value) { + bitField0_ |= 0x00000010; + token.copyFrom(value); + return this; + } + + @Override + public IKEResp copyFrom(final IKEResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + serverTs = other.serverTs; + cipher = other.cipher; + pubKey.copyFrom(other.pubKey); + nextPackage.copyFrom(other.nextPackage); + token.copyFrom(other.token); + } + return this; + } + + @Override + public IKEResp mergeFrom(final IKEResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasServerTs()) { + setServerTs(other.serverTs); + } + if (other.hasCipher()) { + setCipher(other.cipher); + } + if (other.hasPubKey()) { + getMutablePubKey().copyFrom(other.pubKey); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + return this; + } + + @Override + public IKEResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + serverTs = 0L; + cipher = 0; + pubKey.clear(); + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public IKEResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + pubKey.clear(); + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof IKEResp)) { + return false; + } + IKEResp other = (IKEResp) o; + return bitField0_ == other.bitField0_ + && (!hasServerTs() || serverTs == other.serverTs) + && (!hasCipher() || cipher == other.cipher) + && (!hasPubKey() || pubKey.equals(other.pubKey)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasToken() || token.equals(other.token)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(serverTs); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(cipher); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 34); + output.writeBytesNoTag(pubKey); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(token); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(serverTs); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(cipher); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(pubKey); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public IKEResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // serverTs + serverTs = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // cipher + cipher = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // pubKey + input.readBytes(pubKey); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // token + input.readString(token); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.serverTs, serverTs); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.cipher, cipher); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.pubKey, pubKey); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeString(FieldNames.token, token); + } + output.endObject(); + } + + @Override + public IKEResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1443748162: { + if (input.isAtField(FieldNames.serverTs)) { + if (!input.trySkipNullValue()) { + serverTs = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2018562603: { + if (input.isAtField(FieldNames.cipher)) { + if (!input.trySkipNullValue()) { + cipher = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1893588414: { + if (input.isAtField(FieldNames.pubKey)) { + if (!input.trySkipNullValue()) { + input.readBytes(pubKey); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80988633: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public IKEResp clone() { + return new IKEResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static IKEResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new IKEResp(), data).checkInitialized(); + } + + public static IKEResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new IKEResp(), input).checkInitialized(); + } + + public static IKEResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new IKEResp(), input).checkInitialized(); + } + + /** + * @return factory for creating IKEResp messages + */ + public static MessageFactory getFactory() { + return IKERespFactory.INSTANCE; + } + + private enum IKERespFactory implements MessageFactory { + INSTANCE; + + @Override + public IKEResp create() { + return IKEResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName serverTs = FieldName.forField("ServerTs"); + + static final FieldName cipher = FieldName.forField("Cipher"); + + static final FieldName pubKey = FieldName.forField("PubKey"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName token = FieldName.forField("Token"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/InfinityTowerApply.java b/src/generated/main/emu/nebula/proto/InfinityTowerApply.java new file mode 100644 index 0000000..a4416b6 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/InfinityTowerApply.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class InfinityTowerApply { + /** + * Protobuf type {@code InfinityTowerApplyReq} + */ + public static final class InfinityTowerApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 2; + */ + private long buildId; + + /** + * optional uint32 LevelId = 1; + */ + private int levelId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InfinityTowerApplyReq() { + } + + /** + * @return a new empty instance of {@code InfinityTowerApplyReq} + */ + public static InfinityTowerApplyReq newInstance() { + return new InfinityTowerApplyReq(); + } + + /** + * optional uint64 BuildId = 2; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 2; + * @return this + */ + public InfinityTowerApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 2; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 2; + * @param value the buildId to set + * @return this + */ + public InfinityTowerApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional uint32 LevelId = 1; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 LevelId = 1; + * @return this + */ + public InfinityTowerApplyReq clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 1; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 1; + * @param value the levelId to set + * @return this + */ + public InfinityTowerApplyReq setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public InfinityTowerApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public InfinityTowerApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public InfinityTowerApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public InfinityTowerApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InfinityTowerApplyReq copyFrom(final InfinityTowerApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + levelId = other.levelId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InfinityTowerApplyReq mergeFrom(final InfinityTowerApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InfinityTowerApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + levelId = 0; + nextPackage.clear(); + return this; + } + + @Override + public InfinityTowerApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InfinityTowerApplyReq)) { + return false; + } + InfinityTowerApplyReq other = (InfinityTowerApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InfinityTowerApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InfinityTowerApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InfinityTowerApplyReq clone() { + return new InfinityTowerApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InfinityTowerApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InfinityTowerApplyReq(), data).checkInitialized(); + } + + public static InfinityTowerApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerApplyReq(), input).checkInitialized(); + } + + public static InfinityTowerApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating InfinityTowerApplyReq messages + */ + public static MessageFactory getFactory() { + return InfinityTowerApplyReqFactory.INSTANCE; + } + + private enum InfinityTowerApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public InfinityTowerApplyReq create() { + return InfinityTowerApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/InfinityTowerDailyRewardReceive.java b/src/generated/main/emu/nebula/proto/InfinityTowerDailyRewardReceive.java new file mode 100644 index 0000000..5c857f9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/InfinityTowerDailyRewardReceive.java @@ -0,0 +1,524 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class InfinityTowerDailyRewardReceive { + /** + * Protobuf type {@code InfinityTowerDailyRewardReceiveResp} + */ + public static final class InfinityTowerDailyRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Show = 1; + */ + private final RepeatedMessage show = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private InfinityTowerDailyRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code InfinityTowerDailyRewardReceiveResp} + */ + public static InfinityTowerDailyRewardReceiveResp newInstance() { + return new InfinityTowerDailyRewardReceiveResp(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public InfinityTowerDailyRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public InfinityTowerDailyRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public InfinityTowerDailyRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public InfinityTowerDailyRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public InfinityTowerDailyRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public InfinityTowerDailyRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * @return whether the show field is set + */ + public boolean hasShow() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Show = 1; + * @return this + */ + public InfinityTowerDailyRewardReceiveResp clearShow() { + bitField0_ &= ~0x00000004; + show.clear(); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShow()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getShow() { + return show; + } + + /** + * repeated .ItemTpl Show = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableShow() { + bitField0_ |= 0x00000004; + return show; + } + + /** + * repeated .ItemTpl Show = 1; + * @param value the show to add + * @return this + */ + public InfinityTowerDailyRewardReceiveResp addShow(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + show.add(value); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * @param values the show to add + * @return this + */ + public InfinityTowerDailyRewardReceiveResp addAllShow(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + show.addAll(values); + return this; + } + + @Override + public InfinityTowerDailyRewardReceiveResp copyFrom( + final InfinityTowerDailyRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + show.copyFrom(other.show); + } + return this; + } + + @Override + public InfinityTowerDailyRewardReceiveResp mergeFrom( + final InfinityTowerDailyRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShow()) { + getMutableShow().addAll(other.show); + } + return this; + } + + @Override + public InfinityTowerDailyRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + show.clear(); + return this; + } + + @Override + public InfinityTowerDailyRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + show.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InfinityTowerDailyRewardReceiveResp)) { + return false; + } + InfinityTowerDailyRewardReceiveResp other = (InfinityTowerDailyRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShow() || show.equals(other.show)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < show.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(show.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * show.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(show); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InfinityTowerDailyRewardReceiveResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // show + tag = input.readRepeatedMessage(show, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.show, show); + } + output.endObject(); + } + + @Override + public InfinityTowerDailyRewardReceiveResp mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576157: { + if (input.isAtField(FieldNames.show)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(show); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InfinityTowerDailyRewardReceiveResp clone() { + return new InfinityTowerDailyRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InfinityTowerDailyRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InfinityTowerDailyRewardReceiveResp(), data).checkInitialized(); + } + + public static InfinityTowerDailyRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new InfinityTowerDailyRewardReceiveResp(), input).checkInitialized(); + } + + public static InfinityTowerDailyRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new InfinityTowerDailyRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InfinityTowerDailyRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return InfinityTowerDailyRewardReceiveRespFactory.INSTANCE; + } + + private enum InfinityTowerDailyRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public InfinityTowerDailyRewardReceiveResp create() { + return InfinityTowerDailyRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName show = FieldName.forField("Show"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/InfinityTowerInfo.java b/src/generated/main/emu/nebula/proto/InfinityTowerInfo.java new file mode 100644 index 0000000..c210b0d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/InfinityTowerInfo.java @@ -0,0 +1,618 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class InfinityTowerInfo { + /** + * Protobuf type {@code InfinityTowerInfoResp} + */ + public static final class InfinityTowerInfoResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 BountyLevel = 1; + */ + private int bountyLevel; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 PlotsIds = 2; + */ + private final RepeatedInt plotsIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated .InfinityTowerLevelInfo Infos = 3; + */ + private final RepeatedMessage infos = RepeatedMessage.newEmptyInstance(Public.InfinityTowerLevelInfo.getFactory()); + + private InfinityTowerInfoResp() { + } + + /** + * @return a new empty instance of {@code InfinityTowerInfoResp} + */ + public static InfinityTowerInfoResp newInstance() { + return new InfinityTowerInfoResp(); + } + + /** + * optional uint32 BountyLevel = 1; + * @return whether the bountyLevel field is set + */ + public boolean hasBountyLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 BountyLevel = 1; + * @return this + */ + public InfinityTowerInfoResp clearBountyLevel() { + bitField0_ &= ~0x00000001; + bountyLevel = 0; + return this; + } + + /** + * optional uint32 BountyLevel = 1; + * @return the bountyLevel + */ + public int getBountyLevel() { + return bountyLevel; + } + + /** + * optional uint32 BountyLevel = 1; + * @param value the bountyLevel to set + * @return this + */ + public InfinityTowerInfoResp setBountyLevel(final int value) { + bitField0_ |= 0x00000001; + bountyLevel = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public InfinityTowerInfoResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public InfinityTowerInfoResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public InfinityTowerInfoResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public InfinityTowerInfoResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 PlotsIds = 2; + * @return whether the plotsIds field is set + */ + public boolean hasPlotsIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 PlotsIds = 2; + * @return this + */ + public InfinityTowerInfoResp clearPlotsIds() { + bitField0_ &= ~0x00000004; + plotsIds.clear(); + return this; + } + + /** + * repeated uint32 PlotsIds = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePlotsIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getPlotsIds() { + return plotsIds; + } + + /** + * repeated uint32 PlotsIds = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutablePlotsIds() { + bitField0_ |= 0x00000004; + return plotsIds; + } + + /** + * repeated uint32 PlotsIds = 2; + * @param value the plotsIds to add + * @return this + */ + public InfinityTowerInfoResp addPlotsIds(final int value) { + bitField0_ |= 0x00000004; + plotsIds.add(value); + return this; + } + + /** + * repeated uint32 PlotsIds = 2; + * @param values the plotsIds to add + * @return this + */ + public InfinityTowerInfoResp addAllPlotsIds(final int... values) { + bitField0_ |= 0x00000004; + plotsIds.addAll(values); + return this; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 3; + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 3; + * @return this + */ + public InfinityTowerInfoResp clearInfos() { + bitField0_ &= ~0x00000008; + infos.clear(); + return this; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInfos() { + return infos; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInfos() { + bitField0_ |= 0x00000008; + return infos; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 3; + * @param value the infos to add + * @return this + */ + public InfinityTowerInfoResp addInfos(final Public.InfinityTowerLevelInfo value) { + bitField0_ |= 0x00000008; + infos.add(value); + return this; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 3; + * @param values the infos to add + * @return this + */ + public InfinityTowerInfoResp addAllInfos(final Public.InfinityTowerLevelInfo... values) { + bitField0_ |= 0x00000008; + infos.addAll(values); + return this; + } + + @Override + public InfinityTowerInfoResp copyFrom(final InfinityTowerInfoResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + bountyLevel = other.bountyLevel; + nextPackage.copyFrom(other.nextPackage); + plotsIds.copyFrom(other.plotsIds); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public InfinityTowerInfoResp mergeFrom(final InfinityTowerInfoResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBountyLevel()) { + setBountyLevel(other.bountyLevel); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasPlotsIds()) { + getMutablePlotsIds().addAll(other.plotsIds); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public InfinityTowerInfoResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + bountyLevel = 0; + nextPackage.clear(); + plotsIds.clear(); + infos.clear(); + return this; + } + + @Override + public InfinityTowerInfoResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + plotsIds.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InfinityTowerInfoResp)) { + return false; + } + InfinityTowerInfoResp other = (InfinityTowerInfoResp) o; + return bitField0_ == other.bitField0_ + && (!hasBountyLevel() || bountyLevel == other.bountyLevel) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasPlotsIds() || plotsIds.equals(other.plotsIds)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(bountyLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < plotsIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(plotsIds.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bountyLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * plotsIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(plotsIds); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InfinityTowerInfoResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // bountyLevel + bountyLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // plotsIds [packed=true] + input.readPackedUInt32(plotsIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // plotsIds [packed=false] + tag = input.readRepeatedUInt32(plotsIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.bountyLevel, bountyLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.plotsIds, plotsIds); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public InfinityTowerInfoResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2147349127: { + if (input.isAtField(FieldNames.bountyLevel)) { + if (!input.trySkipNullValue()) { + bountyLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1954480698: { + if (input.isAtField(FieldNames.plotsIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(plotsIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InfinityTowerInfoResp clone() { + return new InfinityTowerInfoResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InfinityTowerInfoResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InfinityTowerInfoResp(), data).checkInitialized(); + } + + public static InfinityTowerInfoResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerInfoResp(), input).checkInitialized(); + } + + public static InfinityTowerInfoResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerInfoResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InfinityTowerInfoResp messages + */ + public static MessageFactory getFactory() { + return InfinityTowerInfoRespFactory.INSTANCE; + } + + private enum InfinityTowerInfoRespFactory implements MessageFactory { + INSTANCE; + + @Override + public InfinityTowerInfoResp create() { + return InfinityTowerInfoResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName bountyLevel = FieldName.forField("BountyLevel"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName plotsIds = FieldName.forField("PlotsIds"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/InfinityTowerPlotRewardReceive.java b/src/generated/main/emu/nebula/proto/InfinityTowerPlotRewardReceive.java new file mode 100644 index 0000000..c19233b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/InfinityTowerPlotRewardReceive.java @@ -0,0 +1,523 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class InfinityTowerPlotRewardReceive { + /** + * Protobuf type {@code InfinityTowerPlotRewardReceiveResp} + */ + public static final class InfinityTowerPlotRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Show = 1; + */ + private final RepeatedMessage show = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private InfinityTowerPlotRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code InfinityTowerPlotRewardReceiveResp} + */ + public static InfinityTowerPlotRewardReceiveResp newInstance() { + return new InfinityTowerPlotRewardReceiveResp(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public InfinityTowerPlotRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public InfinityTowerPlotRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public InfinityTowerPlotRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public InfinityTowerPlotRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public InfinityTowerPlotRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public InfinityTowerPlotRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * @return whether the show field is set + */ + public boolean hasShow() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Show = 1; + * @return this + */ + public InfinityTowerPlotRewardReceiveResp clearShow() { + bitField0_ &= ~0x00000004; + show.clear(); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShow()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getShow() { + return show; + } + + /** + * repeated .ItemTpl Show = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableShow() { + bitField0_ |= 0x00000004; + return show; + } + + /** + * repeated .ItemTpl Show = 1; + * @param value the show to add + * @return this + */ + public InfinityTowerPlotRewardReceiveResp addShow(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + show.add(value); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * @param values the show to add + * @return this + */ + public InfinityTowerPlotRewardReceiveResp addAllShow(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + show.addAll(values); + return this; + } + + @Override + public InfinityTowerPlotRewardReceiveResp copyFrom( + final InfinityTowerPlotRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + show.copyFrom(other.show); + } + return this; + } + + @Override + public InfinityTowerPlotRewardReceiveResp mergeFrom( + final InfinityTowerPlotRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShow()) { + getMutableShow().addAll(other.show); + } + return this; + } + + @Override + public InfinityTowerPlotRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + show.clear(); + return this; + } + + @Override + public InfinityTowerPlotRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + show.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InfinityTowerPlotRewardReceiveResp)) { + return false; + } + InfinityTowerPlotRewardReceiveResp other = (InfinityTowerPlotRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShow() || show.equals(other.show)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < show.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(show.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * show.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(show); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InfinityTowerPlotRewardReceiveResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // show + tag = input.readRepeatedMessage(show, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.show, show); + } + output.endObject(); + } + + @Override + public InfinityTowerPlotRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576157: { + if (input.isAtField(FieldNames.show)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(show); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InfinityTowerPlotRewardReceiveResp clone() { + return new InfinityTowerPlotRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InfinityTowerPlotRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InfinityTowerPlotRewardReceiveResp(), data).checkInitialized(); + } + + public static InfinityTowerPlotRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new InfinityTowerPlotRewardReceiveResp(), input).checkInitialized(); + } + + public static InfinityTowerPlotRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new InfinityTowerPlotRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InfinityTowerPlotRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return InfinityTowerPlotRewardReceiveRespFactory.INSTANCE; + } + + private enum InfinityTowerPlotRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public InfinityTowerPlotRewardReceiveResp create() { + return InfinityTowerPlotRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName show = FieldName.forField("Show"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/InfinityTowerSettle.java b/src/generated/main/emu/nebula/proto/InfinityTowerSettle.java new file mode 100644 index 0000000..16724ce --- /dev/null +++ b/src/generated/main/emu/nebula/proto/InfinityTowerSettle.java @@ -0,0 +1,1426 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoEnum; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class InfinityTowerSettle { + /** + * Protobuf type {@code InfinityTowerSettleReq} + */ + public static final class InfinityTowerSettleReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Value = 1; + */ + private int value_; + + /** + * optional .Events Events = 8; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InfinityTowerSettleReq() { + } + + /** + * @return a new empty instance of {@code InfinityTowerSettleReq} + */ + public static InfinityTowerSettleReq newInstance() { + return new InfinityTowerSettleReq(); + } + + /** + * optional uint32 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Value = 1; + * @return this + */ + public InfinityTowerSettleReq clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0; + return this; + } + + /** + * optional uint32 Value = 1; + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * optional uint32 Value = 1; + * @param value the value_ to set + * @return this + */ + public InfinityTowerSettleReq setValue(final int value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional .Events Events = 8; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .Events Events = 8; + * @return this + */ + public InfinityTowerSettleReq clearEvents() { + bitField0_ &= ~0x00000002; + events.clear(); + return this; + } + + /** + * optional .Events Events = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000002; + return events; + } + + /** + * optional .Events Events = 8; + * @param value the events to set + * @return this + */ + public InfinityTowerSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000002; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public InfinityTowerSettleReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public InfinityTowerSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public InfinityTowerSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public InfinityTowerSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InfinityTowerSettleReq copyFrom(final InfinityTowerSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InfinityTowerSettleReq mergeFrom(final InfinityTowerSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InfinityTowerSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public InfinityTowerSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InfinityTowerSettleReq)) { + return false; + } + InfinityTowerSettleReq other = (InfinityTowerSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InfinityTowerSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // events + input.readMessage(events); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InfinityTowerSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InfinityTowerSettleReq clone() { + return new InfinityTowerSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InfinityTowerSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InfinityTowerSettleReq(), data).checkInitialized(); + } + + public static InfinityTowerSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerSettleReq(), input).checkInitialized(); + } + + public static InfinityTowerSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating InfinityTowerSettleReq messages + */ + public static MessageFactory getFactory() { + return InfinityTowerSettleReqFactory.INSTANCE; + } + + private enum InfinityTowerSettleReqFactory implements MessageFactory { + INSTANCE; + + @Override + public InfinityTowerSettleReq create() { + return InfinityTowerSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InfinityTowerSettleResp} + */ + public static final class InfinityTowerSettleResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 NextLevelId = 1; + */ + private int nextLevelId; + + /** + * optional uint32 BountyLevel = 6; + */ + private int bountyLevel; + + /** + * optional .InfinityTowerSettleResp.Reason Value = 7; + */ + private int value_; + + /** + * optional .ChangeInfo Change = 3; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Show = 2; + */ + private final RepeatedMessage show = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private InfinityTowerSettleResp() { + } + + /** + * @return a new empty instance of {@code InfinityTowerSettleResp} + */ + public static InfinityTowerSettleResp newInstance() { + return new InfinityTowerSettleResp(); + } + + /** + * optional uint32 NextLevelId = 1; + * @return whether the nextLevelId field is set + */ + public boolean hasNextLevelId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 NextLevelId = 1; + * @return this + */ + public InfinityTowerSettleResp clearNextLevelId() { + bitField0_ &= ~0x00000001; + nextLevelId = 0; + return this; + } + + /** + * optional uint32 NextLevelId = 1; + * @return the nextLevelId + */ + public int getNextLevelId() { + return nextLevelId; + } + + /** + * optional uint32 NextLevelId = 1; + * @param value the nextLevelId to set + * @return this + */ + public InfinityTowerSettleResp setNextLevelId(final int value) { + bitField0_ |= 0x00000001; + nextLevelId = value; + return this; + } + + /** + * optional uint32 BountyLevel = 6; + * @return whether the bountyLevel field is set + */ + public boolean hasBountyLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 BountyLevel = 6; + * @return this + */ + public InfinityTowerSettleResp clearBountyLevel() { + bitField0_ &= ~0x00000002; + bountyLevel = 0; + return this; + } + + /** + * optional uint32 BountyLevel = 6; + * @return the bountyLevel + */ + public int getBountyLevel() { + return bountyLevel; + } + + /** + * optional uint32 BountyLevel = 6; + * @param value the bountyLevel to set + * @return this + */ + public InfinityTowerSettleResp setBountyLevel(final int value) { + bitField0_ |= 0x00000002; + bountyLevel = value; + return this; + } + + /** + * optional .InfinityTowerSettleResp.Reason Value = 7; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .InfinityTowerSettleResp.Reason Value = 7; + * @return this + */ + public InfinityTowerSettleResp clearValue() { + bitField0_ &= ~0x00000004; + value_ = 0; + return this; + } + + /** + * optional .InfinityTowerSettleResp.Reason Value = 7; + * @return the value_ + */ + public Reason getValue() { + return Reason.forNumber(value_); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link InfinityTowerSettleResp#getValue()}.getNumber(). + * + * @return numeric wire representation + */ + public int getValueValue() { + return value_; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link Reason}. Setting an invalid value + * can cause {@link InfinityTowerSettleResp#getValue()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public InfinityTowerSettleResp setValueValue(final int value) { + bitField0_ |= 0x00000004; + value_ = value; + return this; + } + + /** + * optional .InfinityTowerSettleResp.Reason Value = 7; + * @param value the value_ to set + * @return this + */ + public InfinityTowerSettleResp setValue(final Reason value) { + bitField0_ |= 0x00000004; + value_ = value.getNumber(); + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .ChangeInfo Change = 3; + * @return this + */ + public InfinityTowerSettleResp clearChange() { + bitField0_ &= ~0x00000008; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000008; + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * @param value the change to set + * @return this + */ + public InfinityTowerSettleResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000008; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public InfinityTowerSettleResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public InfinityTowerSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public InfinityTowerSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public InfinityTowerSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Show = 2; + * @return whether the show field is set + */ + public boolean hasShow() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * repeated .ItemTpl Show = 2; + * @return this + */ + public InfinityTowerSettleResp clearShow() { + bitField0_ &= ~0x00000020; + show.clear(); + return this; + } + + /** + * repeated .ItemTpl Show = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShow()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getShow() { + return show; + } + + /** + * repeated .ItemTpl Show = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableShow() { + bitField0_ |= 0x00000020; + return show; + } + + /** + * repeated .ItemTpl Show = 2; + * @param value the show to add + * @return this + */ + public InfinityTowerSettleResp addShow(final Public.ItemTpl value) { + bitField0_ |= 0x00000020; + show.add(value); + return this; + } + + /** + * repeated .ItemTpl Show = 2; + * @param values the show to add + * @return this + */ + public InfinityTowerSettleResp addAllShow(final Public.ItemTpl... values) { + bitField0_ |= 0x00000020; + show.addAll(values); + return this; + } + + @Override + public InfinityTowerSettleResp copyFrom(final InfinityTowerSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextLevelId = other.nextLevelId; + bountyLevel = other.bountyLevel; + value_ = other.value_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + show.copyFrom(other.show); + } + return this; + } + + @Override + public InfinityTowerSettleResp mergeFrom(final InfinityTowerSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextLevelId()) { + setNextLevelId(other.nextLevelId); + } + if (other.hasBountyLevel()) { + setBountyLevel(other.bountyLevel); + } + if (other.hasValue()) { + setValueValue(other.value_); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShow()) { + getMutableShow().addAll(other.show); + } + return this; + } + + @Override + public InfinityTowerSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextLevelId = 0; + bountyLevel = 0; + value_ = 0; + change.clear(); + nextPackage.clear(); + show.clear(); + return this; + } + + @Override + public InfinityTowerSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + show.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InfinityTowerSettleResp)) { + return false; + } + InfinityTowerSettleResp other = (InfinityTowerSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextLevelId() || nextLevelId == other.nextLevelId) + && (!hasBountyLevel() || bountyLevel == other.bountyLevel) + && (!hasValue() || value_ == other.value_) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShow() || show.equals(other.show)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(nextLevelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(bountyLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 56); + output.writeEnumNoTag(value_); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < show.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(show.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(nextLevelId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bountyLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(value_); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * show.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(show); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InfinityTowerSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // nextLevelId + nextLevelId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // bountyLevel + bountyLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // value_ + final int value = input.readInt32(); + if (Reason.forNumber(value) != null) { + value_ = value; + bitField0_ |= 0x00000004; + } + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // show + tag = input.readRepeatedMessage(show, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.nextLevelId, nextLevelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.bountyLevel, bountyLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeEnum(FieldNames.value_, value_, Reason.converter()); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.show, show); + } + output.endObject(); + } + + @Override + public InfinityTowerSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1205477076: { + if (input.isAtField(FieldNames.nextLevelId)) { + if (!input.trySkipNullValue()) { + nextLevelId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2147349127: { + if (input.isAtField(FieldNames.bountyLevel)) { + if (!input.trySkipNullValue()) { + bountyLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + final Reason value = input.readEnum(Reason.converter()); + if (value != null) { + value_ = value.getNumber(); + bitField0_ |= 0x00000004; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576157: { + if (input.isAtField(FieldNames.show)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(show); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InfinityTowerSettleResp clone() { + return new InfinityTowerSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InfinityTowerSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InfinityTowerSettleResp(), data).checkInitialized(); + } + + public static InfinityTowerSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerSettleResp(), input).checkInitialized(); + } + + public static InfinityTowerSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InfinityTowerSettleResp messages + */ + public static MessageFactory getFactory() { + return InfinityTowerSettleRespFactory.INSTANCE; + } + + /** + * Protobuf enum {@code Reason} + */ + public enum Reason implements ProtoEnum { + /** + * Nil = 0; + */ + Nil("Nil", 0), + + /** + * PreLevel = 1; + */ + PreLevel("PreLevel", 1), + + /** + * WorldClass = 2; + */ + WorldClass("WorldClass", 2), + + /** + * Build = 3; + */ + Build("Build", 3), + + /** + * NoOpen = 4; + */ + NoOpen("NoOpen", 4); + + /** + * Nil = 0; + */ + public static final int Nil_VALUE = 0; + + /** + * PreLevel = 1; + */ + public static final int PreLevel_VALUE = 1; + + /** + * WorldClass = 2; + */ + public static final int WorldClass_VALUE = 2; + + /** + * Build = 3; + */ + public static final int Build_VALUE = 3; + + /** + * NoOpen = 4; + */ + public static final int NoOpen_VALUE = 4; + + private final String name; + + private final int number; + + private Reason(String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter converter() { + return ReasonConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static Reason forNumber(int value) { + return ReasonConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static Reason forNumberOr(int number, Reason other) { + Reason value = forNumber(number); + return value == null ? other : value; + } + + enum ReasonConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final Reason[] lookup = new Reason[5]; + + static { + lookup[0] = Nil; + lookup[1] = PreLevel; + lookup[2] = WorldClass; + lookup[3] = Build; + lookup[4] = NoOpen; + } + + @Override + public final Reason forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final Reason forName(final CharSequence value) { + switch (value.length()) { + case 3: { + if (ProtoUtil.isEqual("Nil", value)) { + return Nil; + } + break; + } + case 5: { + if (ProtoUtil.isEqual("Build", value)) { + return Build; + } + break; + } + case 6: { + if (ProtoUtil.isEqual("NoOpen", value)) { + return NoOpen; + } + break; + } + case 8: { + if (ProtoUtil.isEqual("PreLevel", value)) { + return PreLevel; + } + break; + } + case 10: { + if (ProtoUtil.isEqual("WorldClass", value)) { + return WorldClass; + } + break; + } + } + return null; + } + } + } + + private enum InfinityTowerSettleRespFactory implements MessageFactory { + INSTANCE; + + @Override + public InfinityTowerSettleResp create() { + return InfinityTowerSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextLevelId = FieldName.forField("NextLevelId"); + + static final FieldName bountyLevel = FieldName.forField("BountyLevel"); + + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName show = FieldName.forField("Show"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ItemProduct.java b/src/generated/main/emu/nebula/proto/ItemProduct.java new file mode 100644 index 0000000..75d35bd --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ItemProduct.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ItemProduct { + /** + * Protobuf type {@code ItemProductReq} + */ + public static final class ItemProductReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Num = 2; + */ + private int num; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ItemProductReq() { + } + + /** + * @return a new empty instance of {@code ItemProductReq} + */ + public static ItemProductReq newInstance() { + return new ItemProductReq(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public ItemProductReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public ItemProductReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Num = 2; + * @return whether the num field is set + */ + public boolean hasNum() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Num = 2; + * @return this + */ + public ItemProductReq clearNum() { + bitField0_ &= ~0x00000002; + num = 0; + return this; + } + + /** + * optional uint32 Num = 2; + * @return the num + */ + public int getNum() { + return num; + } + + /** + * optional uint32 Num = 2; + * @param value the num to set + * @return this + */ + public ItemProductReq setNum(final int value) { + bitField0_ |= 0x00000002; + num = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ItemProductReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ItemProductReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ItemProductReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ItemProductReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ItemProductReq copyFrom(final ItemProductReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + num = other.num; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemProductReq mergeFrom(final ItemProductReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNum()) { + setNum(other.num); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemProductReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + num = 0; + nextPackage.clear(); + return this; + } + + @Override + public ItemProductReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ItemProductReq)) { + return false; + } + ItemProductReq other = (ItemProductReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNum() || num == other.num) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(num); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(num); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ItemProductReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // num + num = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.num, num); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ItemProductReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 78694: { + if (input.isAtField(FieldNames.num)) { + if (!input.trySkipNullValue()) { + num = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ItemProductReq clone() { + return new ItemProductReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ItemProductReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ItemProductReq(), data).checkInitialized(); + } + + public static ItemProductReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemProductReq(), input).checkInitialized(); + } + + public static ItemProductReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemProductReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ItemProductReq messages + */ + public static MessageFactory getFactory() { + return ItemProductReqFactory.INSTANCE; + } + + private enum ItemProductReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ItemProductReq create() { + return ItemProductReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName num = FieldName.forField("Num"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ItemQuickGrowth.java b/src/generated/main/emu/nebula/proto/ItemQuickGrowth.java new file mode 100644 index 0000000..4ee58a2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ItemQuickGrowth.java @@ -0,0 +1,1305 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ItemQuickGrowth { + /** + * Protobuf type {@code PickItemReq} + */ + public static final class PickItemReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .PickItem List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(ItemUse.PickItem.getFactory()); + + private PickItemReq() { + } + + /** + * @return a new empty instance of {@code PickItemReq} + */ + public static PickItemReq newInstance() { + return new PickItemReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PickItemReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PickItemReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PickItemReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PickItemReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .PickItem List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .PickItem List = 1; + * @return this + */ + public PickItemReq clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .PickItem List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .PickItem List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .PickItem List = 1; + * @param value the list to add + * @return this + */ + public PickItemReq addList(final ItemUse.PickItem value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .PickItem List = 1; + * @param values the list to add + * @return this + */ + public PickItemReq addAllList(final ItemUse.PickItem... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public PickItemReq copyFrom(final PickItemReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public PickItemReq mergeFrom(final PickItemReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public PickItemReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public PickItemReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PickItemReq)) { + return false; + } + PickItemReq other = (PickItemReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PickItemReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public PickItemReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PickItemReq clone() { + return new PickItemReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PickItemReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PickItemReq(), data).checkInitialized(); + } + + public static PickItemReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PickItemReq(), input).checkInitialized(); + } + + public static PickItemReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PickItemReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PickItemReq messages + */ + public static MessageFactory getFactory() { + return PickItemReqFactory.INSTANCE; + } + + private enum PickItemReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PickItemReq create() { + return PickItemReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code GrowthStep} + */ + public static final class GrowthStep extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ItemProductReq Product = 1; + */ + private final ItemProduct.ItemProductReq product = ItemProduct.ItemProductReq.newInstance(); + + /** + * optional .PickItemReq Pick = 2; + */ + private final PickItemReq pick = PickItemReq.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private GrowthStep() { + } + + /** + * @return a new empty instance of {@code GrowthStep} + */ + public static GrowthStep newInstance() { + return new GrowthStep(); + } + + /** + * optional .ItemProductReq Product = 1; + * @return whether the product field is set + */ + public boolean hasProduct() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ItemProductReq Product = 1; + * @return this + */ + public GrowthStep clearProduct() { + bitField0_ &= ~0x00000001; + product.clear(); + return this; + } + + /** + * optional .ItemProductReq Product = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableProduct()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ItemProduct.ItemProductReq getProduct() { + return product; + } + + /** + * optional .ItemProductReq Product = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ItemProduct.ItemProductReq getMutableProduct() { + bitField0_ |= 0x00000001; + return product; + } + + /** + * optional .ItemProductReq Product = 1; + * @param value the product to set + * @return this + */ + public GrowthStep setProduct(final ItemProduct.ItemProductReq value) { + bitField0_ |= 0x00000001; + product.copyFrom(value); + return this; + } + + /** + * optional .PickItemReq Pick = 2; + * @return whether the pick field is set + */ + public boolean hasPick() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .PickItemReq Pick = 2; + * @return this + */ + public GrowthStep clearPick() { + bitField0_ &= ~0x00000002; + pick.clear(); + return this; + } + + /** + * optional .PickItemReq Pick = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePick()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PickItemReq getPick() { + return pick; + } + + /** + * optional .PickItemReq Pick = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PickItemReq getMutablePick() { + bitField0_ |= 0x00000002; + return pick; + } + + /** + * optional .PickItemReq Pick = 2; + * @param value the pick to set + * @return this + */ + public GrowthStep setPick(final PickItemReq value) { + bitField0_ |= 0x00000002; + pick.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GrowthStep clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GrowthStep addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GrowthStep addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GrowthStep setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public GrowthStep copyFrom(final GrowthStep other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + product.copyFrom(other.product); + pick.copyFrom(other.pick); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GrowthStep mergeFrom(final GrowthStep other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasProduct()) { + getMutableProduct().mergeFrom(other.product); + } + if (other.hasPick()) { + getMutablePick().mergeFrom(other.pick); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GrowthStep clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + product.clear(); + pick.clear(); + nextPackage.clear(); + return this; + } + + @Override + public GrowthStep clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + product.clearQuick(); + pick.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GrowthStep)) { + return false; + } + GrowthStep other = (GrowthStep) o; + return bitField0_ == other.bitField0_ + && (!hasProduct() || product.equals(other.product)) + && (!hasPick() || pick.equals(other.pick)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(product); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(pick); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(product); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(pick); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GrowthStep mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // product + input.readMessage(product); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // pick + input.readMessage(pick); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.product, product); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.pick, pick); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public GrowthStep mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1355179215: { + if (input.isAtField(FieldNames.product)) { + if (!input.trySkipNullValue()) { + input.readMessage(product); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2487361: { + if (input.isAtField(FieldNames.pick)) { + if (!input.trySkipNullValue()) { + input.readMessage(pick); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GrowthStep clone() { + return new GrowthStep().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GrowthStep parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GrowthStep(), data).checkInitialized(); + } + + public static GrowthStep parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GrowthStep(), input).checkInitialized(); + } + + public static GrowthStep parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GrowthStep(), input).checkInitialized(); + } + + /** + * @return factory for creating GrowthStep messages + */ + public static MessageFactory getFactory() { + return GrowthStepFactory.INSTANCE; + } + + private enum GrowthStepFactory implements MessageFactory { + INSTANCE; + + @Override + public GrowthStep create() { + return GrowthStep.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName product = FieldName.forField("Product"); + + static final FieldName pick = FieldName.forField("Pick"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ItemGrowthReq} + */ + public static final class ItemGrowthReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .GrowthStep List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(GrowthStep.getFactory()); + + private ItemGrowthReq() { + } + + /** + * @return a new empty instance of {@code ItemGrowthReq} + */ + public static ItemGrowthReq newInstance() { + return new ItemGrowthReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ItemGrowthReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ItemGrowthReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ItemGrowthReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ItemGrowthReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .GrowthStep List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .GrowthStep List = 1; + * @return this + */ + public ItemGrowthReq clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .GrowthStep List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .GrowthStep List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .GrowthStep List = 1; + * @param value the list to add + * @return this + */ + public ItemGrowthReq addList(final GrowthStep value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .GrowthStep List = 1; + * @param values the list to add + * @return this + */ + public ItemGrowthReq addAllList(final GrowthStep... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public ItemGrowthReq copyFrom(final ItemGrowthReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public ItemGrowthReq mergeFrom(final ItemGrowthReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public ItemGrowthReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public ItemGrowthReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ItemGrowthReq)) { + return false; + } + ItemGrowthReq other = (ItemGrowthReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ItemGrowthReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public ItemGrowthReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ItemGrowthReq clone() { + return new ItemGrowthReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ItemGrowthReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ItemGrowthReq(), data).checkInitialized(); + } + + public static ItemGrowthReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemGrowthReq(), input).checkInitialized(); + } + + public static ItemGrowthReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemGrowthReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ItemGrowthReq messages + */ + public static MessageFactory getFactory() { + return ItemGrowthReqFactory.INSTANCE; + } + + private enum ItemGrowthReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ItemGrowthReq create() { + return ItemGrowthReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ItemUse.java b/src/generated/main/emu/nebula/proto/ItemUse.java new file mode 100644 index 0000000..e28a85d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ItemUse.java @@ -0,0 +1,1912 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ItemUse { + /** + * Protobuf type {@code PickItem} + */ + public static final class PickItem extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Id = 1; + */ + private long id; + + /** + * optional uint32 Tid = 2; + */ + private int tid; + + /** + * optional uint32 SelectTid = 3; + */ + private int selectTid; + + /** + * optional uint32 Qty = 4; + */ + private int qty; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PickItem() { + } + + /** + * @return a new empty instance of {@code PickItem} + */ + public static PickItem newInstance() { + return new PickItem(); + } + + /** + * optional uint64 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Id = 1; + * @return this + */ + public PickItem clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * optional uint64 Id = 1; + * @return the id + */ + public long getId() { + return id; + } + + /** + * optional uint64 Id = 1; + * @param value the id to set + * @return this + */ + public PickItem setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Tid = 2; + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Tid = 2; + * @return this + */ + public PickItem clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * optional uint32 Tid = 2; + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * optional uint32 Tid = 2; + * @param value the tid to set + * @return this + */ + public PickItem setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * optional uint32 SelectTid = 3; + * @return whether the selectTid field is set + */ + public boolean hasSelectTid() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 SelectTid = 3; + * @return this + */ + public PickItem clearSelectTid() { + bitField0_ &= ~0x00000004; + selectTid = 0; + return this; + } + + /** + * optional uint32 SelectTid = 3; + * @return the selectTid + */ + public int getSelectTid() { + return selectTid; + } + + /** + * optional uint32 SelectTid = 3; + * @param value the selectTid to set + * @return this + */ + public PickItem setSelectTid(final int value) { + bitField0_ |= 0x00000004; + selectTid = value; + return this; + } + + /** + * optional uint32 Qty = 4; + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 Qty = 4; + * @return this + */ + public PickItem clearQty() { + bitField0_ &= ~0x00000008; + qty = 0; + return this; + } + + /** + * optional uint32 Qty = 4; + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * optional uint32 Qty = 4; + * @param value the qty to set + * @return this + */ + public PickItem setQty(final int value) { + bitField0_ |= 0x00000008; + qty = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PickItem clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PickItem addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PickItem addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PickItem setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PickItem copyFrom(final PickItem other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + tid = other.tid; + selectTid = other.selectTid; + qty = other.qty; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PickItem mergeFrom(final PickItem other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasSelectTid()) { + setSelectTid(other.selectTid); + } + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PickItem clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + tid = 0; + selectTid = 0; + qty = 0; + nextPackage.clear(); + return this; + } + + @Override + public PickItem clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PickItem)) { + return false; + } + PickItem other = (PickItem) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTid() || tid == other.tid) + && (!hasSelectTid() || selectTid == other.selectTid) + && (!hasQty() || qty == other.qty) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(selectTid); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(qty); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(selectTid); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PickItem mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // selectTid + selectTid = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // qty + qty = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.selectTid, selectTid); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PickItem mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 287982035: { + if (input.isAtField(FieldNames.selectTid)) { + if (!input.trySkipNullValue()) { + selectTid = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PickItem clone() { + return new PickItem().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PickItem parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PickItem(), data).checkInitialized(); + } + + public static PickItem parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PickItem(), input).checkInitialized(); + } + + public static PickItem parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PickItem(), input).checkInitialized(); + } + + /** + * @return factory for creating PickItem messages + */ + public static MessageFactory getFactory() { + return PickItemFactory.INSTANCE; + } + + private enum PickItemFactory implements MessageFactory { + INSTANCE; + + @Override + public PickItem create() { + return PickItem.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName selectTid = FieldName.forField("SelectTid"); + + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code PickItems} + */ + public static final class PickItems extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .PickItem List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(PickItem.getFactory()); + + private PickItems() { + } + + /** + * @return a new empty instance of {@code PickItems} + */ + public static PickItems newInstance() { + return new PickItems(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PickItems clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PickItems addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PickItems addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PickItems setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .PickItem List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .PickItem List = 1; + * @return this + */ + public PickItems clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .PickItem List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .PickItem List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .PickItem List = 1; + * @param value the list to add + * @return this + */ + public PickItems addList(final PickItem value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .PickItem List = 1; + * @param values the list to add + * @return this + */ + public PickItems addAllList(final PickItem... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public PickItems copyFrom(final PickItems other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public PickItems mergeFrom(final PickItems other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public PickItems clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public PickItems clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PickItems)) { + return false; + } + PickItems other = (PickItems) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PickItems mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public PickItems mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PickItems clone() { + return new PickItems().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PickItems parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PickItems(), data).checkInitialized(); + } + + public static PickItems parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PickItems(), input).checkInitialized(); + } + + public static PickItems parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PickItems(), input).checkInitialized(); + } + + /** + * @return factory for creating PickItems messages + */ + public static MessageFactory getFactory() { + return PickItemsFactory.INSTANCE; + } + + private enum PickItemsFactory implements MessageFactory { + INSTANCE; + + @Override + public PickItems create() { + return PickItems.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code UseItem} + */ + public static final class UseItem extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemInfo List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Public.ItemInfo.getFactory()); + + private UseItem() { + } + + /** + * @return a new empty instance of {@code UseItem} + */ + public static UseItem newInstance() { + return new UseItem(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public UseItem clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public UseItem addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public UseItem addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public UseItem setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemInfo List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .ItemInfo List = 1; + * @return this + */ + public UseItem clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .ItemInfo List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .ItemInfo List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .ItemInfo List = 1; + * @param value the list to add + * @return this + */ + public UseItem addList(final Public.ItemInfo value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .ItemInfo List = 1; + * @param values the list to add + * @return this + */ + public UseItem addAllList(final Public.ItemInfo... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public UseItem copyFrom(final UseItem other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public UseItem mergeFrom(final UseItem other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public UseItem clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public UseItem clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UseItem)) { + return false; + } + UseItem other = (UseItem) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public UseItem mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public UseItem mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public UseItem clone() { + return new UseItem().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static UseItem parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new UseItem(), data).checkInitialized(); + } + + public static UseItem parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new UseItem(), input).checkInitialized(); + } + + public static UseItem parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new UseItem(), input).checkInitialized(); + } + + /** + * @return factory for creating UseItem messages + */ + public static MessageFactory getFactory() { + return UseItemFactory.INSTANCE; + } + + private enum UseItemFactory implements MessageFactory { + INSTANCE; + + @Override + public UseItem create() { + return UseItem.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code ItemUseReq} + */ + public static final class ItemUseReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .PickItems Pick = 1; + */ + private final PickItems pick = PickItems.newInstance(); + + /** + * optional .UseItem Use = 2; + */ + private final UseItem use = UseItem.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ItemUseReq() { + } + + /** + * @return a new empty instance of {@code ItemUseReq} + */ + public static ItemUseReq newInstance() { + return new ItemUseReq(); + } + + /** + * optional .PickItems Pick = 1; + * @return whether the pick field is set + */ + public boolean hasPick() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .PickItems Pick = 1; + * @return this + */ + public ItemUseReq clearPick() { + bitField0_ &= ~0x00000001; + pick.clear(); + return this; + } + + /** + * optional .PickItems Pick = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePick()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PickItems getPick() { + return pick; + } + + /** + * optional .PickItems Pick = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PickItems getMutablePick() { + bitField0_ |= 0x00000001; + return pick; + } + + /** + * optional .PickItems Pick = 1; + * @param value the pick to set + * @return this + */ + public ItemUseReq setPick(final PickItems value) { + bitField0_ |= 0x00000001; + pick.copyFrom(value); + return this; + } + + /** + * optional .UseItem Use = 2; + * @return whether the use field is set + */ + public boolean hasUse() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .UseItem Use = 2; + * @return this + */ + public ItemUseReq clearUse() { + bitField0_ &= ~0x00000002; + use.clear(); + return this; + } + + /** + * optional .UseItem Use = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableUse()} if you want to modify it. + * + * @return internal storage object for reading + */ + public UseItem getUse() { + return use; + } + + /** + * optional .UseItem Use = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public UseItem getMutableUse() { + bitField0_ |= 0x00000002; + return use; + } + + /** + * optional .UseItem Use = 2; + * @param value the use to set + * @return this + */ + public ItemUseReq setUse(final UseItem value) { + bitField0_ |= 0x00000002; + use.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ItemUseReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ItemUseReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ItemUseReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ItemUseReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ItemUseReq copyFrom(final ItemUseReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + pick.copyFrom(other.pick); + use.copyFrom(other.use); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemUseReq mergeFrom(final ItemUseReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPick()) { + getMutablePick().mergeFrom(other.pick); + } + if (other.hasUse()) { + getMutableUse().mergeFrom(other.use); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemUseReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + pick.clear(); + use.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ItemUseReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + pick.clearQuick(); + use.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ItemUseReq)) { + return false; + } + ItemUseReq other = (ItemUseReq) o; + return bitField0_ == other.bitField0_ + && (!hasPick() || pick.equals(other.pick)) + && (!hasUse() || use.equals(other.use)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(pick); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(use); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(pick); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(use); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ItemUseReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // pick + input.readMessage(pick); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // use + input.readMessage(use); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.pick, pick); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.use, use); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ItemUseReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2487361: { + if (input.isAtField(FieldNames.pick)) { + if (!input.trySkipNullValue()) { + input.readMessage(pick); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 85351: { + if (input.isAtField(FieldNames.use)) { + if (!input.trySkipNullValue()) { + input.readMessage(use); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ItemUseReq clone() { + return new ItemUseReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ItemUseReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ItemUseReq(), data).checkInitialized(); + } + + public static ItemUseReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemUseReq(), input).checkInitialized(); + } + + public static ItemUseReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemUseReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ItemUseReq messages + */ + public static MessageFactory getFactory() { + return ItemUseReqFactory.INSTANCE; + } + + private enum ItemUseReqFactory implements MessageFactory { + INSTANCE; + + @Override + public ItemUseReq create() { + return ItemUseReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName pick = FieldName.forField("Pick"); + + static final FieldName use = FieldName.forField("Use"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillApply.java b/src/generated/main/emu/nebula/proto/JointDrillApply.java new file mode 100644 index 0000000..9af6129 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillApply.java @@ -0,0 +1,1172 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class JointDrillApply { + /** + * Protobuf type {@code JointDrillApplyReq} + */ + public static final class JointDrillApplyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 2; + */ + private long buildId; + + /** + * optional uint32 LevelId = 1; + */ + private int levelId; + + /** + * optional uint32 BossHp = 3; + */ + private int bossHp; + + /** + * optional uint32 BossHpMax = 4; + */ + private int bossHpMax; + + /** + * optional bool Simulate = 5; + */ + private boolean simulate; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillApplyReq() { + } + + /** + * @return a new empty instance of {@code JointDrillApplyReq} + */ + public static JointDrillApplyReq newInstance() { + return new JointDrillApplyReq(); + } + + /** + * optional uint64 BuildId = 2; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 2; + * @return this + */ + public JointDrillApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 2; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 2; + * @param value the buildId to set + * @return this + */ + public JointDrillApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional uint32 LevelId = 1; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 LevelId = 1; + * @return this + */ + public JointDrillApplyReq clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 1; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 1; + * @param value the levelId to set + * @return this + */ + public JointDrillApplyReq setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * optional uint32 BossHp = 3; + * @return whether the bossHp field is set + */ + public boolean hasBossHp() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 BossHp = 3; + * @return this + */ + public JointDrillApplyReq clearBossHp() { + bitField0_ &= ~0x00000004; + bossHp = 0; + return this; + } + + /** + * optional uint32 BossHp = 3; + * @return the bossHp + */ + public int getBossHp() { + return bossHp; + } + + /** + * optional uint32 BossHp = 3; + * @param value the bossHp to set + * @return this + */ + public JointDrillApplyReq setBossHp(final int value) { + bitField0_ |= 0x00000004; + bossHp = value; + return this; + } + + /** + * optional uint32 BossHpMax = 4; + * @return whether the bossHpMax field is set + */ + public boolean hasBossHpMax() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 BossHpMax = 4; + * @return this + */ + public JointDrillApplyReq clearBossHpMax() { + bitField0_ &= ~0x00000008; + bossHpMax = 0; + return this; + } + + /** + * optional uint32 BossHpMax = 4; + * @return the bossHpMax + */ + public int getBossHpMax() { + return bossHpMax; + } + + /** + * optional uint32 BossHpMax = 4; + * @param value the bossHpMax to set + * @return this + */ + public JointDrillApplyReq setBossHpMax(final int value) { + bitField0_ |= 0x00000008; + bossHpMax = value; + return this; + } + + /** + * optional bool Simulate = 5; + * @return whether the simulate field is set + */ + public boolean hasSimulate() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bool Simulate = 5; + * @return this + */ + public JointDrillApplyReq clearSimulate() { + bitField0_ &= ~0x00000010; + simulate = false; + return this; + } + + /** + * optional bool Simulate = 5; + * @return the simulate + */ + public boolean getSimulate() { + return simulate; + } + + /** + * optional bool Simulate = 5; + * @param value the simulate to set + * @return this + */ + public JointDrillApplyReq setSimulate(final boolean value) { + bitField0_ |= 0x00000010; + simulate = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillApplyReq clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillApplyReq copyFrom(final JointDrillApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + levelId = other.levelId; + bossHp = other.bossHp; + bossHpMax = other.bossHpMax; + simulate = other.simulate; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillApplyReq mergeFrom(final JointDrillApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasBossHp()) { + setBossHp(other.bossHp); + } + if (other.hasBossHpMax()) { + setBossHpMax(other.bossHpMax); + } + if (other.hasSimulate()) { + setSimulate(other.simulate); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + levelId = 0; + bossHp = 0; + bossHpMax = 0; + simulate = false; + nextPackage.clear(); + return this; + } + + @Override + public JointDrillApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillApplyReq)) { + return false; + } + JointDrillApplyReq other = (JointDrillApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasBossHp() || bossHp == other.bossHp) + && (!hasBossHpMax() || bossHpMax == other.bossHpMax) + && (!hasSimulate() || simulate == other.simulate) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(bossHp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(bossHpMax); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeBoolNoTag(simulate); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHp); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHpMax); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // bossHp + bossHp = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // bossHpMax + bossHpMax = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // simulate + simulate = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.bossHp, bossHp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.bossHpMax, bossHpMax); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.simulate, simulate); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1995573621: { + if (input.isAtField(FieldNames.bossHp)) { + if (!input.trySkipNullValue()) { + bossHp = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -803490897: { + if (input.isAtField(FieldNames.bossHpMax)) { + if (!input.trySkipNullValue()) { + bossHpMax = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 554919492: { + if (input.isAtField(FieldNames.simulate)) { + if (!input.trySkipNullValue()) { + simulate = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillApplyReq clone() { + return new JointDrillApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillApplyReq(), data).checkInitialized(); + } + + public static JointDrillApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillApplyReq(), input).checkInitialized(); + } + + public static JointDrillApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillApplyReq messages + */ + public static MessageFactory getFactory() { + return JointDrillApplyReqFactory.INSTANCE; + } + + private enum JointDrillApplyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillApplyReq create() { + return JointDrillApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName bossHp = FieldName.forField("BossHp"); + + static final FieldName bossHpMax = FieldName.forField("BossHpMax"); + + static final FieldName simulate = FieldName.forField("Simulate"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code JointDrillApplyResp} + */ + public static final class JointDrillApplyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 StarTime = 2; + */ + private long starTime; + + /** + * optional .ChangeInfo Change = 1; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillApplyResp() { + } + + /** + * @return a new empty instance of {@code JointDrillApplyResp} + */ + public static JointDrillApplyResp newInstance() { + return new JointDrillApplyResp(); + } + + /** + * optional int64 StarTime = 2; + * @return whether the starTime field is set + */ + public boolean hasStarTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 StarTime = 2; + * @return this + */ + public JointDrillApplyResp clearStarTime() { + bitField0_ &= ~0x00000001; + starTime = 0L; + return this; + } + + /** + * optional int64 StarTime = 2; + * @return the starTime + */ + public long getStarTime() { + return starTime; + } + + /** + * optional int64 StarTime = 2; + * @param value the starTime to set + * @return this + */ + public JointDrillApplyResp setStarTime(final long value) { + bitField0_ |= 0x00000001; + starTime = value; + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 1; + * @return this + */ + public JointDrillApplyResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * @param value the change to set + * @return this + */ + public JointDrillApplyResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillApplyResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillApplyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillApplyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillApplyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillApplyResp copyFrom(final JointDrillApplyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + starTime = other.starTime; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillApplyResp mergeFrom(final JointDrillApplyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStarTime()) { + setStarTime(other.starTime); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillApplyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + starTime = 0L; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public JointDrillApplyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillApplyResp)) { + return false; + } + JointDrillApplyResp other = (JointDrillApplyResp) o; + return bitField0_ == other.bitField0_ + && (!hasStarTime() || starTime == other.starTime) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(starTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(starTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillApplyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // starTime + starTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.starTime, starTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillApplyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1380497503: { + if (input.isAtField(FieldNames.starTime)) { + if (!input.trySkipNullValue()) { + starTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillApplyResp clone() { + return new JointDrillApplyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillApplyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillApplyResp(), data).checkInitialized(); + } + + public static JointDrillApplyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillApplyResp(), input).checkInitialized(); + } + + public static JointDrillApplyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillApplyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillApplyResp messages + */ + public static MessageFactory getFactory() { + return JointDrillApplyRespFactory.INSTANCE; + } + + private enum JointDrillApplyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillApplyResp create() { + return JointDrillApplyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName starTime = FieldName.forField("StarTime"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillContinue.java b/src/generated/main/emu/nebula/proto/JointDrillContinue.java new file mode 100644 index 0000000..993a453 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillContinue.java @@ -0,0 +1,383 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class JointDrillContinue { + /** + * Protobuf type {@code JointDrillContinueReq} + */ + public static final class JointDrillContinueReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 1; + */ + private long buildId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillContinueReq() { + } + + /** + * @return a new empty instance of {@code JointDrillContinueReq} + */ + public static JointDrillContinueReq newInstance() { + return new JointDrillContinueReq(); + } + + /** + * optional uint64 BuildId = 1; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 1; + * @return this + */ + public JointDrillContinueReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 1; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 1; + * @param value the buildId to set + * @return this + */ + public JointDrillContinueReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillContinueReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillContinueReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillContinueReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillContinueReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillContinueReq copyFrom(final JointDrillContinueReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillContinueReq mergeFrom(final JointDrillContinueReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillContinueReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + nextPackage.clear(); + return this; + } + + @Override + public JointDrillContinueReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillContinueReq)) { + return false; + } + JointDrillContinueReq other = (JointDrillContinueReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillContinueReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillContinueReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillContinueReq clone() { + return new JointDrillContinueReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillContinueReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillContinueReq(), data).checkInitialized(); + } + + public static JointDrillContinueReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillContinueReq(), input).checkInitialized(); + } + + public static JointDrillContinueReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillContinueReq(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillContinueReq messages + */ + public static MessageFactory getFactory() { + return JointDrillContinueReqFactory.INSTANCE; + } + + private enum JointDrillContinueReqFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillContinueReq create() { + return JointDrillContinueReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillGameOver.java b/src/generated/main/emu/nebula/proto/JointDrillGameOver.java new file mode 100644 index 0000000..086086a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillGameOver.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class JointDrillGameOver { +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillGiveUp.java b/src/generated/main/emu/nebula/proto/JointDrillGiveUp.java new file mode 100644 index 0000000..f0a4805 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillGiveUp.java @@ -0,0 +1,746 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class JointDrillGiveUp { + /** + * Protobuf type {@code JointDrillGiveUpReq} + */ + public static final class JointDrillGiveUpReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Floor = 1; + */ + private int floor; + + /** + * optional uint32 Time = 2; + */ + private int time; + + /** + * optional uint32 Damage = 3; + */ + private int damage; + + /** + * optional uint32 BossHp = 4; + */ + private int bossHp; + + /** + * optional bytes Record = 5; + */ + private final RepeatedByte record = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillGiveUpReq() { + } + + /** + * @return a new empty instance of {@code JointDrillGiveUpReq} + */ + public static JointDrillGiveUpReq newInstance() { + return new JointDrillGiveUpReq(); + } + + /** + * optional uint32 Floor = 1; + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Floor = 1; + * @return this + */ + public JointDrillGiveUpReq clearFloor() { + bitField0_ &= ~0x00000001; + floor = 0; + return this; + } + + /** + * optional uint32 Floor = 1; + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * optional uint32 Floor = 1; + * @param value the floor to set + * @return this + */ + public JointDrillGiveUpReq setFloor(final int value) { + bitField0_ |= 0x00000001; + floor = value; + return this; + } + + /** + * optional uint32 Time = 2; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Time = 2; + * @return this + */ + public JointDrillGiveUpReq clearTime() { + bitField0_ &= ~0x00000002; + time = 0; + return this; + } + + /** + * optional uint32 Time = 2; + * @return the time + */ + public int getTime() { + return time; + } + + /** + * optional uint32 Time = 2; + * @param value the time to set + * @return this + */ + public JointDrillGiveUpReq setTime(final int value) { + bitField0_ |= 0x00000002; + time = value; + return this; + } + + /** + * optional uint32 Damage = 3; + * @return whether the damage field is set + */ + public boolean hasDamage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Damage = 3; + * @return this + */ + public JointDrillGiveUpReq clearDamage() { + bitField0_ &= ~0x00000004; + damage = 0; + return this; + } + + /** + * optional uint32 Damage = 3; + * @return the damage + */ + public int getDamage() { + return damage; + } + + /** + * optional uint32 Damage = 3; + * @param value the damage to set + * @return this + */ + public JointDrillGiveUpReq setDamage(final int value) { + bitField0_ |= 0x00000004; + damage = value; + return this; + } + + /** + * optional uint32 BossHp = 4; + * @return whether the bossHp field is set + */ + public boolean hasBossHp() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 BossHp = 4; + * @return this + */ + public JointDrillGiveUpReq clearBossHp() { + bitField0_ &= ~0x00000008; + bossHp = 0; + return this; + } + + /** + * optional uint32 BossHp = 4; + * @return the bossHp + */ + public int getBossHp() { + return bossHp; + } + + /** + * optional uint32 BossHp = 4; + * @param value the bossHp to set + * @return this + */ + public JointDrillGiveUpReq setBossHp(final int value) { + bitField0_ |= 0x00000008; + bossHp = value; + return this; + } + + /** + * optional bytes Record = 5; + * @return whether the record field is set + */ + public boolean hasRecord() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes Record = 5; + * @return this + */ + public JointDrillGiveUpReq clearRecord() { + bitField0_ &= ~0x00000010; + record.clear(); + return this; + } + + /** + * optional bytes Record = 5; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecord()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getRecord() { + return record; + } + + /** + * optional bytes Record = 5; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableRecord() { + bitField0_ |= 0x00000010; + return record; + } + + /** + * optional bytes Record = 5; + * @param value the record to add + * @return this + */ + public JointDrillGiveUpReq addRecord(final byte value) { + bitField0_ |= 0x00000010; + record.add(value); + return this; + } + + /** + * optional bytes Record = 5; + * @param values the record to add + * @return this + */ + public JointDrillGiveUpReq addAllRecord(final byte... values) { + bitField0_ |= 0x00000010; + record.addAll(values); + return this; + } + + /** + * optional bytes Record = 5; + * @param values the record to set + * @return this + */ + public JointDrillGiveUpReq setRecord(final byte... values) { + bitField0_ |= 0x00000010; + record.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillGiveUpReq clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillGiveUpReq addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillGiveUpReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillGiveUpReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillGiveUpReq copyFrom(final JointDrillGiveUpReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + floor = other.floor; + time = other.time; + damage = other.damage; + bossHp = other.bossHp; + record.copyFrom(other.record); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillGiveUpReq mergeFrom(final JointDrillGiveUpReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasDamage()) { + setDamage(other.damage); + } + if (other.hasBossHp()) { + setBossHp(other.bossHp); + } + if (other.hasRecord()) { + getMutableRecord().copyFrom(other.record); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillGiveUpReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + floor = 0; + time = 0; + damage = 0; + bossHp = 0; + record.clear(); + nextPackage.clear(); + return this; + } + + @Override + public JointDrillGiveUpReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + record.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillGiveUpReq)) { + return false; + } + JointDrillGiveUpReq other = (JointDrillGiveUpReq) o; + return bitField0_ == other.bitField0_ + && (!hasFloor() || floor == other.floor) + && (!hasTime() || time == other.time) + && (!hasDamage() || damage == other.damage) + && (!hasBossHp() || bossHp == other.bossHp) + && (!hasRecord() || record.equals(other.record)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(bossHp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 42); + output.writeBytesNoTag(record); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHp); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(record); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillGiveUpReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // damage + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // bossHp + bossHp = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // record + input.readBytes(record); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.damage, damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.bossHp, bossHp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.record, record); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillGiveUpReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2039707535: { + if (input.isAtField(FieldNames.damage)) { + if (!input.trySkipNullValue()) { + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1995573621: { + if (input.isAtField(FieldNames.bossHp)) { + if (!input.trySkipNullValue()) { + bossHp = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851041679: { + if (input.isAtField(FieldNames.record)) { + if (!input.trySkipNullValue()) { + input.readBytes(record); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillGiveUpReq clone() { + return new JointDrillGiveUpReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillGiveUpReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillGiveUpReq(), data).checkInitialized(); + } + + public static JointDrillGiveUpReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillGiveUpReq(), input).checkInitialized(); + } + + public static JointDrillGiveUpReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillGiveUpReq(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillGiveUpReq messages + */ + public static MessageFactory getFactory() { + return JointDrillGiveUpReqFactory.INSTANCE; + } + + private enum JointDrillGiveUpReqFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillGiveUpReq create() { + return JointDrillGiveUpReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName damage = FieldName.forField("Damage"); + + static final FieldName bossHp = FieldName.forField("BossHp"); + + static final FieldName record = FieldName.forField("Record"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillQuestRewardReceive.java b/src/generated/main/emu/nebula/proto/JointDrillQuestRewardReceive.java new file mode 100644 index 0000000..4225647 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillQuestRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class JointDrillQuestRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillRank.java b/src/generated/main/emu/nebula/proto/JointDrillRank.java new file mode 100644 index 0000000..931423c --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillRank.java @@ -0,0 +1,2951 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class JointDrillRank { + /** + * Protobuf type {@code JointDrillRankInfo} + */ + public static final class JointDrillRankInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 LastRefreshTime = 1; + */ + private long lastRefreshTime; + + /** + * optional uint32 Total = 4; + */ + private int total; + + /** + * optional .JointDrillRankData Self = 2; + */ + private final JointDrillRankData self = JointDrillRankData.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .JointDrillRankData Rank = 3; + */ + private final RepeatedMessage rank = RepeatedMessage.newEmptyInstance(JointDrillRankData.getFactory()); + + private JointDrillRankInfo() { + } + + /** + * @return a new empty instance of {@code JointDrillRankInfo} + */ + public static JointDrillRankInfo newInstance() { + return new JointDrillRankInfo(); + } + + /** + * optional int64 LastRefreshTime = 1; + * @return whether the lastRefreshTime field is set + */ + public boolean hasLastRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 LastRefreshTime = 1; + * @return this + */ + public JointDrillRankInfo clearLastRefreshTime() { + bitField0_ &= ~0x00000001; + lastRefreshTime = 0L; + return this; + } + + /** + * optional int64 LastRefreshTime = 1; + * @return the lastRefreshTime + */ + public long getLastRefreshTime() { + return lastRefreshTime; + } + + /** + * optional int64 LastRefreshTime = 1; + * @param value the lastRefreshTime to set + * @return this + */ + public JointDrillRankInfo setLastRefreshTime(final long value) { + bitField0_ |= 0x00000001; + lastRefreshTime = value; + return this; + } + + /** + * optional uint32 Total = 4; + * @return whether the total field is set + */ + public boolean hasTotal() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Total = 4; + * @return this + */ + public JointDrillRankInfo clearTotal() { + bitField0_ &= ~0x00000002; + total = 0; + return this; + } + + /** + * optional uint32 Total = 4; + * @return the total + */ + public int getTotal() { + return total; + } + + /** + * optional uint32 Total = 4; + * @param value the total to set + * @return this + */ + public JointDrillRankInfo setTotal(final int value) { + bitField0_ |= 0x00000002; + total = value; + return this; + } + + /** + * optional .JointDrillRankData Self = 2; + * @return whether the self field is set + */ + public boolean hasSelf() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .JointDrillRankData Self = 2; + * @return this + */ + public JointDrillRankInfo clearSelf() { + bitField0_ &= ~0x00000004; + self.clear(); + return this; + } + + /** + * optional .JointDrillRankData Self = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelf()} if you want to modify it. + * + * @return internal storage object for reading + */ + public JointDrillRankData getSelf() { + return self; + } + + /** + * optional .JointDrillRankData Self = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public JointDrillRankData getMutableSelf() { + bitField0_ |= 0x00000004; + return self; + } + + /** + * optional .JointDrillRankData Self = 2; + * @param value the self to set + * @return this + */ + public JointDrillRankInfo setSelf(final JointDrillRankData value) { + bitField0_ |= 0x00000004; + self.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillRankInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillRankInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillRankInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillRankInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .JointDrillRankData Rank = 3; + * @return whether the rank field is set + */ + public boolean hasRank() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .JointDrillRankData Rank = 3; + * @return this + */ + public JointDrillRankInfo clearRank() { + bitField0_ &= ~0x00000010; + rank.clear(); + return this; + } + + /** + * repeated .JointDrillRankData Rank = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRank()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRank() { + return rank; + } + + /** + * repeated .JointDrillRankData Rank = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRank() { + bitField0_ |= 0x00000010; + return rank; + } + + /** + * repeated .JointDrillRankData Rank = 3; + * @param value the rank to add + * @return this + */ + public JointDrillRankInfo addRank(final JointDrillRankData value) { + bitField0_ |= 0x00000010; + rank.add(value); + return this; + } + + /** + * repeated .JointDrillRankData Rank = 3; + * @param values the rank to add + * @return this + */ + public JointDrillRankInfo addAllRank(final JointDrillRankData... values) { + bitField0_ |= 0x00000010; + rank.addAll(values); + return this; + } + + @Override + public JointDrillRankInfo copyFrom(final JointDrillRankInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lastRefreshTime = other.lastRefreshTime; + total = other.total; + self.copyFrom(other.self); + nextPackage.copyFrom(other.nextPackage); + rank.copyFrom(other.rank); + } + return this; + } + + @Override + public JointDrillRankInfo mergeFrom(final JointDrillRankInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLastRefreshTime()) { + setLastRefreshTime(other.lastRefreshTime); + } + if (other.hasTotal()) { + setTotal(other.total); + } + if (other.hasSelf()) { + getMutableSelf().mergeFrom(other.self); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRank()) { + getMutableRank().addAll(other.rank); + } + return this; + } + + @Override + public JointDrillRankInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lastRefreshTime = 0L; + total = 0; + self.clear(); + nextPackage.clear(); + rank.clear(); + return this; + } + + @Override + public JointDrillRankInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + self.clearQuick(); + nextPackage.clear(); + rank.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillRankInfo)) { + return false; + } + JointDrillRankInfo other = (JointDrillRankInfo) o; + return bitField0_ == other.bitField0_ + && (!hasLastRefreshTime() || lastRefreshTime == other.lastRefreshTime) + && (!hasTotal() || total == other.total) + && (!hasSelf() || self.equals(other.self)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRank() || rank.equals(other.rank)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt64NoTag(lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(total); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(self); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < rank.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(rank.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(total); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(self); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * rank.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rank); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillRankInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // lastRefreshTime + lastRefreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // total + total = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // self + input.readMessage(self); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // rank + tag = input.readRepeatedMessage(rank, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.lastRefreshTime, lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.total, total); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.self, self); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.rank, rank); + } + output.endObject(); + } + + @Override + public JointDrillRankInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -197072974: { + if (input.isAtField(FieldNames.lastRefreshTime)) { + if (!input.trySkipNullValue()) { + lastRefreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80997156: { + if (input.isAtField(FieldNames.total)) { + if (!input.trySkipNullValue()) { + total = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2573164: { + if (input.isAtField(FieldNames.self)) { + if (!input.trySkipNullValue()) { + input.readMessage(self); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2539596: { + if (input.isAtField(FieldNames.rank)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rank); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillRankInfo clone() { + return new JointDrillRankInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillRankInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillRankInfo(), data).checkInitialized(); + } + + public static JointDrillRankInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankInfo(), input).checkInitialized(); + } + + public static JointDrillRankInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillRankInfo messages + */ + public static MessageFactory getFactory() { + return JointDrillRankInfoFactory.INSTANCE; + } + + private enum JointDrillRankInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillRankInfo create() { + return JointDrillRankInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lastRefreshTime = FieldName.forField("LastRefreshTime"); + + static final FieldName total = FieldName.forField("Total"); + + static final FieldName self = FieldName.forField("Self"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rank = FieldName.forField("Rank"); + } + } + + /** + * Protobuf type {@code JointDrillRankChar} + */ + public static final class JointDrillRankChar extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Level = 2; + */ + private int level; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillRankChar() { + } + + /** + * @return a new empty instance of {@code JointDrillRankChar} + */ + public static JointDrillRankChar newInstance() { + return new JointDrillRankChar(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public JointDrillRankChar clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public JointDrillRankChar setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Level = 2; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Level = 2; + * @return this + */ + public JointDrillRankChar clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * optional uint32 Level = 2; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 2; + * @param value the level to set + * @return this + */ + public JointDrillRankChar setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillRankChar clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillRankChar addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillRankChar addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillRankChar setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillRankChar copyFrom(final JointDrillRankChar other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + level = other.level; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillRankChar mergeFrom(final JointDrillRankChar other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillRankChar clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + level = 0; + nextPackage.clear(); + return this; + } + + @Override + public JointDrillRankChar clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillRankChar)) { + return false; + } + JointDrillRankChar other = (JointDrillRankChar) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasLevel() || level == other.level) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillRankChar mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillRankChar mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillRankChar clone() { + return new JointDrillRankChar().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillRankChar parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillRankChar(), data).checkInitialized(); + } + + public static JointDrillRankChar parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankChar(), input).checkInitialized(); + } + + public static JointDrillRankChar parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankChar(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillRankChar messages + */ + public static MessageFactory getFactory() { + return JointDrillRankCharFactory.INSTANCE; + } + + private enum JointDrillRankCharFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillRankChar create() { + return JointDrillRankChar.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code JointDrillRankTeam} + */ + public static final class JointDrillRankTeam extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 BuildScore = 2; + */ + private int buildScore; + + /** + * optional uint32 Damage = 3; + */ + private int damage; + + /** + * optional uint32 Time = 4; + */ + private int time; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .JointDrillRankChar Chars = 1; + */ + private final RepeatedMessage chars = RepeatedMessage.newEmptyInstance(JointDrillRankChar.getFactory()); + + private JointDrillRankTeam() { + } + + /** + * @return a new empty instance of {@code JointDrillRankTeam} + */ + public static JointDrillRankTeam newInstance() { + return new JointDrillRankTeam(); + } + + /** + * optional uint32 BuildScore = 2; + * @return whether the buildScore field is set + */ + public boolean hasBuildScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 BuildScore = 2; + * @return this + */ + public JointDrillRankTeam clearBuildScore() { + bitField0_ &= ~0x00000001; + buildScore = 0; + return this; + } + + /** + * optional uint32 BuildScore = 2; + * @return the buildScore + */ + public int getBuildScore() { + return buildScore; + } + + /** + * optional uint32 BuildScore = 2; + * @param value the buildScore to set + * @return this + */ + public JointDrillRankTeam setBuildScore(final int value) { + bitField0_ |= 0x00000001; + buildScore = value; + return this; + } + + /** + * optional uint32 Damage = 3; + * @return whether the damage field is set + */ + public boolean hasDamage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Damage = 3; + * @return this + */ + public JointDrillRankTeam clearDamage() { + bitField0_ &= ~0x00000002; + damage = 0; + return this; + } + + /** + * optional uint32 Damage = 3; + * @return the damage + */ + public int getDamage() { + return damage; + } + + /** + * optional uint32 Damage = 3; + * @param value the damage to set + * @return this + */ + public JointDrillRankTeam setDamage(final int value) { + bitField0_ |= 0x00000002; + damage = value; + return this; + } + + /** + * optional uint32 Time = 4; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Time = 4; + * @return this + */ + public JointDrillRankTeam clearTime() { + bitField0_ &= ~0x00000004; + time = 0; + return this; + } + + /** + * optional uint32 Time = 4; + * @return the time + */ + public int getTime() { + return time; + } + + /** + * optional uint32 Time = 4; + * @param value the time to set + * @return this + */ + public JointDrillRankTeam setTime(final int value) { + bitField0_ |= 0x00000004; + time = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillRankTeam clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillRankTeam addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillRankTeam addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillRankTeam setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .JointDrillRankChar Chars = 1; + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .JointDrillRankChar Chars = 1; + * @return this + */ + public JointDrillRankTeam clearChars() { + bitField0_ &= ~0x00000010; + chars.clear(); + return this; + } + + /** + * repeated .JointDrillRankChar Chars = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getChars() { + return chars; + } + + /** + * repeated .JointDrillRankChar Chars = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableChars() { + bitField0_ |= 0x00000010; + return chars; + } + + /** + * repeated .JointDrillRankChar Chars = 1; + * @param value the chars to add + * @return this + */ + public JointDrillRankTeam addChars(final JointDrillRankChar value) { + bitField0_ |= 0x00000010; + chars.add(value); + return this; + } + + /** + * repeated .JointDrillRankChar Chars = 1; + * @param values the chars to add + * @return this + */ + public JointDrillRankTeam addAllChars(final JointDrillRankChar... values) { + bitField0_ |= 0x00000010; + chars.addAll(values); + return this; + } + + @Override + public JointDrillRankTeam copyFrom(final JointDrillRankTeam other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildScore = other.buildScore; + damage = other.damage; + time = other.time; + nextPackage.copyFrom(other.nextPackage); + chars.copyFrom(other.chars); + } + return this; + } + + @Override + public JointDrillRankTeam mergeFrom(final JointDrillRankTeam other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildScore()) { + setBuildScore(other.buildScore); + } + if (other.hasDamage()) { + setDamage(other.damage); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + return this; + } + + @Override + public JointDrillRankTeam clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildScore = 0; + damage = 0; + time = 0; + nextPackage.clear(); + chars.clear(); + return this; + } + + @Override + public JointDrillRankTeam clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chars.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillRankTeam)) { + return false; + } + JointDrillRankTeam other = (JointDrillRankTeam) o; + return bitField0_ == other.bitField0_ + && (!hasBuildScore() || buildScore == other.buildScore) + && (!hasDamage() || damage == other.damage) + && (!hasTime() || time == other.time) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasChars() || chars.equals(other.chars)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(buildScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(damage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(chars.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(buildScore); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(damage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillRankTeam mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildScore + buildScore = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // damage + damage = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.buildScore, buildScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.damage, damage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + output.endObject(); + } + + @Override + public JointDrillRankTeam mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1511471332: { + if (input.isAtField(FieldNames.buildScore)) { + if (!input.trySkipNullValue()) { + buildScore = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2039707535: { + if (input.isAtField(FieldNames.damage)) { + if (!input.trySkipNullValue()) { + damage = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillRankTeam clone() { + return new JointDrillRankTeam().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillRankTeam parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillRankTeam(), data).checkInitialized(); + } + + public static JointDrillRankTeam parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankTeam(), input).checkInitialized(); + } + + public static JointDrillRankTeam parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankTeam(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillRankTeam messages + */ + public static MessageFactory getFactory() { + return JointDrillRankTeamFactory.INSTANCE; + } + + private enum JointDrillRankTeamFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillRankTeam create() { + return JointDrillRankTeam.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildScore = FieldName.forField("BuildScore"); + + static final FieldName damage = FieldName.forField("Damage"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName chars = FieldName.forField("Chars"); + } + } + + /** + * Protobuf type {@code JointDrillRankData} + */ + public static final class JointDrillRankData extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Id = 1; + */ + private long id; + + /** + * optional uint32 WorldClass = 3; + */ + private int worldClass; + + /** + * optional uint32 HeadIcon = 4; + */ + private int headIcon; + + /** + * optional uint32 Score = 5; + */ + private int score; + + /** + * optional uint32 Rank = 6; + */ + private int rank; + + /** + * optional uint32 TitlePrefix = 7; + */ + private int titlePrefix; + + /** + * optional uint32 TitleSuffix = 8; + */ + private int titleSuffix; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string NickName = 2; + */ + private final Utf8String nickName = Utf8String.newEmptyInstance(); + + /** + * repeated .HonorInfo Honors = 9; + */ + private final RepeatedMessage honors = RepeatedMessage.newEmptyInstance(Public.HonorInfo.getFactory()); + + /** + * repeated .JointDrillRankTeam Teams = 10; + */ + private final RepeatedMessage teams = RepeatedMessage.newEmptyInstance(JointDrillRankTeam.getFactory()); + + private JointDrillRankData() { + } + + /** + * @return a new empty instance of {@code JointDrillRankData} + */ + public static JointDrillRankData newInstance() { + return new JointDrillRankData(); + } + + /** + * optional uint64 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Id = 1; + * @return this + */ + public JointDrillRankData clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * optional uint64 Id = 1; + * @return the id + */ + public long getId() { + return id; + } + + /** + * optional uint64 Id = 1; + * @param value the id to set + * @return this + */ + public JointDrillRankData setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 WorldClass = 3; + * @return whether the worldClass field is set + */ + public boolean hasWorldClass() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 WorldClass = 3; + * @return this + */ + public JointDrillRankData clearWorldClass() { + bitField0_ &= ~0x00000002; + worldClass = 0; + return this; + } + + /** + * optional uint32 WorldClass = 3; + * @return the worldClass + */ + public int getWorldClass() { + return worldClass; + } + + /** + * optional uint32 WorldClass = 3; + * @param value the worldClass to set + * @return this + */ + public JointDrillRankData setWorldClass(final int value) { + bitField0_ |= 0x00000002; + worldClass = value; + return this; + } + + /** + * optional uint32 HeadIcon = 4; + * @return whether the headIcon field is set + */ + public boolean hasHeadIcon() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 HeadIcon = 4; + * @return this + */ + public JointDrillRankData clearHeadIcon() { + bitField0_ &= ~0x00000004; + headIcon = 0; + return this; + } + + /** + * optional uint32 HeadIcon = 4; + * @return the headIcon + */ + public int getHeadIcon() { + return headIcon; + } + + /** + * optional uint32 HeadIcon = 4; + * @param value the headIcon to set + * @return this + */ + public JointDrillRankData setHeadIcon(final int value) { + bitField0_ |= 0x00000004; + headIcon = value; + return this; + } + + /** + * optional uint32 Score = 5; + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 Score = 5; + * @return this + */ + public JointDrillRankData clearScore() { + bitField0_ &= ~0x00000008; + score = 0; + return this; + } + + /** + * optional uint32 Score = 5; + * @return the score + */ + public int getScore() { + return score; + } + + /** + * optional uint32 Score = 5; + * @param value the score to set + * @return this + */ + public JointDrillRankData setScore(final int value) { + bitField0_ |= 0x00000008; + score = value; + return this; + } + + /** + * optional uint32 Rank = 6; + * @return whether the rank field is set + */ + public boolean hasRank() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 Rank = 6; + * @return this + */ + public JointDrillRankData clearRank() { + bitField0_ &= ~0x00000010; + rank = 0; + return this; + } + + /** + * optional uint32 Rank = 6; + * @return the rank + */ + public int getRank() { + return rank; + } + + /** + * optional uint32 Rank = 6; + * @param value the rank to set + * @return this + */ + public JointDrillRankData setRank(final int value) { + bitField0_ |= 0x00000010; + rank = value; + return this; + } + + /** + * optional uint32 TitlePrefix = 7; + * @return whether the titlePrefix field is set + */ + public boolean hasTitlePrefix() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 TitlePrefix = 7; + * @return this + */ + public JointDrillRankData clearTitlePrefix() { + bitField0_ &= ~0x00000020; + titlePrefix = 0; + return this; + } + + /** + * optional uint32 TitlePrefix = 7; + * @return the titlePrefix + */ + public int getTitlePrefix() { + return titlePrefix; + } + + /** + * optional uint32 TitlePrefix = 7; + * @param value the titlePrefix to set + * @return this + */ + public JointDrillRankData setTitlePrefix(final int value) { + bitField0_ |= 0x00000020; + titlePrefix = value; + return this; + } + + /** + * optional uint32 TitleSuffix = 8; + * @return whether the titleSuffix field is set + */ + public boolean hasTitleSuffix() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional uint32 TitleSuffix = 8; + * @return this + */ + public JointDrillRankData clearTitleSuffix() { + bitField0_ &= ~0x00000040; + titleSuffix = 0; + return this; + } + + /** + * optional uint32 TitleSuffix = 8; + * @return the titleSuffix + */ + public int getTitleSuffix() { + return titleSuffix; + } + + /** + * optional uint32 TitleSuffix = 8; + * @param value the titleSuffix to set + * @return this + */ + public JointDrillRankData setTitleSuffix(final int value) { + bitField0_ |= 0x00000040; + titleSuffix = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillRankData clearNextPackage() { + bitField0_ &= ~0x00000080; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000080; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillRankData addNextPackage(final byte value) { + bitField0_ |= 0x00000080; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillRankData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillRankData setNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string NickName = 2; + * @return whether the nickName field is set + */ + public boolean hasNickName() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional string NickName = 2; + * @return this + */ + public JointDrillRankData clearNickName() { + bitField0_ &= ~0x00000100; + nickName.clear(); + return this; + } + + /** + * optional string NickName = 2; + * @return the nickName + */ + public String getNickName() { + return nickName.getString(); + } + + /** + * optional string NickName = 2; + * @return internal {@code Utf8String} representation of nickName for reading + */ + public Utf8String getNickNameBytes() { + return this.nickName; + } + + /** + * optional string NickName = 2; + * @return internal {@code Utf8String} representation of nickName for modifications + */ + public Utf8String getMutableNickNameBytes() { + bitField0_ |= 0x00000100; + return this.nickName; + } + + /** + * optional string NickName = 2; + * @param value the nickName to set + * @return this + */ + public JointDrillRankData setNickName(final CharSequence value) { + bitField0_ |= 0x00000100; + nickName.copyFrom(value); + return this; + } + + /** + * optional string NickName = 2; + * @param value the nickName to set + * @return this + */ + public JointDrillRankData setNickName(final Utf8String value) { + bitField0_ |= 0x00000100; + nickName.copyFrom(value); + return this; + } + + /** + * repeated .HonorInfo Honors = 9; + * @return whether the honors field is set + */ + public boolean hasHonors() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * repeated .HonorInfo Honors = 9; + * @return this + */ + public JointDrillRankData clearHonors() { + bitField0_ &= ~0x00000200; + honors.clear(); + return this; + } + + /** + * repeated .HonorInfo Honors = 9; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHonors()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getHonors() { + return honors; + } + + /** + * repeated .HonorInfo Honors = 9; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableHonors() { + bitField0_ |= 0x00000200; + return honors; + } + + /** + * repeated .HonorInfo Honors = 9; + * @param value the honors to add + * @return this + */ + public JointDrillRankData addHonors(final Public.HonorInfo value) { + bitField0_ |= 0x00000200; + honors.add(value); + return this; + } + + /** + * repeated .HonorInfo Honors = 9; + * @param values the honors to add + * @return this + */ + public JointDrillRankData addAllHonors(final Public.HonorInfo... values) { + bitField0_ |= 0x00000200; + honors.addAll(values); + return this; + } + + /** + * repeated .JointDrillRankTeam Teams = 10; + * @return whether the teams field is set + */ + public boolean hasTeams() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * repeated .JointDrillRankTeam Teams = 10; + * @return this + */ + public JointDrillRankData clearTeams() { + bitField0_ &= ~0x00000400; + teams.clear(); + return this; + } + + /** + * repeated .JointDrillRankTeam Teams = 10; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTeams()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getTeams() { + return teams; + } + + /** + * repeated .JointDrillRankTeam Teams = 10; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableTeams() { + bitField0_ |= 0x00000400; + return teams; + } + + /** + * repeated .JointDrillRankTeam Teams = 10; + * @param value the teams to add + * @return this + */ + public JointDrillRankData addTeams(final JointDrillRankTeam value) { + bitField0_ |= 0x00000400; + teams.add(value); + return this; + } + + /** + * repeated .JointDrillRankTeam Teams = 10; + * @param values the teams to add + * @return this + */ + public JointDrillRankData addAllTeams(final JointDrillRankTeam... values) { + bitField0_ |= 0x00000400; + teams.addAll(values); + return this; + } + + @Override + public JointDrillRankData copyFrom(final JointDrillRankData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + worldClass = other.worldClass; + headIcon = other.headIcon; + score = other.score; + rank = other.rank; + titlePrefix = other.titlePrefix; + titleSuffix = other.titleSuffix; + nextPackage.copyFrom(other.nextPackage); + nickName.copyFrom(other.nickName); + honors.copyFrom(other.honors); + teams.copyFrom(other.teams); + } + return this; + } + + @Override + public JointDrillRankData mergeFrom(final JointDrillRankData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasWorldClass()) { + setWorldClass(other.worldClass); + } + if (other.hasHeadIcon()) { + setHeadIcon(other.headIcon); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasRank()) { + setRank(other.rank); + } + if (other.hasTitlePrefix()) { + setTitlePrefix(other.titlePrefix); + } + if (other.hasTitleSuffix()) { + setTitleSuffix(other.titleSuffix); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNickName()) { + getMutableNickNameBytes().copyFrom(other.nickName); + } + if (other.hasHonors()) { + getMutableHonors().addAll(other.honors); + } + if (other.hasTeams()) { + getMutableTeams().addAll(other.teams); + } + return this; + } + + @Override + public JointDrillRankData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + worldClass = 0; + headIcon = 0; + score = 0; + rank = 0; + titlePrefix = 0; + titleSuffix = 0; + nextPackage.clear(); + nickName.clear(); + honors.clear(); + teams.clear(); + return this; + } + + @Override + public JointDrillRankData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + nickName.clear(); + honors.clearQuick(); + teams.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillRankData)) { + return false; + } + JointDrillRankData other = (JointDrillRankData) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasWorldClass() || worldClass == other.worldClass) + && (!hasHeadIcon() || headIcon == other.headIcon) + && (!hasScore() || score == other.score) + && (!hasRank() || rank == other.rank) + && (!hasTitlePrefix() || titlePrefix == other.titlePrefix) + && (!hasTitleSuffix() || titleSuffix == other.titleSuffix) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNickName() || nickName.equals(other.nickName)) + && (!hasHonors() || honors.equals(other.honors)) + && (!hasTeams() || teams.equals(other.teams)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(rank); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + for (int i = 0; i < honors.length(); i++) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(honors.get(i)); + } + } + if ((bitField0_ & 0x00000400) != 0) { + for (int i = 0; i < teams.length(); i++) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(teams.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(rank); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + size += (1 * honors.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(honors); + } + if ((bitField0_ & 0x00000400) != 0) { + size += (1 * teams.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(teams); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillRankData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // worldClass + worldClass = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // headIcon + headIcon = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // rank + rank = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // titlePrefix + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // titleSuffix + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // nickName + input.readString(nickName); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // honors + tag = input.readRepeatedMessage(honors, tag); + bitField0_ |= 0x00000200; + if (tag != 82) { + break; + } + } + case 82: { + // teams + tag = input.readRepeatedMessage(teams, tag); + bitField0_ |= 0x00000400; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.worldClass, worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.headIcon, headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.rank, rank); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.titlePrefix, titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.titleSuffix, titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeString(FieldNames.nickName, nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRepeatedMessage(FieldNames.honors, honors); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRepeatedMessage(FieldNames.teams, teams); + } + output.endObject(); + } + + @Override + public JointDrillRankData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1869617882: { + if (input.isAtField(FieldNames.worldClass)) { + if (!input.trySkipNullValue()) { + worldClass = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1051463015: { + if (input.isAtField(FieldNames.headIcon)) { + if (!input.trySkipNullValue()) { + headIcon = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2539596: { + if (input.isAtField(FieldNames.rank)) { + if (!input.trySkipNullValue()) { + rank = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2096776938: { + if (input.isAtField(FieldNames.titlePrefix)) { + if (!input.trySkipNullValue()) { + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2109502551: { + if (input.isAtField(FieldNames.titleSuffix)) { + if (!input.trySkipNullValue()) { + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 134381742: { + if (input.isAtField(FieldNames.nickName)) { + if (!input.trySkipNullValue()) { + input.readString(nickName); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2127770263: { + if (input.isAtField(FieldNames.honors)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(honors); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80681366: { + if (input.isAtField(FieldNames.teams)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(teams); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillRankData clone() { + return new JointDrillRankData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillRankData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillRankData(), data).checkInitialized(); + } + + public static JointDrillRankData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankData(), input).checkInitialized(); + } + + public static JointDrillRankData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillRankData(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillRankData messages + */ + public static MessageFactory getFactory() { + return JointDrillRankDataFactory.INSTANCE; + } + + private enum JointDrillRankDataFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillRankData create() { + return JointDrillRankData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName worldClass = FieldName.forField("WorldClass"); + + static final FieldName headIcon = FieldName.forField("HeadIcon"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName rank = FieldName.forField("Rank"); + + static final FieldName titlePrefix = FieldName.forField("TitlePrefix"); + + static final FieldName titleSuffix = FieldName.forField("TitleSuffix"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nickName = FieldName.forField("NickName"); + + static final FieldName honors = FieldName.forField("Honors"); + + static final FieldName teams = FieldName.forField("Teams"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillRetreat.java b/src/generated/main/emu/nebula/proto/JointDrillRetreat.java new file mode 100644 index 0000000..55f8d01 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillRetreat.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class JointDrillRetreat { +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillSettle.java b/src/generated/main/emu/nebula/proto/JointDrillSettle.java new file mode 100644 index 0000000..b58e5d1 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillSettle.java @@ -0,0 +1,746 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class JointDrillSettle { + /** + * Protobuf type {@code JointDrillSettleReq} + */ + public static final class JointDrillSettleReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Checksum = 4; + */ + private long checksum; + + /** + * optional uint32 Time = 1; + */ + private int time; + + /** + * optional uint32 Damage = 2; + */ + private int damage; + + /** + * optional .TravelerDuelBattleSamples sample = 3; + */ + private final TravelerDuelRankUpload.TravelerDuelBattleSamples sample = TravelerDuelRankUpload.TravelerDuelBattleSamples.newInstance(); + + /** + * optional .Events Events = 7; + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillSettleReq() { + } + + /** + * @return a new empty instance of {@code JointDrillSettleReq} + */ + public static JointDrillSettleReq newInstance() { + return new JointDrillSettleReq(); + } + + /** + * optional uint64 Checksum = 4; + * @return whether the checksum field is set + */ + public boolean hasChecksum() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Checksum = 4; + * @return this + */ + public JointDrillSettleReq clearChecksum() { + bitField0_ &= ~0x00000001; + checksum = 0L; + return this; + } + + /** + * optional uint64 Checksum = 4; + * @return the checksum + */ + public long getChecksum() { + return checksum; + } + + /** + * optional uint64 Checksum = 4; + * @param value the checksum to set + * @return this + */ + public JointDrillSettleReq setChecksum(final long value) { + bitField0_ |= 0x00000001; + checksum = value; + return this; + } + + /** + * optional uint32 Time = 1; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Time = 1; + * @return this + */ + public JointDrillSettleReq clearTime() { + bitField0_ &= ~0x00000002; + time = 0; + return this; + } + + /** + * optional uint32 Time = 1; + * @return the time + */ + public int getTime() { + return time; + } + + /** + * optional uint32 Time = 1; + * @param value the time to set + * @return this + */ + public JointDrillSettleReq setTime(final int value) { + bitField0_ |= 0x00000002; + time = value; + return this; + } + + /** + * optional uint32 Damage = 2; + * @return whether the damage field is set + */ + public boolean hasDamage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Damage = 2; + * @return this + */ + public JointDrillSettleReq clearDamage() { + bitField0_ &= ~0x00000004; + damage = 0; + return this; + } + + /** + * optional uint32 Damage = 2; + * @return the damage + */ + public int getDamage() { + return damage; + } + + /** + * optional uint32 Damage = 2; + * @param value the damage to set + * @return this + */ + public JointDrillSettleReq setDamage(final int value) { + bitField0_ |= 0x00000004; + damage = value; + return this; + } + + /** + * optional .TravelerDuelBattleSamples sample = 3; + * @return whether the sample field is set + */ + public boolean hasSample() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .TravelerDuelBattleSamples sample = 3; + * @return this + */ + public JointDrillSettleReq clearSample() { + bitField0_ &= ~0x00000008; + sample.clear(); + return this; + } + + /** + * optional .TravelerDuelBattleSamples sample = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSample()} if you want to modify it. + * + * @return internal storage object for reading + */ + public TravelerDuelRankUpload.TravelerDuelBattleSamples getSample() { + return sample; + } + + /** + * optional .TravelerDuelBattleSamples sample = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public TravelerDuelRankUpload.TravelerDuelBattleSamples getMutableSample() { + bitField0_ |= 0x00000008; + return sample; + } + + /** + * optional .TravelerDuelBattleSamples sample = 3; + * @param value the sample to set + * @return this + */ + public JointDrillSettleReq setSample( + final TravelerDuelRankUpload.TravelerDuelBattleSamples value) { + bitField0_ |= 0x00000008; + sample.copyFrom(value); + return this; + } + + /** + * optional .Events Events = 7; + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional .Events Events = 7; + * @return this + */ + public JointDrillSettleReq clearEvents() { + bitField0_ &= ~0x00000010; + events.clear(); + return this; + } + + /** + * optional .Events Events = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * optional .Events Events = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000010; + return events; + } + + /** + * optional .Events Events = 7; + * @param value the events to set + * @return this + */ + public JointDrillSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000010; + events.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillSettleReq clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillSettleReq copyFrom(final JointDrillSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + checksum = other.checksum; + time = other.time; + damage = other.damage; + sample.copyFrom(other.sample); + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillSettleReq mergeFrom(final JointDrillSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChecksum()) { + setChecksum(other.checksum); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasDamage()) { + setDamage(other.damage); + } + if (other.hasSample()) { + getMutableSample().mergeFrom(other.sample); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + checksum = 0L; + time = 0; + damage = 0; + sample.clear(); + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public JointDrillSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + sample.clearQuick(); + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillSettleReq)) { + return false; + } + JointDrillSettleReq other = (JointDrillSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasChecksum() || checksum == other.checksum) + && (!hasTime() || time == other.time) + && (!hasDamage() || damage == other.damage) + && (!hasSample() || sample.equals(other.sample)) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt64NoTag(checksum); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(sample); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(checksum); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(sample); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // checksum + checksum = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // damage + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // sample + input.readMessage(sample); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // events + input.readMessage(events); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.checksum, checksum); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.damage, damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.sample, sample); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1601552483: { + if (input.isAtField(FieldNames.checksum)) { + if (!input.trySkipNullValue()) { + checksum = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2039707535: { + if (input.isAtField(FieldNames.damage)) { + if (!input.trySkipNullValue()) { + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -909675094: { + if (input.isAtField(FieldNames.sample)) { + if (!input.trySkipNullValue()) { + input.readMessage(sample); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillSettleReq clone() { + return new JointDrillSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillSettleReq(), data).checkInitialized(); + } + + public static JointDrillSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSettleReq(), input).checkInitialized(); + } + + public static JointDrillSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillSettleReq messages + */ + public static MessageFactory getFactory() { + return JointDrillSettleReqFactory.INSTANCE; + } + + private enum JointDrillSettleReqFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillSettleReq create() { + return JointDrillSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName checksum = FieldName.forField("Checksum"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName damage = FieldName.forField("Damage"); + + static final FieldName sample = FieldName.forField("sample"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillSweep.java b/src/generated/main/emu/nebula/proto/JointDrillSweep.java new file mode 100644 index 0000000..78d8ce8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillSweep.java @@ -0,0 +1,1046 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class JointDrillSweep { + /** + * Protobuf type {@code JointDrillSweepReq} + */ + public static final class JointDrillSweepReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 LevelId = 1; + */ + private int levelId; + + /** + * optional uint32 Count = 2; + */ + private int count; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillSweepReq() { + } + + /** + * @return a new empty instance of {@code JointDrillSweepReq} + */ + public static JointDrillSweepReq newInstance() { + return new JointDrillSweepReq(); + } + + /** + * optional uint32 LevelId = 1; + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 LevelId = 1; + * @return this + */ + public JointDrillSweepReq clearLevelId() { + bitField0_ &= ~0x00000001; + levelId = 0; + return this; + } + + /** + * optional uint32 LevelId = 1; + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * optional uint32 LevelId = 1; + * @param value the levelId to set + * @return this + */ + public JointDrillSweepReq setLevelId(final int value) { + bitField0_ |= 0x00000001; + levelId = value; + return this; + } + + /** + * optional uint32 Count = 2; + * @return whether the count field is set + */ + public boolean hasCount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Count = 2; + * @return this + */ + public JointDrillSweepReq clearCount() { + bitField0_ &= ~0x00000002; + count = 0; + return this; + } + + /** + * optional uint32 Count = 2; + * @return the count + */ + public int getCount() { + return count; + } + + /** + * optional uint32 Count = 2; + * @param value the count to set + * @return this + */ + public JointDrillSweepReq setCount(final int value) { + bitField0_ |= 0x00000002; + count = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillSweepReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillSweepReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillSweepReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillSweepReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillSweepReq copyFrom(final JointDrillSweepReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + levelId = other.levelId; + count = other.count; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillSweepReq mergeFrom(final JointDrillSweepReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasCount()) { + setCount(other.count); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillSweepReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + levelId = 0; + count = 0; + nextPackage.clear(); + return this; + } + + @Override + public JointDrillSweepReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillSweepReq)) { + return false; + } + JointDrillSweepReq other = (JointDrillSweepReq) o; + return bitField0_ == other.bitField0_ + && (!hasLevelId() || levelId == other.levelId) + && (!hasCount() || count == other.count) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(count); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(count); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillSweepReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // count + count = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.count, count); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillSweepReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65298671: { + if (input.isAtField(FieldNames.count)) { + if (!input.trySkipNullValue()) { + count = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillSweepReq clone() { + return new JointDrillSweepReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillSweepReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillSweepReq(), data).checkInitialized(); + } + + public static JointDrillSweepReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSweepReq(), input).checkInitialized(); + } + + public static JointDrillSweepReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSweepReq(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillSweepReq messages + */ + public static MessageFactory getFactory() { + return JointDrillSweepReqFactory.INSTANCE; + } + + private enum JointDrillSweepReqFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillSweepReq create() { + return JointDrillSweepReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName count = FieldName.forField("Count"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code JointDrillSweepResp} + */ + public static final class JointDrillSweepResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Score = 3; + */ + private int score; + + /** + * optional .ChangeInfo Change = 1; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpls Rewards = 2; + */ + private final RepeatedMessage rewards = RepeatedMessage.newEmptyInstance(Public.ItemTpls.getFactory()); + + private JointDrillSweepResp() { + } + + /** + * @return a new empty instance of {@code JointDrillSweepResp} + */ + public static JointDrillSweepResp newInstance() { + return new JointDrillSweepResp(); + } + + /** + * optional uint32 Score = 3; + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Score = 3; + * @return this + */ + public JointDrillSweepResp clearScore() { + bitField0_ &= ~0x00000001; + score = 0; + return this; + } + + /** + * optional uint32 Score = 3; + * @return the score + */ + public int getScore() { + return score; + } + + /** + * optional uint32 Score = 3; + * @param value the score to set + * @return this + */ + public JointDrillSweepResp setScore(final int value) { + bitField0_ |= 0x00000001; + score = value; + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 1; + * @return this + */ + public JointDrillSweepResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * @param value the change to set + * @return this + */ + public JointDrillSweepResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillSweepResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillSweepResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillSweepResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillSweepResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpls Rewards = 2; + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .ItemTpls Rewards = 2; + * @return this + */ + public JointDrillSweepResp clearRewards() { + bitField0_ &= ~0x00000008; + rewards.clear(); + return this; + } + + /** + * repeated .ItemTpls Rewards = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewards() { + return rewards; + } + + /** + * repeated .ItemTpls Rewards = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewards() { + bitField0_ |= 0x00000008; + return rewards; + } + + /** + * repeated .ItemTpls Rewards = 2; + * @param value the rewards to add + * @return this + */ + public JointDrillSweepResp addRewards(final Public.ItemTpls value) { + bitField0_ |= 0x00000008; + rewards.add(value); + return this; + } + + /** + * repeated .ItemTpls Rewards = 2; + * @param values the rewards to add + * @return this + */ + public JointDrillSweepResp addAllRewards(final Public.ItemTpls... values) { + bitField0_ |= 0x00000008; + rewards.addAll(values); + return this; + } + + @Override + public JointDrillSweepResp copyFrom(final JointDrillSweepResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + score = other.score; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public JointDrillSweepResp mergeFrom(final JointDrillSweepResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public JointDrillSweepResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + score = 0; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public JointDrillSweepResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillSweepResp)) { + return false; + } + JointDrillSweepResp other = (JointDrillSweepResp) o; + return bitField0_ == other.bitField0_ + && (!hasScore() || score == other.score) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillSweepResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public JointDrillSweepResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillSweepResp clone() { + return new JointDrillSweepResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillSweepResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillSweepResp(), data).checkInitialized(); + } + + public static JointDrillSweepResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSweepResp(), input).checkInitialized(); + } + + public static JointDrillSweepResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSweepResp(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillSweepResp messages + */ + public static MessageFactory getFactory() { + return JointDrillSweepRespFactory.INSTANCE; + } + + private enum JointDrillSweepRespFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillSweepResp create() { + return JointDrillSweepResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName score = FieldName.forField("Score"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/JointDrillSync.java b/src/generated/main/emu/nebula/proto/JointDrillSync.java new file mode 100644 index 0000000..4f225de --- /dev/null +++ b/src/generated/main/emu/nebula/proto/JointDrillSync.java @@ -0,0 +1,826 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class JointDrillSync { + /** + * Protobuf type {@code JointDrillSyncReq} + */ + public static final class JointDrillSyncReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Floor = 1; + */ + private int floor; + + /** + * optional uint32 Time = 2; + */ + private int time; + + /** + * optional uint32 Damage = 3; + */ + private int damage; + + /** + * optional uint32 BossHp = 4; + */ + private int bossHp; + + /** + * optional uint32 BossHpMax = 5; + */ + private int bossHpMax; + + /** + * optional bytes Record = 6; + */ + private final RepeatedByte record = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillSyncReq() { + } + + /** + * @return a new empty instance of {@code JointDrillSyncReq} + */ + public static JointDrillSyncReq newInstance() { + return new JointDrillSyncReq(); + } + + /** + * optional uint32 Floor = 1; + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Floor = 1; + * @return this + */ + public JointDrillSyncReq clearFloor() { + bitField0_ &= ~0x00000001; + floor = 0; + return this; + } + + /** + * optional uint32 Floor = 1; + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * optional uint32 Floor = 1; + * @param value the floor to set + * @return this + */ + public JointDrillSyncReq setFloor(final int value) { + bitField0_ |= 0x00000001; + floor = value; + return this; + } + + /** + * optional uint32 Time = 2; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Time = 2; + * @return this + */ + public JointDrillSyncReq clearTime() { + bitField0_ &= ~0x00000002; + time = 0; + return this; + } + + /** + * optional uint32 Time = 2; + * @return the time + */ + public int getTime() { + return time; + } + + /** + * optional uint32 Time = 2; + * @param value the time to set + * @return this + */ + public JointDrillSyncReq setTime(final int value) { + bitField0_ |= 0x00000002; + time = value; + return this; + } + + /** + * optional uint32 Damage = 3; + * @return whether the damage field is set + */ + public boolean hasDamage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Damage = 3; + * @return this + */ + public JointDrillSyncReq clearDamage() { + bitField0_ &= ~0x00000004; + damage = 0; + return this; + } + + /** + * optional uint32 Damage = 3; + * @return the damage + */ + public int getDamage() { + return damage; + } + + /** + * optional uint32 Damage = 3; + * @param value the damage to set + * @return this + */ + public JointDrillSyncReq setDamage(final int value) { + bitField0_ |= 0x00000004; + damage = value; + return this; + } + + /** + * optional uint32 BossHp = 4; + * @return whether the bossHp field is set + */ + public boolean hasBossHp() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 BossHp = 4; + * @return this + */ + public JointDrillSyncReq clearBossHp() { + bitField0_ &= ~0x00000008; + bossHp = 0; + return this; + } + + /** + * optional uint32 BossHp = 4; + * @return the bossHp + */ + public int getBossHp() { + return bossHp; + } + + /** + * optional uint32 BossHp = 4; + * @param value the bossHp to set + * @return this + */ + public JointDrillSyncReq setBossHp(final int value) { + bitField0_ |= 0x00000008; + bossHp = value; + return this; + } + + /** + * optional uint32 BossHpMax = 5; + * @return whether the bossHpMax field is set + */ + public boolean hasBossHpMax() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 BossHpMax = 5; + * @return this + */ + public JointDrillSyncReq clearBossHpMax() { + bitField0_ &= ~0x00000010; + bossHpMax = 0; + return this; + } + + /** + * optional uint32 BossHpMax = 5; + * @return the bossHpMax + */ + public int getBossHpMax() { + return bossHpMax; + } + + /** + * optional uint32 BossHpMax = 5; + * @param value the bossHpMax to set + * @return this + */ + public JointDrillSyncReq setBossHpMax(final int value) { + bitField0_ |= 0x00000010; + bossHpMax = value; + return this; + } + + /** + * optional bytes Record = 6; + * @return whether the record field is set + */ + public boolean hasRecord() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes Record = 6; + * @return this + */ + public JointDrillSyncReq clearRecord() { + bitField0_ &= ~0x00000020; + record.clear(); + return this; + } + + /** + * optional bytes Record = 6; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecord()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getRecord() { + return record; + } + + /** + * optional bytes Record = 6; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableRecord() { + bitField0_ |= 0x00000020; + return record; + } + + /** + * optional bytes Record = 6; + * @param value the record to add + * @return this + */ + public JointDrillSyncReq addRecord(final byte value) { + bitField0_ |= 0x00000020; + record.add(value); + return this; + } + + /** + * optional bytes Record = 6; + * @param values the record to add + * @return this + */ + public JointDrillSyncReq addAllRecord(final byte... values) { + bitField0_ |= 0x00000020; + record.addAll(values); + return this; + } + + /** + * optional bytes Record = 6; + * @param values the record to set + * @return this + */ + public JointDrillSyncReq setRecord(final byte... values) { + bitField0_ |= 0x00000020; + record.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public JointDrillSyncReq clearNextPackage() { + bitField0_ &= ~0x00000040; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000040; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public JointDrillSyncReq addNextPackage(final byte value) { + bitField0_ |= 0x00000040; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public JointDrillSyncReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public JointDrillSyncReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillSyncReq copyFrom(final JointDrillSyncReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + floor = other.floor; + time = other.time; + damage = other.damage; + bossHp = other.bossHp; + bossHpMax = other.bossHpMax; + record.copyFrom(other.record); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillSyncReq mergeFrom(final JointDrillSyncReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasDamage()) { + setDamage(other.damage); + } + if (other.hasBossHp()) { + setBossHp(other.bossHp); + } + if (other.hasBossHpMax()) { + setBossHpMax(other.bossHpMax); + } + if (other.hasRecord()) { + getMutableRecord().copyFrom(other.record); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillSyncReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + floor = 0; + time = 0; + damage = 0; + bossHp = 0; + bossHpMax = 0; + record.clear(); + nextPackage.clear(); + return this; + } + + @Override + public JointDrillSyncReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + record.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillSyncReq)) { + return false; + } + JointDrillSyncReq other = (JointDrillSyncReq) o; + return bitField0_ == other.bitField0_ + && (!hasFloor() || floor == other.floor) + && (!hasTime() || time == other.time) + && (!hasDamage() || damage == other.damage) + && (!hasBossHp() || bossHp == other.bossHp) + && (!hasBossHpMax() || bossHpMax == other.bossHpMax) + && (!hasRecord() || record.equals(other.record)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(bossHp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(bossHpMax); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 50); + output.writeBytesNoTag(record); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHp); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHpMax); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(record); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillSyncReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // damage + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // bossHp + bossHp = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // bossHpMax + bossHpMax = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // record + input.readBytes(record); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.damage, damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.bossHp, bossHp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.bossHpMax, bossHpMax); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.record, record); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillSyncReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2039707535: { + if (input.isAtField(FieldNames.damage)) { + if (!input.trySkipNullValue()) { + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1995573621: { + if (input.isAtField(FieldNames.bossHp)) { + if (!input.trySkipNullValue()) { + bossHp = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -803490897: { + if (input.isAtField(FieldNames.bossHpMax)) { + if (!input.trySkipNullValue()) { + bossHpMax = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851041679: { + if (input.isAtField(FieldNames.record)) { + if (!input.trySkipNullValue()) { + input.readBytes(record); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillSyncReq clone() { + return new JointDrillSyncReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillSyncReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillSyncReq(), data).checkInitialized(); + } + + public static JointDrillSyncReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSyncReq(), input).checkInitialized(); + } + + public static JointDrillSyncReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSyncReq(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillSyncReq messages + */ + public static MessageFactory getFactory() { + return JointDrillSyncReqFactory.INSTANCE; + } + + private enum JointDrillSyncReqFactory implements MessageFactory { + INSTANCE; + + @Override + public JointDrillSyncReq create() { + return JointDrillSyncReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName damage = FieldName.forField("Damage"); + + static final FieldName bossHp = FieldName.forField("BossHp"); + + static final FieldName bossHpMax = FieldName.forField("BossHpMax"); + + static final FieldName record = FieldName.forField("Record"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MailList.java b/src/generated/main/emu/nebula/proto/MailList.java new file mode 100644 index 0000000..cba0253 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MailList.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class MailList { +} diff --git a/src/generated/main/emu/nebula/proto/MailPin.java b/src/generated/main/emu/nebula/proto/MailPin.java new file mode 100644 index 0000000..9df2765 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MailPin.java @@ -0,0 +1,543 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class MailPin { + /** + * Protobuf type {@code MailPinRequest} + */ + public static final class MailPinRequest extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Flag = 2; + */ + private long flag; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bool Pin = 3; + */ + private boolean pin; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private MailPinRequest() { + } + + /** + * @return a new empty instance of {@code MailPinRequest} + */ + public static MailPinRequest newInstance() { + return new MailPinRequest(); + } + + /** + * optional uint64 Flag = 2; + * @return whether the flag field is set + */ + public boolean hasFlag() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Flag = 2; + * @return this + */ + public MailPinRequest clearFlag() { + bitField0_ &= ~0x00000001; + flag = 0L; + return this; + } + + /** + * optional uint64 Flag = 2; + * @return the flag + */ + public long getFlag() { + return flag; + } + + /** + * optional uint64 Flag = 2; + * @param value the flag to set + * @return this + */ + public MailPinRequest setFlag(final long value) { + bitField0_ |= 0x00000001; + flag = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public MailPinRequest clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public MailPinRequest setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional bool Pin = 3; + * @return whether the pin field is set + */ + public boolean hasPin() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bool Pin = 3; + * @return this + */ + public MailPinRequest clearPin() { + bitField0_ &= ~0x00000004; + pin = false; + return this; + } + + /** + * optional bool Pin = 3; + * @return the pin + */ + public boolean getPin() { + return pin; + } + + /** + * optional bool Pin = 3; + * @param value the pin to set + * @return this + */ + public MailPinRequest setPin(final boolean value) { + bitField0_ |= 0x00000004; + pin = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MailPinRequest clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MailPinRequest addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MailPinRequest addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MailPinRequest setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public MailPinRequest copyFrom(final MailPinRequest other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + flag = other.flag; + id = other.id; + pin = other.pin; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MailPinRequest mergeFrom(final MailPinRequest other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFlag()) { + setFlag(other.flag); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasPin()) { + setPin(other.pin); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MailPinRequest clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + flag = 0L; + id = 0; + pin = false; + nextPackage.clear(); + return this; + } + + @Override + public MailPinRequest clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MailPinRequest)) { + return false; + } + MailPinRequest other = (MailPinRequest) o; + return bitField0_ == other.bitField0_ + && (!hasFlag() || flag == other.flag) + && (!hasId() || id == other.id) + && (!hasPin() || pin == other.pin) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(flag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(pin); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(flag); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MailPinRequest mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // flag + flag = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // pin + pin = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.flag, flag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.pin, pin); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public MailPinRequest mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2192268: { + if (input.isAtField(FieldNames.flag)) { + if (!input.trySkipNullValue()) { + flag = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80245: { + if (input.isAtField(FieldNames.pin)) { + if (!input.trySkipNullValue()) { + pin = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MailPinRequest clone() { + return new MailPinRequest().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MailPinRequest parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MailPinRequest(), data).checkInitialized(); + } + + public static MailPinRequest parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailPinRequest(), input).checkInitialized(); + } + + public static MailPinRequest parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailPinRequest(), input).checkInitialized(); + } + + /** + * @return factory for creating MailPinRequest messages + */ + public static MessageFactory getFactory() { + return MailPinRequestFactory.INSTANCE; + } + + private enum MailPinRequestFactory implements MessageFactory { + INSTANCE; + + @Override + public MailPinRequest create() { + return MailPinRequest.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName flag = FieldName.forField("Flag"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName pin = FieldName.forField("Pin"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MailRead.java b/src/generated/main/emu/nebula/proto/MailRead.java new file mode 100644 index 0000000..f51ca60 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MailRead.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class MailRead { +} diff --git a/src/generated/main/emu/nebula/proto/MailRecv.java b/src/generated/main/emu/nebula/proto/MailRecv.java new file mode 100644 index 0000000..20f313a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MailRecv.java @@ -0,0 +1,524 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class MailRecv { + /** + * Protobuf type {@code MailRecvResp} + */ + public static final class MailRecvResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Items = 2; + */ + private final Public.ChangeInfo items = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Ids = 1; + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + private MailRecvResp() { + } + + /** + * @return a new empty instance of {@code MailRecvResp} + */ + public static MailRecvResp newInstance() { + return new MailRecvResp(); + } + + /** + * optional .ChangeInfo Items = 2; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Items = 2; + * @return this + */ + public MailRecvResp clearItems() { + bitField0_ &= ~0x00000001; + items.clear(); + return this; + } + + /** + * optional .ChangeInfo Items = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getItems() { + return items; + } + + /** + * optional .ChangeInfo Items = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableItems() { + bitField0_ |= 0x00000001; + return items; + } + + /** + * optional .ChangeInfo Items = 2; + * @param value the items to set + * @return this + */ + public MailRecvResp setItems(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + items.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MailRecvResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MailRecvResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MailRecvResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MailRecvResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 Ids = 1; + * @return this + */ + public MailRecvResp clearIds() { + bitField0_ &= ~0x00000004; + ids.clear(); + return this; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000004; + return ids; + } + + /** + * repeated uint32 Ids = 1; + * @param value the ids to add + * @return this + */ + public MailRecvResp addIds(final int value) { + bitField0_ |= 0x00000004; + ids.add(value); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @param values the ids to add + * @return this + */ + public MailRecvResp addAllIds(final int... values) { + bitField0_ |= 0x00000004; + ids.addAll(values); + return this; + } + + @Override + public MailRecvResp copyFrom(final MailRecvResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + items.copyFrom(other.items); + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + } + return this; + } + + @Override + public MailRecvResp mergeFrom(final MailRecvResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasItems()) { + getMutableItems().mergeFrom(other.items); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + return this; + } + + @Override + public MailRecvResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + items.clear(); + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public MailRecvResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + items.clearQuick(); + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MailRecvResp)) { + return false; + } + MailRecvResp other = (MailRecvResp) o; + return bitField0_ == other.bitField0_ + && (!hasItems() || items.equals(other.items)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(items); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MailRecvResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // items + input.readMessage(items); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.items, items); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + output.endObject(); + } + + @Override + public MailRecvResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readMessage(items); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MailRecvResp clone() { + return new MailRecvResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MailRecvResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MailRecvResp(), data).checkInitialized(); + } + + public static MailRecvResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailRecvResp(), input).checkInitialized(); + } + + public static MailRecvResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailRecvResp(), input).checkInitialized(); + } + + /** + * @return factory for creating MailRecvResp messages + */ + public static MessageFactory getFactory() { + return MailRecvRespFactory.INSTANCE; + } + + private enum MailRecvRespFactory implements MessageFactory { + INSTANCE; + + @Override + public MailRecvResp create() { + return MailRecvResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName items = FieldName.forField("Items"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MailRemove.java b/src/generated/main/emu/nebula/proto/MailRemove.java new file mode 100644 index 0000000..71d4e4b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MailRemove.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class MailRemove { + /** + * Protobuf type {@code MailRemoveResp} + */ + public static final class MailRemoveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Ids = 1; + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + private MailRemoveResp() { + } + + /** + * @return a new empty instance of {@code MailRemoveResp} + */ + public static MailRemoveResp newInstance() { + return new MailRemoveResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MailRemoveResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MailRemoveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MailRemoveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MailRemoveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Ids = 1; + * @return this + */ + public MailRemoveResp clearIds() { + bitField0_ &= ~0x00000002; + ids.clear(); + return this; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000002; + return ids; + } + + /** + * repeated uint32 Ids = 1; + * @param value the ids to add + * @return this + */ + public MailRemoveResp addIds(final int value) { + bitField0_ |= 0x00000002; + ids.add(value); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @param values the ids to add + * @return this + */ + public MailRemoveResp addAllIds(final int... values) { + bitField0_ |= 0x00000002; + ids.addAll(values); + return this; + } + + @Override + public MailRemoveResp copyFrom(final MailRemoveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + } + return this; + } + + @Override + public MailRemoveResp mergeFrom(final MailRemoveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + return this; + } + + @Override + public MailRemoveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public MailRemoveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MailRemoveResp)) { + return false; + } + MailRemoveResp other = (MailRemoveResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MailRemoveResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + output.endObject(); + } + + @Override + public MailRemoveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MailRemoveResp clone() { + return new MailRemoveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MailRemoveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MailRemoveResp(), data).checkInitialized(); + } + + public static MailRemoveResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailRemoveResp(), input).checkInitialized(); + } + + public static MailRemoveResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailRemoveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating MailRemoveResp messages + */ + public static MessageFactory getFactory() { + return MailRemoveRespFactory.INSTANCE; + } + + private enum MailRemoveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public MailRemoveResp create() { + return MailRemoveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MallGemListOuterClass.java b/src/generated/main/emu/nebula/proto/MallGemListOuterClass.java new file mode 100644 index 0000000..f4499c7 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallGemListOuterClass.java @@ -0,0 +1,893 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class MallGemListOuterClass { + /** + * Protobuf type {@code GemInfo} + */ + public static final class GemInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool Maiden = 2; + */ + private boolean maiden; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Id = 1; + */ + private final Utf8String id = Utf8String.newEmptyInstance(); + + private GemInfo() { + } + + /** + * @return a new empty instance of {@code GemInfo} + */ + public static GemInfo newInstance() { + return new GemInfo(); + } + + /** + * optional bool Maiden = 2; + * @return whether the maiden field is set + */ + public boolean hasMaiden() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool Maiden = 2; + * @return this + */ + public GemInfo clearMaiden() { + bitField0_ &= ~0x00000001; + maiden = false; + return this; + } + + /** + * optional bool Maiden = 2; + * @return the maiden + */ + public boolean getMaiden() { + return maiden; + } + + /** + * optional bool Maiden = 2; + * @param value the maiden to set + * @return this + */ + public GemInfo setMaiden(final boolean value) { + bitField0_ |= 0x00000001; + maiden = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GemInfo clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GemInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GemInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GemInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Id = 1; + * @return this + */ + public GemInfo clearId() { + bitField0_ &= ~0x00000004; + id.clear(); + return this; + } + + /** + * optional string Id = 1; + * @return the id + */ + public String getId() { + return id.getString(); + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for reading + */ + public Utf8String getIdBytes() { + return this.id; + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for modifications + */ + public Utf8String getMutableIdBytes() { + bitField0_ |= 0x00000004; + return this.id; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public GemInfo setId(final CharSequence value) { + bitField0_ |= 0x00000004; + id.copyFrom(value); + return this; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public GemInfo setId(final Utf8String value) { + bitField0_ |= 0x00000004; + id.copyFrom(value); + return this; + } + + @Override + public GemInfo copyFrom(final GemInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + maiden = other.maiden; + nextPackage.copyFrom(other.nextPackage); + id.copyFrom(other.id); + } + return this; + } + + @Override + public GemInfo mergeFrom(final GemInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMaiden()) { + setMaiden(other.maiden); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasId()) { + getMutableIdBytes().copyFrom(other.id); + } + return this; + } + + @Override + public GemInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + maiden = false; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public GemInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GemInfo)) { + return false; + } + GemInfo other = (GemInfo) o; + return bitField0_ == other.bitField0_ + && (!hasMaiden() || maiden == other.maiden) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasId() || id.equals(other.id)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(maiden); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(id); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(id); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GemInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // maiden + maiden = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // id + input.readString(id); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.maiden, maiden); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.id, id); + } + output.endObject(); + } + + @Override + public GemInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1997713736: { + if (input.isAtField(FieldNames.maiden)) { + if (!input.trySkipNullValue()) { + maiden = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + input.readString(id); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GemInfo clone() { + return new GemInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GemInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GemInfo(), data).checkInitialized(); + } + + public static GemInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GemInfo(), input).checkInitialized(); + } + + public static GemInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GemInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating GemInfo messages + */ + public static MessageFactory getFactory() { + return GemInfoFactory.INSTANCE; + } + + private enum GemInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public GemInfo create() { + return GemInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName maiden = FieldName.forField("Maiden"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName id = FieldName.forField("Id"); + } + } + + /** + * Protobuf type {@code MallGemList} + */ + public static final class MallGemList extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .GemInfo List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(GemInfo.getFactory()); + + private MallGemList() { + } + + /** + * @return a new empty instance of {@code MallGemList} + */ + public static MallGemList newInstance() { + return new MallGemList(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MallGemList clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MallGemList addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MallGemList addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MallGemList setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .GemInfo List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .GemInfo List = 1; + * @return this + */ + public MallGemList clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .GemInfo List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .GemInfo List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .GemInfo List = 1; + * @param value the list to add + * @return this + */ + public MallGemList addList(final GemInfo value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .GemInfo List = 1; + * @param values the list to add + * @return this + */ + public MallGemList addAllList(final GemInfo... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public MallGemList copyFrom(final MallGemList other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public MallGemList mergeFrom(final MallGemList other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public MallGemList clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public MallGemList clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MallGemList)) { + return false; + } + MallGemList other = (MallGemList) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MallGemList mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public MallGemList mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MallGemList clone() { + return new MallGemList().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MallGemList parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MallGemList(), data).checkInitialized(); + } + + public static MallGemList parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallGemList(), input).checkInitialized(); + } + + public static MallGemList parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallGemList(), input).checkInitialized(); + } + + /** + * @return factory for creating MallGemList messages + */ + public static MessageFactory getFactory() { + return MallGemListFactory.INSTANCE; + } + + private enum MallGemListFactory implements MessageFactory { + INSTANCE; + + @Override + public MallGemList create() { + return MallGemList.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MallGemOrder.java b/src/generated/main/emu/nebula/proto/MallGemOrder.java new file mode 100644 index 0000000..d936a7b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallGemOrder.java @@ -0,0 +1,630 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class MallGemOrder { + /** + * Protobuf type {@code OrderInfo} + */ + public static final class OrderInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Id = 1; + */ + private final Utf8String id = Utf8String.newEmptyInstance(); + + /** + * optional string ExtraData = 2; + */ + private final Utf8String extraData = Utf8String.newEmptyInstance(); + + /** + * optional string NotifyUrl = 3; + */ + private final Utf8String notifyUrl = Utf8String.newEmptyInstance(); + + private OrderInfo() { + } + + /** + * @return a new empty instance of {@code OrderInfo} + */ + public static OrderInfo newInstance() { + return new OrderInfo(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public OrderInfo clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public OrderInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public OrderInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public OrderInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Id = 1; + * @return this + */ + public OrderInfo clearId() { + bitField0_ &= ~0x00000002; + id.clear(); + return this; + } + + /** + * optional string Id = 1; + * @return the id + */ + public String getId() { + return id.getString(); + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for reading + */ + public Utf8String getIdBytes() { + return this.id; + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for modifications + */ + public Utf8String getMutableIdBytes() { + bitField0_ |= 0x00000002; + return this.id; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public OrderInfo setId(final CharSequence value) { + bitField0_ |= 0x00000002; + id.copyFrom(value); + return this; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public OrderInfo setId(final Utf8String value) { + bitField0_ |= 0x00000002; + id.copyFrom(value); + return this; + } + + /** + * optional string ExtraData = 2; + * @return whether the extraData field is set + */ + public boolean hasExtraData() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string ExtraData = 2; + * @return this + */ + public OrderInfo clearExtraData() { + bitField0_ &= ~0x00000004; + extraData.clear(); + return this; + } + + /** + * optional string ExtraData = 2; + * @return the extraData + */ + public String getExtraData() { + return extraData.getString(); + } + + /** + * optional string ExtraData = 2; + * @return internal {@code Utf8String} representation of extraData for reading + */ + public Utf8String getExtraDataBytes() { + return this.extraData; + } + + /** + * optional string ExtraData = 2; + * @return internal {@code Utf8String} representation of extraData for modifications + */ + public Utf8String getMutableExtraDataBytes() { + bitField0_ |= 0x00000004; + return this.extraData; + } + + /** + * optional string ExtraData = 2; + * @param value the extraData to set + * @return this + */ + public OrderInfo setExtraData(final CharSequence value) { + bitField0_ |= 0x00000004; + extraData.copyFrom(value); + return this; + } + + /** + * optional string ExtraData = 2; + * @param value the extraData to set + * @return this + */ + public OrderInfo setExtraData(final Utf8String value) { + bitField0_ |= 0x00000004; + extraData.copyFrom(value); + return this; + } + + /** + * optional string NotifyUrl = 3; + * @return whether the notifyUrl field is set + */ + public boolean hasNotifyUrl() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string NotifyUrl = 3; + * @return this + */ + public OrderInfo clearNotifyUrl() { + bitField0_ &= ~0x00000008; + notifyUrl.clear(); + return this; + } + + /** + * optional string NotifyUrl = 3; + * @return the notifyUrl + */ + public String getNotifyUrl() { + return notifyUrl.getString(); + } + + /** + * optional string NotifyUrl = 3; + * @return internal {@code Utf8String} representation of notifyUrl for reading + */ + public Utf8String getNotifyUrlBytes() { + return this.notifyUrl; + } + + /** + * optional string NotifyUrl = 3; + * @return internal {@code Utf8String} representation of notifyUrl for modifications + */ + public Utf8String getMutableNotifyUrlBytes() { + bitField0_ |= 0x00000008; + return this.notifyUrl; + } + + /** + * optional string NotifyUrl = 3; + * @param value the notifyUrl to set + * @return this + */ + public OrderInfo setNotifyUrl(final CharSequence value) { + bitField0_ |= 0x00000008; + notifyUrl.copyFrom(value); + return this; + } + + /** + * optional string NotifyUrl = 3; + * @param value the notifyUrl to set + * @return this + */ + public OrderInfo setNotifyUrl(final Utf8String value) { + bitField0_ |= 0x00000008; + notifyUrl.copyFrom(value); + return this; + } + + @Override + public OrderInfo copyFrom(final OrderInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + id.copyFrom(other.id); + extraData.copyFrom(other.extraData); + notifyUrl.copyFrom(other.notifyUrl); + } + return this; + } + + @Override + public OrderInfo mergeFrom(final OrderInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasId()) { + getMutableIdBytes().copyFrom(other.id); + } + if (other.hasExtraData()) { + getMutableExtraDataBytes().copyFrom(other.extraData); + } + if (other.hasNotifyUrl()) { + getMutableNotifyUrlBytes().copyFrom(other.notifyUrl); + } + return this; + } + + @Override + public OrderInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + id.clear(); + extraData.clear(); + notifyUrl.clear(); + return this; + } + + @Override + public OrderInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + id.clear(); + extraData.clear(); + notifyUrl.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof OrderInfo)) { + return false; + } + OrderInfo other = (OrderInfo) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasId() || id.equals(other.id)) + && (!hasExtraData() || extraData.equals(other.extraData)) + && (!hasNotifyUrl() || notifyUrl.equals(other.notifyUrl)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(extraData); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeStringNoTag(notifyUrl); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(extraData); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(notifyUrl); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public OrderInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // id + input.readString(id); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // extraData + input.readString(extraData); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // notifyUrl + input.readString(notifyUrl); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.extraData, extraData); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.notifyUrl, notifyUrl); + } + output.endObject(); + } + + @Override + public OrderInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + input.readString(id); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1750175674: { + if (input.isAtField(FieldNames.extraData)) { + if (!input.trySkipNullValue()) { + input.readString(extraData); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -388913850: { + if (input.isAtField(FieldNames.notifyUrl)) { + if (!input.trySkipNullValue()) { + input.readString(notifyUrl); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public OrderInfo clone() { + return new OrderInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static OrderInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new OrderInfo(), data).checkInitialized(); + } + + public static OrderInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new OrderInfo(), input).checkInitialized(); + } + + public static OrderInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new OrderInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating OrderInfo messages + */ + public static MessageFactory getFactory() { + return OrderInfoFactory.INSTANCE; + } + + private enum OrderInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public OrderInfo create() { + return OrderInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName extraData = FieldName.forField("ExtraData"); + + static final FieldName notifyUrl = FieldName.forField("NotifyUrl"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MallMonthlycardList.java b/src/generated/main/emu/nebula/proto/MallMonthlycardList.java new file mode 100644 index 0000000..8c33faa --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallMonthlycardList.java @@ -0,0 +1,975 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class MallMonthlycardList { + /** + * Protobuf type {@code MonthlyCardInfo} + */ + public static final class MonthlyCardInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Remaining = 2; + */ + private int remaining; + + /** + * optional bool Received = 3; + */ + private boolean received; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Id = 1; + */ + private final Utf8String id = Utf8String.newEmptyInstance(); + + private MonthlyCardInfo() { + } + + /** + * @return a new empty instance of {@code MonthlyCardInfo} + */ + public static MonthlyCardInfo newInstance() { + return new MonthlyCardInfo(); + } + + /** + * optional uint32 Remaining = 2; + * @return whether the remaining field is set + */ + public boolean hasRemaining() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Remaining = 2; + * @return this + */ + public MonthlyCardInfo clearRemaining() { + bitField0_ &= ~0x00000001; + remaining = 0; + return this; + } + + /** + * optional uint32 Remaining = 2; + * @return the remaining + */ + public int getRemaining() { + return remaining; + } + + /** + * optional uint32 Remaining = 2; + * @param value the remaining to set + * @return this + */ + public MonthlyCardInfo setRemaining(final int value) { + bitField0_ |= 0x00000001; + remaining = value; + return this; + } + + /** + * optional bool Received = 3; + * @return whether the received field is set + */ + public boolean hasReceived() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bool Received = 3; + * @return this + */ + public MonthlyCardInfo clearReceived() { + bitField0_ &= ~0x00000002; + received = false; + return this; + } + + /** + * optional bool Received = 3; + * @return the received + */ + public boolean getReceived() { + return received; + } + + /** + * optional bool Received = 3; + * @param value the received to set + * @return this + */ + public MonthlyCardInfo setReceived(final boolean value) { + bitField0_ |= 0x00000002; + received = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MonthlyCardInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MonthlyCardInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MonthlyCardInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MonthlyCardInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string Id = 1; + * @return this + */ + public MonthlyCardInfo clearId() { + bitField0_ &= ~0x00000008; + id.clear(); + return this; + } + + /** + * optional string Id = 1; + * @return the id + */ + public String getId() { + return id.getString(); + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for reading + */ + public Utf8String getIdBytes() { + return this.id; + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for modifications + */ + public Utf8String getMutableIdBytes() { + bitField0_ |= 0x00000008; + return this.id; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public MonthlyCardInfo setId(final CharSequence value) { + bitField0_ |= 0x00000008; + id.copyFrom(value); + return this; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public MonthlyCardInfo setId(final Utf8String value) { + bitField0_ |= 0x00000008; + id.copyFrom(value); + return this; + } + + @Override + public MonthlyCardInfo copyFrom(final MonthlyCardInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + remaining = other.remaining; + received = other.received; + nextPackage.copyFrom(other.nextPackage); + id.copyFrom(other.id); + } + return this; + } + + @Override + public MonthlyCardInfo mergeFrom(final MonthlyCardInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRemaining()) { + setRemaining(other.remaining); + } + if (other.hasReceived()) { + setReceived(other.received); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasId()) { + getMutableIdBytes().copyFrom(other.id); + } + return this; + } + + @Override + public MonthlyCardInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + remaining = 0; + received = false; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public MonthlyCardInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MonthlyCardInfo)) { + return false; + } + MonthlyCardInfo other = (MonthlyCardInfo) o; + return bitField0_ == other.bitField0_ + && (!hasRemaining() || remaining == other.remaining) + && (!hasReceived() || received == other.received) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasId() || id.equals(other.id)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(remaining); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(received); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(id); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(remaining); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(id); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MonthlyCardInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // remaining + remaining = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // received + received = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // id + input.readString(id); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.remaining, remaining); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.received, received); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.id, id); + } + output.endObject(); + } + + @Override + public MonthlyCardInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1421161002: { + if (input.isAtField(FieldNames.remaining)) { + if (!input.trySkipNullValue()) { + remaining = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -744075775: { + if (input.isAtField(FieldNames.received)) { + if (!input.trySkipNullValue()) { + received = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + input.readString(id); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MonthlyCardInfo clone() { + return new MonthlyCardInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MonthlyCardInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MonthlyCardInfo(), data).checkInitialized(); + } + + public static MonthlyCardInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MonthlyCardInfo(), input).checkInitialized(); + } + + public static MonthlyCardInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MonthlyCardInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating MonthlyCardInfo messages + */ + public static MessageFactory getFactory() { + return MonthlyCardInfoFactory.INSTANCE; + } + + private enum MonthlyCardInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public MonthlyCardInfo create() { + return MonthlyCardInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName remaining = FieldName.forField("Remaining"); + + static final FieldName received = FieldName.forField("Received"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName id = FieldName.forField("Id"); + } + } + + /** + * Protobuf type {@code MallMonthlyCardList} + */ + public static final class MallMonthlyCardList extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .MonthlyCardInfo List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(MonthlyCardInfo.getFactory()); + + private MallMonthlyCardList() { + } + + /** + * @return a new empty instance of {@code MallMonthlyCardList} + */ + public static MallMonthlyCardList newInstance() { + return new MallMonthlyCardList(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MallMonthlyCardList clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MallMonthlyCardList addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MallMonthlyCardList addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MallMonthlyCardList setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .MonthlyCardInfo List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .MonthlyCardInfo List = 1; + * @return this + */ + public MallMonthlyCardList clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .MonthlyCardInfo List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .MonthlyCardInfo List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .MonthlyCardInfo List = 1; + * @param value the list to add + * @return this + */ + public MallMonthlyCardList addList(final MonthlyCardInfo value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .MonthlyCardInfo List = 1; + * @param values the list to add + * @return this + */ + public MallMonthlyCardList addAllList(final MonthlyCardInfo... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public MallMonthlyCardList copyFrom(final MallMonthlyCardList other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public MallMonthlyCardList mergeFrom(final MallMonthlyCardList other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public MallMonthlyCardList clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public MallMonthlyCardList clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MallMonthlyCardList)) { + return false; + } + MallMonthlyCardList other = (MallMonthlyCardList) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MallMonthlyCardList mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public MallMonthlyCardList mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MallMonthlyCardList clone() { + return new MallMonthlyCardList().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MallMonthlyCardList parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MallMonthlyCardList(), data).checkInitialized(); + } + + public static MallMonthlyCardList parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallMonthlyCardList(), input).checkInitialized(); + } + + public static MallMonthlyCardList parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallMonthlyCardList(), input).checkInitialized(); + } + + /** + * @return factory for creating MallMonthlyCardList messages + */ + public static MessageFactory getFactory() { + return MallMonthlyCardListFactory.INSTANCE; + } + + private enum MallMonthlyCardListFactory implements MessageFactory { + INSTANCE; + + @Override + public MallMonthlyCardList create() { + return MallMonthlyCardList.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MallMonthlycardOrder.java b/src/generated/main/emu/nebula/proto/MallMonthlycardOrder.java new file mode 100644 index 0000000..94644ac --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallMonthlycardOrder.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class MallMonthlycardOrder { +} diff --git a/src/generated/main/emu/nebula/proto/MallOrderCancel.java b/src/generated/main/emu/nebula/proto/MallOrderCancel.java new file mode 100644 index 0000000..88f11b4 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallOrderCancel.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class MallOrderCancel { +} diff --git a/src/generated/main/emu/nebula/proto/MallOrderCollect.java b/src/generated/main/emu/nebula/proto/MallOrderCollect.java new file mode 100644 index 0000000..af52dd3 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallOrderCollect.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class MallOrderCollect { +} diff --git a/src/generated/main/emu/nebula/proto/MallPackageListOuterClass.java b/src/generated/main/emu/nebula/proto/MallPackageListOuterClass.java new file mode 100644 index 0000000..7d20df9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallPackageListOuterClass.java @@ -0,0 +1,974 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class MallPackageListOuterClass { + /** + * Protobuf type {@code PackageInfo} + */ + public static final class PackageInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 RefreshTime = 3; + */ + private long refreshTime; + + /** + * optional uint32 Stock = 2; + */ + private int stock; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Id = 1; + */ + private final Utf8String id = Utf8String.newEmptyInstance(); + + private PackageInfo() { + } + + /** + * @return a new empty instance of {@code PackageInfo} + */ + public static PackageInfo newInstance() { + return new PackageInfo(); + } + + /** + * optional int64 RefreshTime = 3; + * @return whether the refreshTime field is set + */ + public boolean hasRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 RefreshTime = 3; + * @return this + */ + public PackageInfo clearRefreshTime() { + bitField0_ &= ~0x00000001; + refreshTime = 0L; + return this; + } + + /** + * optional int64 RefreshTime = 3; + * @return the refreshTime + */ + public long getRefreshTime() { + return refreshTime; + } + + /** + * optional int64 RefreshTime = 3; + * @param value the refreshTime to set + * @return this + */ + public PackageInfo setRefreshTime(final long value) { + bitField0_ |= 0x00000001; + refreshTime = value; + return this; + } + + /** + * optional uint32 Stock = 2; + * @return whether the stock field is set + */ + public boolean hasStock() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Stock = 2; + * @return this + */ + public PackageInfo clearStock() { + bitField0_ &= ~0x00000002; + stock = 0; + return this; + } + + /** + * optional uint32 Stock = 2; + * @return the stock + */ + public int getStock() { + return stock; + } + + /** + * optional uint32 Stock = 2; + * @param value the stock to set + * @return this + */ + public PackageInfo setStock(final int value) { + bitField0_ |= 0x00000002; + stock = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PackageInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PackageInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PackageInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PackageInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string Id = 1; + * @return this + */ + public PackageInfo clearId() { + bitField0_ &= ~0x00000008; + id.clear(); + return this; + } + + /** + * optional string Id = 1; + * @return the id + */ + public String getId() { + return id.getString(); + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for reading + */ + public Utf8String getIdBytes() { + return this.id; + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for modifications + */ + public Utf8String getMutableIdBytes() { + bitField0_ |= 0x00000008; + return this.id; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public PackageInfo setId(final CharSequence value) { + bitField0_ |= 0x00000008; + id.copyFrom(value); + return this; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public PackageInfo setId(final Utf8String value) { + bitField0_ |= 0x00000008; + id.copyFrom(value); + return this; + } + + @Override + public PackageInfo copyFrom(final PackageInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + refreshTime = other.refreshTime; + stock = other.stock; + nextPackage.copyFrom(other.nextPackage); + id.copyFrom(other.id); + } + return this; + } + + @Override + public PackageInfo mergeFrom(final PackageInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRefreshTime()) { + setRefreshTime(other.refreshTime); + } + if (other.hasStock()) { + setStock(other.stock); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasId()) { + getMutableIdBytes().copyFrom(other.id); + } + return this; + } + + @Override + public PackageInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + refreshTime = 0L; + stock = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public PackageInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PackageInfo)) { + return false; + } + PackageInfo other = (PackageInfo) o; + return bitField0_ == other.bitField0_ + && (!hasRefreshTime() || refreshTime == other.refreshTime) + && (!hasStock() || stock == other.stock) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasId() || id.equals(other.id)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(stock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(id); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(stock); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(id); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PackageInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // refreshTime + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // stock + stock = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // id + input.readString(id); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.refreshTime, refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.stock, stock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.id, id); + } + output.endObject(); + } + + @Override + public PackageInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 280566824: { + if (input.isAtField(FieldNames.refreshTime)) { + if (!input.trySkipNullValue()) { + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80217846: { + if (input.isAtField(FieldNames.stock)) { + if (!input.trySkipNullValue()) { + stock = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + input.readString(id); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PackageInfo clone() { + return new PackageInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PackageInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PackageInfo(), data).checkInitialized(); + } + + public static PackageInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PackageInfo(), input).checkInitialized(); + } + + public static PackageInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PackageInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating PackageInfo messages + */ + public static MessageFactory getFactory() { + return PackageInfoFactory.INSTANCE; + } + + private enum PackageInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public PackageInfo create() { + return PackageInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName refreshTime = FieldName.forField("RefreshTime"); + + static final FieldName stock = FieldName.forField("Stock"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName id = FieldName.forField("Id"); + } + } + + /** + * Protobuf type {@code MallPackageList} + */ + public static final class MallPackageList extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .PackageInfo List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(PackageInfo.getFactory()); + + private MallPackageList() { + } + + /** + * @return a new empty instance of {@code MallPackageList} + */ + public static MallPackageList newInstance() { + return new MallPackageList(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MallPackageList clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MallPackageList addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MallPackageList addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MallPackageList setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .PackageInfo List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .PackageInfo List = 1; + * @return this + */ + public MallPackageList clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .PackageInfo List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .PackageInfo List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .PackageInfo List = 1; + * @param value the list to add + * @return this + */ + public MallPackageList addList(final PackageInfo value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .PackageInfo List = 1; + * @param values the list to add + * @return this + */ + public MallPackageList addAllList(final PackageInfo... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public MallPackageList copyFrom(final MallPackageList other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public MallPackageList mergeFrom(final MallPackageList other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public MallPackageList clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public MallPackageList clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MallPackageList)) { + return false; + } + MallPackageList other = (MallPackageList) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MallPackageList mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public MallPackageList mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MallPackageList clone() { + return new MallPackageList().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MallPackageList parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MallPackageList(), data).checkInitialized(); + } + + public static MallPackageList parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallPackageList(), input).checkInitialized(); + } + + public static MallPackageList parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallPackageList(), input).checkInitialized(); + } + + /** + * @return factory for creating MallPackageList messages + */ + public static MessageFactory getFactory() { + return MallPackageListFactory.INSTANCE; + } + + private enum MallPackageListFactory implements MessageFactory { + INSTANCE; + + @Override + public MallPackageList create() { + return MallPackageList.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MallPackageOrderOuterClass.java b/src/generated/main/emu/nebula/proto/MallPackageOrderOuterClass.java new file mode 100644 index 0000000..8573826 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallPackageOrderOuterClass.java @@ -0,0 +1,505 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class MallPackageOrderOuterClass { + /** + * Protobuf type {@code MallPackageOrder} + */ + public static final class MallPackageOrder extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 1; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional .OrderInfo Order = 2; + */ + private final MallGemOrder.OrderInfo order = MallGemOrder.OrderInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private MallPackageOrder() { + } + + /** + * @return a new empty instance of {@code MallPackageOrder} + */ + public static MallPackageOrder newInstance() { + return new MallPackageOrder(); + } + + /** + * optional .ChangeInfo Change = 1; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 1; + * @return this + */ + public MallPackageOrder clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 1; + * @param value the change to set + * @return this + */ + public MallPackageOrder setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional .OrderInfo Order = 2; + * @return whether the order field is set + */ + public boolean hasOrder() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .OrderInfo Order = 2; + * @return this + */ + public MallPackageOrder clearOrder() { + bitField0_ &= ~0x00000002; + order.clear(); + return this; + } + + /** + * optional .OrderInfo Order = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableOrder()} if you want to modify it. + * + * @return internal storage object for reading + */ + public MallGemOrder.OrderInfo getOrder() { + return order; + } + + /** + * optional .OrderInfo Order = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public MallGemOrder.OrderInfo getMutableOrder() { + bitField0_ |= 0x00000002; + return order; + } + + /** + * optional .OrderInfo Order = 2; + * @param value the order to set + * @return this + */ + public MallPackageOrder setOrder(final MallGemOrder.OrderInfo value) { + bitField0_ |= 0x00000002; + order.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MallPackageOrder clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MallPackageOrder addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MallPackageOrder addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MallPackageOrder setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public MallPackageOrder copyFrom(final MallPackageOrder other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + order.copyFrom(other.order); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MallPackageOrder mergeFrom(final MallPackageOrder other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasOrder()) { + getMutableOrder().mergeFrom(other.order); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MallPackageOrder clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + order.clear(); + nextPackage.clear(); + return this; + } + + @Override + public MallPackageOrder clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + order.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MallPackageOrder)) { + return false; + } + MallPackageOrder other = (MallPackageOrder) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasOrder() || order.equals(other.order)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(order); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(order); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MallPackageOrder mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // order + input.readMessage(order); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.order, order); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public MallPackageOrder mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 76453678: { + if (input.isAtField(FieldNames.order)) { + if (!input.trySkipNullValue()) { + input.readMessage(order); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MallPackageOrder clone() { + return new MallPackageOrder().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MallPackageOrder parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MallPackageOrder(), data).checkInitialized(); + } + + public static MallPackageOrder parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallPackageOrder(), input).checkInitialized(); + } + + public static MallPackageOrder parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallPackageOrder(), input).checkInitialized(); + } + + /** + * @return factory for creating MallPackageOrder messages + */ + public static MessageFactory getFactory() { + return MallPackageOrderFactory.INSTANCE; + } + + private enum MallPackageOrderFactory implements MessageFactory { + INSTANCE; + + @Override + public MallPackageOrder create() { + return MallPackageOrder.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName order = FieldName.forField("Order"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MallShopList.java b/src/generated/main/emu/nebula/proto/MallShopList.java new file mode 100644 index 0000000..ace244b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallShopList.java @@ -0,0 +1,974 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class MallShopList { + /** + * Protobuf type {@code ProductInfo} + */ + public static final class ProductInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 RefreshTime = 3; + */ + private long refreshTime; + + /** + * optional int32 Stock = 2; + */ + private int stock; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Id = 1; + */ + private final Utf8String id = Utf8String.newEmptyInstance(); + + private ProductInfo() { + } + + /** + * @return a new empty instance of {@code ProductInfo} + */ + public static ProductInfo newInstance() { + return new ProductInfo(); + } + + /** + * optional int64 RefreshTime = 3; + * @return whether the refreshTime field is set + */ + public boolean hasRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 RefreshTime = 3; + * @return this + */ + public ProductInfo clearRefreshTime() { + bitField0_ &= ~0x00000001; + refreshTime = 0L; + return this; + } + + /** + * optional int64 RefreshTime = 3; + * @return the refreshTime + */ + public long getRefreshTime() { + return refreshTime; + } + + /** + * optional int64 RefreshTime = 3; + * @param value the refreshTime to set + * @return this + */ + public ProductInfo setRefreshTime(final long value) { + bitField0_ |= 0x00000001; + refreshTime = value; + return this; + } + + /** + * optional int32 Stock = 2; + * @return whether the stock field is set + */ + public boolean hasStock() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int32 Stock = 2; + * @return this + */ + public ProductInfo clearStock() { + bitField0_ &= ~0x00000002; + stock = 0; + return this; + } + + /** + * optional int32 Stock = 2; + * @return the stock + */ + public int getStock() { + return stock; + } + + /** + * optional int32 Stock = 2; + * @param value the stock to set + * @return this + */ + public ProductInfo setStock(final int value) { + bitField0_ |= 0x00000002; + stock = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ProductInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ProductInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ProductInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ProductInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string Id = 1; + * @return this + */ + public ProductInfo clearId() { + bitField0_ &= ~0x00000008; + id.clear(); + return this; + } + + /** + * optional string Id = 1; + * @return the id + */ + public String getId() { + return id.getString(); + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for reading + */ + public Utf8String getIdBytes() { + return this.id; + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for modifications + */ + public Utf8String getMutableIdBytes() { + bitField0_ |= 0x00000008; + return this.id; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public ProductInfo setId(final CharSequence value) { + bitField0_ |= 0x00000008; + id.copyFrom(value); + return this; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public ProductInfo setId(final Utf8String value) { + bitField0_ |= 0x00000008; + id.copyFrom(value); + return this; + } + + @Override + public ProductInfo copyFrom(final ProductInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + refreshTime = other.refreshTime; + stock = other.stock; + nextPackage.copyFrom(other.nextPackage); + id.copyFrom(other.id); + } + return this; + } + + @Override + public ProductInfo mergeFrom(final ProductInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRefreshTime()) { + setRefreshTime(other.refreshTime); + } + if (other.hasStock()) { + setStock(other.stock); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasId()) { + getMutableIdBytes().copyFrom(other.id); + } + return this; + } + + @Override + public ProductInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + refreshTime = 0L; + stock = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public ProductInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProductInfo)) { + return false; + } + ProductInfo other = (ProductInfo) o; + return bitField0_ == other.bitField0_ + && (!hasRefreshTime() || refreshTime == other.refreshTime) + && (!hasStock() || stock == other.stock) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasId() || id.equals(other.id)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(stock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(id); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(stock); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(id); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProductInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // refreshTime + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // stock + stock = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // id + input.readString(id); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.refreshTime, refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.stock, stock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.id, id); + } + output.endObject(); + } + + @Override + public ProductInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 280566824: { + if (input.isAtField(FieldNames.refreshTime)) { + if (!input.trySkipNullValue()) { + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80217846: { + if (input.isAtField(FieldNames.stock)) { + if (!input.trySkipNullValue()) { + stock = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + input.readString(id); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProductInfo clone() { + return new ProductInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProductInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProductInfo(), data).checkInitialized(); + } + + public static ProductInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProductInfo(), input).checkInitialized(); + } + + public static ProductInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProductInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating ProductInfo messages + */ + public static MessageFactory getFactory() { + return ProductInfoFactory.INSTANCE; + } + + private enum ProductInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public ProductInfo create() { + return ProductInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName refreshTime = FieldName.forField("RefreshTime"); + + static final FieldName stock = FieldName.forField("Stock"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName id = FieldName.forField("Id"); + } + } + + /** + * Protobuf type {@code MallShopProductList} + */ + public static final class MallShopProductList extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ProductInfo List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(ProductInfo.getFactory()); + + private MallShopProductList() { + } + + /** + * @return a new empty instance of {@code MallShopProductList} + */ + public static MallShopProductList newInstance() { + return new MallShopProductList(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MallShopProductList clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MallShopProductList addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MallShopProductList addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MallShopProductList setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ProductInfo List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .ProductInfo List = 1; + * @return this + */ + public MallShopProductList clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .ProductInfo List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .ProductInfo List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .ProductInfo List = 1; + * @param value the list to add + * @return this + */ + public MallShopProductList addList(final ProductInfo value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .ProductInfo List = 1; + * @param values the list to add + * @return this + */ + public MallShopProductList addAllList(final ProductInfo... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public MallShopProductList copyFrom(final MallShopProductList other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public MallShopProductList mergeFrom(final MallShopProductList other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public MallShopProductList clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public MallShopProductList clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MallShopProductList)) { + return false; + } + MallShopProductList other = (MallShopProductList) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MallShopProductList mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public MallShopProductList mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MallShopProductList clone() { + return new MallShopProductList().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MallShopProductList parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MallShopProductList(), data).checkInitialized(); + } + + public static MallShopProductList parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallShopProductList(), input).checkInitialized(); + } + + public static MallShopProductList parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallShopProductList(), input).checkInitialized(); + } + + /** + * @return factory for creating MallShopProductList messages + */ + public static MessageFactory getFactory() { + return MallShopProductListFactory.INSTANCE; + } + + private enum MallShopProductListFactory implements MessageFactory { + INSTANCE; + + @Override + public MallShopProductList create() { + return MallShopProductList.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/MallShopOrder.java b/src/generated/main/emu/nebula/proto/MallShopOrder.java new file mode 100644 index 0000000..f6a334d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/MallShopOrder.java @@ -0,0 +1,493 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class MallShopOrder { + /** + * Protobuf type {@code MallShopOrderReq} + */ + public static final class MallShopOrderReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Qty = 2; + */ + private int qty; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Id = 1; + */ + private final Utf8String id = Utf8String.newEmptyInstance(); + + private MallShopOrderReq() { + } + + /** + * @return a new empty instance of {@code MallShopOrderReq} + */ + public static MallShopOrderReq newInstance() { + return new MallShopOrderReq(); + } + + /** + * optional uint32 Qty = 2; + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Qty = 2; + * @return this + */ + public MallShopOrderReq clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * optional uint32 Qty = 2; + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * optional uint32 Qty = 2; + * @param value the qty to set + * @return this + */ + public MallShopOrderReq setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MallShopOrderReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MallShopOrderReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MallShopOrderReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MallShopOrderReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Id = 1; + * @return this + */ + public MallShopOrderReq clearId() { + bitField0_ &= ~0x00000004; + id.clear(); + return this; + } + + /** + * optional string Id = 1; + * @return the id + */ + public String getId() { + return id.getString(); + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for reading + */ + public Utf8String getIdBytes() { + return this.id; + } + + /** + * optional string Id = 1; + * @return internal {@code Utf8String} representation of id for modifications + */ + public Utf8String getMutableIdBytes() { + bitField0_ |= 0x00000004; + return this.id; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public MallShopOrderReq setId(final CharSequence value) { + bitField0_ |= 0x00000004; + id.copyFrom(value); + return this; + } + + /** + * optional string Id = 1; + * @param value the id to set + * @return this + */ + public MallShopOrderReq setId(final Utf8String value) { + bitField0_ |= 0x00000004; + id.copyFrom(value); + return this; + } + + @Override + public MallShopOrderReq copyFrom(final MallShopOrderReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + nextPackage.copyFrom(other.nextPackage); + id.copyFrom(other.id); + } + return this; + } + + @Override + public MallShopOrderReq mergeFrom(final MallShopOrderReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasId()) { + getMutableIdBytes().copyFrom(other.id); + } + return this; + } + + @Override + public MallShopOrderReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public MallShopOrderReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + id.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MallShopOrderReq)) { + return false; + } + MallShopOrderReq other = (MallShopOrderReq) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasId() || id.equals(other.id)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(id); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(id); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MallShopOrderReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // id + input.readString(id); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.id, id); + } + output.endObject(); + } + + @Override + public MallShopOrderReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + input.readString(id); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MallShopOrderReq clone() { + return new MallShopOrderReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MallShopOrderReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MallShopOrderReq(), data).checkInitialized(); + } + + public static MallShopOrderReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallShopOrderReq(), input).checkInitialized(); + } + + public static MallShopOrderReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallShopOrderReq(), input).checkInitialized(); + } + + /** + * @return factory for creating MallShopOrderReq messages + */ + public static MessageFactory getFactory() { + return MallShopOrderReqFactory.INSTANCE; + } + + private enum MallShopOrderReqFactory implements MessageFactory { + INSTANCE; + + @Override + public MallShopOrderReq create() { + return MallShopOrderReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName id = FieldName.forField("Id"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/Notify.java b/src/generated/main/emu/nebula/proto/Notify.java new file mode 100644 index 0000000..a1a4e1a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/Notify.java @@ -0,0 +1,8063 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class Notify { + /** + * Protobuf type {@code NewAgent} + */ + public static final class NewAgent extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Ids = 1; + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + private NewAgent() { + } + + /** + * @return a new empty instance of {@code NewAgent} + */ + public static NewAgent newInstance() { + return new NewAgent(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public NewAgent clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public NewAgent addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public NewAgent addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public NewAgent setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Ids = 1; + * @return this + */ + public NewAgent clearIds() { + bitField0_ &= ~0x00000002; + ids.clear(); + return this; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000002; + return ids; + } + + /** + * repeated uint32 Ids = 1; + * @param value the ids to add + * @return this + */ + public NewAgent addIds(final int value) { + bitField0_ |= 0x00000002; + ids.add(value); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @param values the ids to add + * @return this + */ + public NewAgent addAllIds(final int... values) { + bitField0_ |= 0x00000002; + ids.addAll(values); + return this; + } + + @Override + public NewAgent copyFrom(final NewAgent other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + } + return this; + } + + @Override + public NewAgent mergeFrom(final NewAgent other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + return this; + } + + @Override + public NewAgent clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public NewAgent clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NewAgent)) { + return false; + } + NewAgent other = (NewAgent) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NewAgent mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + output.endObject(); + } + + @Override + public NewAgent mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NewAgent clone() { + return new NewAgent().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NewAgent parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NewAgent(), data).checkInitialized(); + } + + public static NewAgent parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NewAgent(), input).checkInitialized(); + } + + public static NewAgent parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NewAgent(), input).checkInitialized(); + } + + /** + * @return factory for creating NewAgent messages + */ + public static MessageFactory getFactory() { + return NewAgentFactory.INSTANCE; + } + + private enum NewAgentFactory implements MessageFactory { + INSTANCE; + + @Override + public NewAgent create() { + return NewAgent.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + } + } + + /** + * Protobuf type {@code SigninRewardUpdate} + */ + public static final class SigninRewardUpdate extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Index = 1; + */ + private int index; + + /** + * optional bool Switch = 6; + */ + private boolean switch_; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SigninRewardUpdate() { + } + + /** + * @return a new empty instance of {@code SigninRewardUpdate} + */ + public static SigninRewardUpdate newInstance() { + return new SigninRewardUpdate(); + } + + /** + * optional uint32 Index = 1; + * @return whether the index field is set + */ + public boolean hasIndex() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Index = 1; + * @return this + */ + public SigninRewardUpdate clearIndex() { + bitField0_ &= ~0x00000001; + index = 0; + return this; + } + + /** + * optional uint32 Index = 1; + * @return the index + */ + public int getIndex() { + return index; + } + + /** + * optional uint32 Index = 1; + * @param value the index to set + * @return this + */ + public SigninRewardUpdate setIndex(final int value) { + bitField0_ |= 0x00000001; + index = value; + return this; + } + + /** + * optional bool Switch = 6; + * @return whether the switch_ field is set + */ + public boolean hasSwitch() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bool Switch = 6; + * @return this + */ + public SigninRewardUpdate clearSwitch() { + bitField0_ &= ~0x00000002; + switch_ = false; + return this; + } + + /** + * optional bool Switch = 6; + * @return the switch_ + */ + public boolean getSwitch() { + return switch_; + } + + /** + * optional bool Switch = 6; + * @param value the switch_ to set + * @return this + */ + public SigninRewardUpdate setSwitch(final boolean value) { + bitField0_ |= 0x00000002; + switch_ = value; + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public SigninRewardUpdate clearChange() { + bitField0_ &= ~0x00000004; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000004; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public SigninRewardUpdate setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000004; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public SigninRewardUpdate clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public SigninRewardUpdate addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public SigninRewardUpdate addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public SigninRewardUpdate setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SigninRewardUpdate copyFrom(final SigninRewardUpdate other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + index = other.index; + switch_ = other.switch_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SigninRewardUpdate mergeFrom(final SigninRewardUpdate other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasIndex()) { + setIndex(other.index); + } + if (other.hasSwitch()) { + setSwitch(other.switch_); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SigninRewardUpdate clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + index = 0; + switch_ = false; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public SigninRewardUpdate clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SigninRewardUpdate)) { + return false; + } + SigninRewardUpdate other = (SigninRewardUpdate) o; + return bitField0_ == other.bitField0_ + && (!hasIndex() || index == other.index) + && (!hasSwitch() || switch_ == other.switch_) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 48); + output.writeBoolNoTag(switch_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SigninRewardUpdate mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // index + index = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // switch_ + switch_ = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.index, index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.switch_, switch_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SigninRewardUpdate mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70793394: { + if (input.isAtField(FieldNames.index)) { + if (!input.trySkipNullValue()) { + index = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1805606060: { + if (input.isAtField(FieldNames.switch_)) { + if (!input.trySkipNullValue()) { + switch_ = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SigninRewardUpdate clone() { + return new SigninRewardUpdate().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SigninRewardUpdate parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SigninRewardUpdate(), data).checkInitialized(); + } + + public static SigninRewardUpdate parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SigninRewardUpdate(), input).checkInitialized(); + } + + public static SigninRewardUpdate parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SigninRewardUpdate(), input).checkInitialized(); + } + + /** + * @return factory for creating SigninRewardUpdate messages + */ + public static MessageFactory getFactory() { + return SigninRewardUpdateFactory.INSTANCE; + } + + private enum SigninRewardUpdateFactory implements MessageFactory { + INSTANCE; + + @Override + public SigninRewardUpdate create() { + return SigninRewardUpdate.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName index = FieldName.forField("Index"); + + static final FieldName switch_ = FieldName.forField("Switch"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code OrderStateChange} + */ + public static final class OrderStateChange extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Store = 2; + */ + private int store; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string OrderId = 1; + */ + private final Utf8String orderId = Utf8String.newEmptyInstance(); + + private OrderStateChange() { + } + + /** + * @return a new empty instance of {@code OrderStateChange} + */ + public static OrderStateChange newInstance() { + return new OrderStateChange(); + } + + /** + * optional uint32 Store = 2; + * @return whether the store field is set + */ + public boolean hasStore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Store = 2; + * @return this + */ + public OrderStateChange clearStore() { + bitField0_ &= ~0x00000001; + store = 0; + return this; + } + + /** + * optional uint32 Store = 2; + * @return the store + */ + public int getStore() { + return store; + } + + /** + * optional uint32 Store = 2; + * @param value the store to set + * @return this + */ + public OrderStateChange setStore(final int value) { + bitField0_ |= 0x00000001; + store = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public OrderStateChange clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public OrderStateChange addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public OrderStateChange addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public OrderStateChange setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string OrderId = 1; + * @return whether the orderId field is set + */ + public boolean hasOrderId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string OrderId = 1; + * @return this + */ + public OrderStateChange clearOrderId() { + bitField0_ &= ~0x00000004; + orderId.clear(); + return this; + } + + /** + * optional string OrderId = 1; + * @return the orderId + */ + public String getOrderId() { + return orderId.getString(); + } + + /** + * optional string OrderId = 1; + * @return internal {@code Utf8String} representation of orderId for reading + */ + public Utf8String getOrderIdBytes() { + return this.orderId; + } + + /** + * optional string OrderId = 1; + * @return internal {@code Utf8String} representation of orderId for modifications + */ + public Utf8String getMutableOrderIdBytes() { + bitField0_ |= 0x00000004; + return this.orderId; + } + + /** + * optional string OrderId = 1; + * @param value the orderId to set + * @return this + */ + public OrderStateChange setOrderId(final CharSequence value) { + bitField0_ |= 0x00000004; + orderId.copyFrom(value); + return this; + } + + /** + * optional string OrderId = 1; + * @param value the orderId to set + * @return this + */ + public OrderStateChange setOrderId(final Utf8String value) { + bitField0_ |= 0x00000004; + orderId.copyFrom(value); + return this; + } + + @Override + public OrderStateChange copyFrom(final OrderStateChange other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + store = other.store; + nextPackage.copyFrom(other.nextPackage); + orderId.copyFrom(other.orderId); + } + return this; + } + + @Override + public OrderStateChange mergeFrom(final OrderStateChange other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStore()) { + setStore(other.store); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasOrderId()) { + getMutableOrderIdBytes().copyFrom(other.orderId); + } + return this; + } + + @Override + public OrderStateChange clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + store = 0; + nextPackage.clear(); + orderId.clear(); + return this; + } + + @Override + public OrderStateChange clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + orderId.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof OrderStateChange)) { + return false; + } + OrderStateChange other = (OrderStateChange) o; + return bitField0_ == other.bitField0_ + && (!hasStore() || store == other.store) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasOrderId() || orderId.equals(other.orderId)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(store); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(orderId); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(store); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(orderId); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public OrderStateChange mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // store + store = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // orderId + input.readString(orderId); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.store, store); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.orderId, orderId); + } + output.endObject(); + } + + @Override + public OrderStateChange mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 80218305: { + if (input.isAtField(FieldNames.store)) { + if (!input.trySkipNullValue()) { + store = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 457542889: { + if (input.isAtField(FieldNames.orderId)) { + if (!input.trySkipNullValue()) { + input.readString(orderId); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public OrderStateChange clone() { + return new OrderStateChange().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static OrderStateChange parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new OrderStateChange(), data).checkInitialized(); + } + + public static OrderStateChange parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new OrderStateChange(), input).checkInitialized(); + } + + public static OrderStateChange parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new OrderStateChange(), input).checkInitialized(); + } + + /** + * @return factory for creating OrderStateChange messages + */ + public static MessageFactory getFactory() { + return OrderStateChangeFactory.INSTANCE; + } + + private enum OrderStateChangeFactory implements MessageFactory { + INSTANCE; + + @Override + public OrderStateChange create() { + return OrderStateChange.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName store = FieldName.forField("Store"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName orderId = FieldName.forField("OrderId"); + } + } + + /** + * Protobuf type {@code StarTowerBookPotentialChange} + */ + public static final class StarTowerBookPotentialChange extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 CharIds = 2; + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated .StarTowerBookCharPotential CharPotentials = 1; + */ + private final RepeatedMessage charPotentials = RepeatedMessage.newEmptyInstance(PublicStarTower.StarTowerBookCharPotential.getFactory()); + + private StarTowerBookPotentialChange() { + } + + /** + * @return a new empty instance of {@code StarTowerBookPotentialChange} + */ + public static StarTowerBookPotentialChange newInstance() { + return new StarTowerBookPotentialChange(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public StarTowerBookPotentialChange clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookPotentialChange addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookPotentialChange addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookPotentialChange setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 CharIds = 2; + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 CharIds = 2; + * @return this + */ + public StarTowerBookPotentialChange clearCharIds() { + bitField0_ &= ~0x00000002; + charIds.clear(); + return this; + } + + /** + * repeated uint32 CharIds = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * repeated uint32 CharIds = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000002; + return charIds; + } + + /** + * repeated uint32 CharIds = 2; + * @param value the charIds to add + * @return this + */ + public StarTowerBookPotentialChange addCharIds(final int value) { + bitField0_ |= 0x00000002; + charIds.add(value); + return this; + } + + /** + * repeated uint32 CharIds = 2; + * @param values the charIds to add + * @return this + */ + public StarTowerBookPotentialChange addAllCharIds(final int... values) { + bitField0_ |= 0x00000002; + charIds.addAll(values); + return this; + } + + /** + * repeated .StarTowerBookCharPotential CharPotentials = 1; + * @return whether the charPotentials field is set + */ + public boolean hasCharPotentials() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .StarTowerBookCharPotential CharPotentials = 1; + * @return this + */ + public StarTowerBookPotentialChange clearCharPotentials() { + bitField0_ &= ~0x00000004; + charPotentials.clear(); + return this; + } + + /** + * repeated .StarTowerBookCharPotential CharPotentials = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharPotentials()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCharPotentials() { + return charPotentials; + } + + /** + * repeated .StarTowerBookCharPotential CharPotentials = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCharPotentials() { + bitField0_ |= 0x00000004; + return charPotentials; + } + + /** + * repeated .StarTowerBookCharPotential CharPotentials = 1; + * @param value the charPotentials to add + * @return this + */ + public StarTowerBookPotentialChange addCharPotentials( + final PublicStarTower.StarTowerBookCharPotential value) { + bitField0_ |= 0x00000004; + charPotentials.add(value); + return this; + } + + /** + * repeated .StarTowerBookCharPotential CharPotentials = 1; + * @param values the charPotentials to add + * @return this + */ + public StarTowerBookPotentialChange addAllCharPotentials( + final PublicStarTower.StarTowerBookCharPotential... values) { + bitField0_ |= 0x00000004; + charPotentials.addAll(values); + return this; + } + + @Override + public StarTowerBookPotentialChange copyFrom(final StarTowerBookPotentialChange other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + charPotentials.copyFrom(other.charPotentials); + } + return this; + } + + @Override + public StarTowerBookPotentialChange mergeFrom(final StarTowerBookPotentialChange other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + if (other.hasCharPotentials()) { + getMutableCharPotentials().addAll(other.charPotentials); + } + return this; + } + + @Override + public StarTowerBookPotentialChange clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + charPotentials.clear(); + return this; + } + + @Override + public StarTowerBookPotentialChange clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + charPotentials.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookPotentialChange)) { + return false; + } + StarTowerBookPotentialChange other = (StarTowerBookPotentialChange) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)) + && (!hasCharPotentials() || charPotentials.equals(other.charPotentials)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < charPotentials.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(charPotentials.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * charPotentials.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charPotentials); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookPotentialChange mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // charPotentials + tag = input.readRepeatedMessage(charPotentials, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.charPotentials, charPotentials); + } + output.endObject(); + } + + @Override + public StarTowerBookPotentialChange mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1909208021: { + if (input.isAtField(FieldNames.charPotentials)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charPotentials); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookPotentialChange clone() { + return new StarTowerBookPotentialChange().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookPotentialChange parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialChange(), data).checkInitialized(); + } + + public static StarTowerBookPotentialChange parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialChange(), input).checkInitialized(); + } + + public static StarTowerBookPotentialChange parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialChange(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookPotentialChange messages + */ + public static MessageFactory getFactory() { + return StarTowerBookPotentialChangeFactory.INSTANCE; + } + + private enum StarTowerBookPotentialChangeFactory implements MessageFactory { + INSTANCE; + + @Override + public StarTowerBookPotentialChange create() { + return StarTowerBookPotentialChange.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + + static final FieldName charPotentials = FieldName.forField("CharPotentials"); + } + } + + /** + * Protobuf type {@code StarTowerBookEventChange} + */ + public static final class StarTowerBookEventChange extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 EventIds = 1; + */ + private final RepeatedInt eventIds = RepeatedInt.newEmptyInstance(); + + private StarTowerBookEventChange() { + } + + /** + * @return a new empty instance of {@code StarTowerBookEventChange} + */ + public static StarTowerBookEventChange newInstance() { + return new StarTowerBookEventChange(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public StarTowerBookEventChange clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookEventChange addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookEventChange addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookEventChange setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 EventIds = 1; + * @return whether the eventIds field is set + */ + public boolean hasEventIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 EventIds = 1; + * @return this + */ + public StarTowerBookEventChange clearEventIds() { + bitField0_ &= ~0x00000002; + eventIds.clear(); + return this; + } + + /** + * repeated uint32 EventIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEventIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getEventIds() { + return eventIds; + } + + /** + * repeated uint32 EventIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableEventIds() { + bitField0_ |= 0x00000002; + return eventIds; + } + + /** + * repeated uint32 EventIds = 1; + * @param value the eventIds to add + * @return this + */ + public StarTowerBookEventChange addEventIds(final int value) { + bitField0_ |= 0x00000002; + eventIds.add(value); + return this; + } + + /** + * repeated uint32 EventIds = 1; + * @param values the eventIds to add + * @return this + */ + public StarTowerBookEventChange addAllEventIds(final int... values) { + bitField0_ |= 0x00000002; + eventIds.addAll(values); + return this; + } + + @Override + public StarTowerBookEventChange copyFrom(final StarTowerBookEventChange other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + eventIds.copyFrom(other.eventIds); + } + return this; + } + + @Override + public StarTowerBookEventChange mergeFrom(final StarTowerBookEventChange other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEventIds()) { + getMutableEventIds().addAll(other.eventIds); + } + return this; + } + + @Override + public StarTowerBookEventChange clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + eventIds.clear(); + return this; + } + + @Override + public StarTowerBookEventChange clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + eventIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookEventChange)) { + return false; + } + StarTowerBookEventChange other = (StarTowerBookEventChange) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEventIds() || eventIds.equals(other.eventIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < eventIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(eventIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * eventIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(eventIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookEventChange mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // eventIds [packed=true] + input.readPackedUInt32(eventIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // eventIds [packed=false] + tag = input.readRepeatedUInt32(eventIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.eventIds, eventIds); + } + output.endObject(); + } + + @Override + public StarTowerBookEventChange mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 342741470: { + if (input.isAtField(FieldNames.eventIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(eventIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookEventChange clone() { + return new StarTowerBookEventChange().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookEventChange parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookEventChange(), data).checkInitialized(); + } + + public static StarTowerBookEventChange parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookEventChange(), input).checkInitialized(); + } + + public static StarTowerBookEventChange parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookEventChange(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookEventChange messages + */ + public static MessageFactory getFactory() { + return StarTowerBookEventChangeFactory.INSTANCE; + } + + private enum StarTowerBookEventChangeFactory implements MessageFactory { + INSTANCE; + + @Override + public StarTowerBookEventChange create() { + return StarTowerBookEventChange.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName eventIds = FieldName.forField("EventIds"); + } + } + + /** + * Protobuf type {@code Skin} + */ + public static final class Skin extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .UI32 New = 1; + */ + private final Public.UI32 new_ = Public.UI32.newInstance(); + + /** + * optional .Skin.Transform Duplicated = 2; + */ + private final Transform duplicated = Transform.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Skin() { + } + + /** + * @return a new empty instance of {@code Skin} + */ + public static Skin newInstance() { + return new Skin(); + } + + /** + * optional .UI32 New = 1; + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .UI32 New = 1; + * @return this + */ + public Skin clearNew() { + bitField0_ &= ~0x00000001; + new_.clear(); + return this; + } + + /** + * optional .UI32 New = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNew()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.UI32 getNew() { + return new_; + } + + /** + * optional .UI32 New = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.UI32 getMutableNew() { + bitField0_ |= 0x00000001; + return new_; + } + + /** + * optional .UI32 New = 1; + * @param value the new_ to set + * @return this + */ + public Skin setNew(final Public.UI32 value) { + bitField0_ |= 0x00000001; + new_.copyFrom(value); + return this; + } + + /** + * optional .Skin.Transform Duplicated = 2; + * @return whether the duplicated field is set + */ + public boolean hasDuplicated() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .Skin.Transform Duplicated = 2; + * @return this + */ + public Skin clearDuplicated() { + bitField0_ &= ~0x00000002; + duplicated.clear(); + return this; + } + + /** + * optional .Skin.Transform Duplicated = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDuplicated()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Transform getDuplicated() { + return duplicated; + } + + /** + * optional .Skin.Transform Duplicated = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Transform getMutableDuplicated() { + bitField0_ |= 0x00000002; + return duplicated; + } + + /** + * optional .Skin.Transform Duplicated = 2; + * @param value the duplicated to set + * @return this + */ + public Skin setDuplicated(final Transform value) { + bitField0_ |= 0x00000002; + duplicated.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Skin clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Skin addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Skin addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Skin setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Skin copyFrom(final Skin other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + new_.copyFrom(other.new_); + duplicated.copyFrom(other.duplicated); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Skin mergeFrom(final Skin other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNew()) { + getMutableNew().mergeFrom(other.new_); + } + if (other.hasDuplicated()) { + getMutableDuplicated().mergeFrom(other.duplicated); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Skin clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + new_.clear(); + duplicated.clear(); + nextPackage.clear(); + return this; + } + + @Override + public Skin clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + new_.clearQuick(); + duplicated.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Skin)) { + return false; + } + Skin other = (Skin) o; + return bitField0_ == other.bitField0_ + && (!hasNew() || new_.equals(other.new_)) + && (!hasDuplicated() || duplicated.equals(other.duplicated)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(duplicated); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(new_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(duplicated); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Skin mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // new_ + input.readMessage(new_); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // duplicated + input.readMessage(duplicated); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.duplicated, duplicated); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Skin mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + input.readMessage(new_); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 591081689: { + if (input.isAtField(FieldNames.duplicated)) { + if (!input.trySkipNullValue()) { + input.readMessage(duplicated); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Skin clone() { + return new Skin().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Skin parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Skin(), data).checkInitialized(); + } + + public static Skin parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Skin(), input).checkInitialized(); + } + + public static Skin parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Skin(), input).checkInitialized(); + } + + /** + * @return factory for creating Skin messages + */ + public static MessageFactory getFactory() { + return SkinFactory.INSTANCE; + } + + /** + * Protobuf type {@code Transform} + */ + public static final class Transform extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ID = 1; + */ + private int iD; + + /** + * repeated .ItemTpl Items = 2; + */ + private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private Transform() { + } + + /** + * @return a new empty instance of {@code Transform} + */ + public static Transform newInstance() { + return new Transform(); + } + + /** + * optional uint32 ID = 1; + * @return whether the iD field is set + */ + public boolean hasID() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ID = 1; + * @return this + */ + public Transform clearID() { + bitField0_ &= ~0x00000001; + iD = 0; + return this; + } + + /** + * optional uint32 ID = 1; + * @return the iD + */ + public int getID() { + return iD; + } + + /** + * optional uint32 ID = 1; + * @param value the iD to set + * @return this + */ + public Transform setID(final int value) { + bitField0_ |= 0x00000001; + iD = value; + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .ItemTpl Items = 2; + * @return this + */ + public Transform clearItems() { + bitField0_ &= ~0x00000002; + items.clear(); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getItems() { + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableItems() { + bitField0_ |= 0x00000002; + return items; + } + + /** + * repeated .ItemTpl Items = 2; + * @param value the items to add + * @return this + */ + public Transform addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000002; + items.add(value); + return this; + } + + /** + * repeated .ItemTpl Items = 2; + * @param values the items to add + * @return this + */ + public Transform addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000002; + items.addAll(values); + return this; + } + + @Override + public Transform copyFrom(final Transform other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + iD = other.iD; + items.copyFrom(other.items); + } + return this; + } + + @Override + public Transform mergeFrom(final Transform other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasID()) { + setID(other.iD); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public Transform clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + iD = 0; + items.clear(); + return this; + } + + @Override + public Transform clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Transform)) { + return false; + } + Transform other = (Transform) o; + return bitField0_ == other.bitField0_ + && (!hasID() || iD == other.iD) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(iD); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(iD); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Transform mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // iD + iD = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.iD, iD); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public Transform mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2331: { + if (input.isAtField(FieldNames.iD)) { + if (!input.trySkipNullValue()) { + iD = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Transform clone() { + return new Transform().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Transform parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Transform(), data).checkInitialized(); + } + + public static Transform parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Transform(), input).checkInitialized(); + } + + public static Transform parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Transform(), input).checkInitialized(); + } + + /** + * @return factory for creating Transform messages + */ + public static MessageFactory getFactory() { + return TransformFactory.INSTANCE; + } + + private enum TransformFactory implements MessageFactory { + INSTANCE; + + @Override + public Transform create() { + return Transform.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName iD = FieldName.forField("ID"); + + static final FieldName items = FieldName.forField("Items"); + } + } + + private enum SkinFactory implements MessageFactory { + INSTANCE; + + @Override + public Skin create() { + return Skin.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName duplicated = FieldName.forField("Duplicated"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code SkinChange} + */ + public static final class SkinChange extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional uint32 SkinId = 2; + */ + private int skinId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SkinChange() { + } + + /** + * @return a new empty instance of {@code SkinChange} + */ + public static SkinChange newInstance() { + return new SkinChange(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public SkinChange clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public SkinChange setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional uint32 SkinId = 2; + * @return whether the skinId field is set + */ + public boolean hasSkinId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 SkinId = 2; + * @return this + */ + public SkinChange clearSkinId() { + bitField0_ &= ~0x00000002; + skinId = 0; + return this; + } + + /** + * optional uint32 SkinId = 2; + * @return the skinId + */ + public int getSkinId() { + return skinId; + } + + /** + * optional uint32 SkinId = 2; + * @param value the skinId to set + * @return this + */ + public SkinChange setSkinId(final int value) { + bitField0_ |= 0x00000002; + skinId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public SkinChange clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public SkinChange addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public SkinChange addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public SkinChange setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SkinChange copyFrom(final SkinChange other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + skinId = other.skinId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkinChange mergeFrom(final SkinChange other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasSkinId()) { + setSkinId(other.skinId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkinChange clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + skinId = 0; + nextPackage.clear(); + return this; + } + + @Override + public SkinChange clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkinChange)) { + return false; + } + SkinChange other = (SkinChange) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasSkinId() || skinId == other.skinId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(skinId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skinId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkinChange mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // skinId + skinId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.skinId, skinId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SkinChange mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1816694888: { + if (input.isAtField(FieldNames.skinId)) { + if (!input.trySkipNullValue()) { + skinId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkinChange clone() { + return new SkinChange().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkinChange parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkinChange(), data).checkInitialized(); + } + + public static SkinChange parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkinChange(), input).checkInitialized(); + } + + public static SkinChange parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkinChange(), input).checkInitialized(); + } + + /** + * @return factory for creating SkinChange messages + */ + public static MessageFactory getFactory() { + return SkinChangeFactory.INSTANCE; + } + + private enum SkinChangeFactory implements MessageFactory { + INSTANCE; + + @Override + public SkinChange create() { + return SkinChange.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName skinId = FieldName.forField("SkinId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code MonthlyCardRewards} + */ + public static final class MonthlyCardRewards extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 EndTime = 3; + */ + private long endTime; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Remaining = 5; + */ + private int remaining; + + /** + * optional bool Switch = 6; + */ + private boolean switch_; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Rewards = 4; + */ + private final RepeatedMessage rewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private MonthlyCardRewards() { + } + + /** + * @return a new empty instance of {@code MonthlyCardRewards} + */ + public static MonthlyCardRewards newInstance() { + return new MonthlyCardRewards(); + } + + /** + * optional int64 EndTime = 3; + * @return whether the endTime field is set + */ + public boolean hasEndTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 EndTime = 3; + * @return this + */ + public MonthlyCardRewards clearEndTime() { + bitField0_ &= ~0x00000001; + endTime = 0L; + return this; + } + + /** + * optional int64 EndTime = 3; + * @return the endTime + */ + public long getEndTime() { + return endTime; + } + + /** + * optional int64 EndTime = 3; + * @param value the endTime to set + * @return this + */ + public MonthlyCardRewards setEndTime(final long value) { + bitField0_ |= 0x00000001; + endTime = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public MonthlyCardRewards clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public MonthlyCardRewards setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 Remaining = 5; + * @return whether the remaining field is set + */ + public boolean hasRemaining() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Remaining = 5; + * @return this + */ + public MonthlyCardRewards clearRemaining() { + bitField0_ &= ~0x00000004; + remaining = 0; + return this; + } + + /** + * optional uint32 Remaining = 5; + * @return the remaining + */ + public int getRemaining() { + return remaining; + } + + /** + * optional uint32 Remaining = 5; + * @param value the remaining to set + * @return this + */ + public MonthlyCardRewards setRemaining(final int value) { + bitField0_ |= 0x00000004; + remaining = value; + return this; + } + + /** + * optional bool Switch = 6; + * @return whether the switch_ field is set + */ + public boolean hasSwitch() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bool Switch = 6; + * @return this + */ + public MonthlyCardRewards clearSwitch() { + bitField0_ &= ~0x00000008; + switch_ = false; + return this; + } + + /** + * optional bool Switch = 6; + * @return the switch_ + */ + public boolean getSwitch() { + return switch_; + } + + /** + * optional bool Switch = 6; + * @param value the switch_ to set + * @return this + */ + public MonthlyCardRewards setSwitch(final boolean value) { + bitField0_ |= 0x00000008; + switch_ = value; + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public MonthlyCardRewards clearChange() { + bitField0_ &= ~0x00000010; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000010; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public MonthlyCardRewards setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000010; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MonthlyCardRewards clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MonthlyCardRewards addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MonthlyCardRewards addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MonthlyCardRewards setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Rewards = 4; + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * repeated .ItemTpl Rewards = 4; + * @return this + */ + public MonthlyCardRewards clearRewards() { + bitField0_ &= ~0x00000040; + rewards.clear(); + return this; + } + + /** + * repeated .ItemTpl Rewards = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRewards() { + return rewards; + } + + /** + * repeated .ItemTpl Rewards = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRewards() { + bitField0_ |= 0x00000040; + return rewards; + } + + /** + * repeated .ItemTpl Rewards = 4; + * @param value the rewards to add + * @return this + */ + public MonthlyCardRewards addRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000040; + rewards.add(value); + return this; + } + + /** + * repeated .ItemTpl Rewards = 4; + * @param values the rewards to add + * @return this + */ + public MonthlyCardRewards addAllRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000040; + rewards.addAll(values); + return this; + } + + @Override + public MonthlyCardRewards copyFrom(final MonthlyCardRewards other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + endTime = other.endTime; + id = other.id; + remaining = other.remaining; + switch_ = other.switch_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public MonthlyCardRewards mergeFrom(final MonthlyCardRewards other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEndTime()) { + setEndTime(other.endTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasRemaining()) { + setRemaining(other.remaining); + } + if (other.hasSwitch()) { + setSwitch(other.switch_); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public MonthlyCardRewards clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + endTime = 0L; + id = 0; + remaining = 0; + switch_ = false; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public MonthlyCardRewards clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MonthlyCardRewards)) { + return false; + } + MonthlyCardRewards other = (MonthlyCardRewards) o; + return bitField0_ == other.bitField0_ + && (!hasEndTime() || endTime == other.endTime) + && (!hasId() || id == other.id) + && (!hasRemaining() || remaining == other.remaining) + && (!hasSwitch() || switch_ == other.switch_) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(endTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(remaining); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 48); + output.writeBoolNoTag(switch_); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(endTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(remaining); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MonthlyCardRewards mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // endTime + endTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // remaining + remaining = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // switch_ + switch_ = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000040; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.endTime, endTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.remaining, remaining); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.switch_, switch_); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public MonthlyCardRewards mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 57410088: { + if (input.isAtField(FieldNames.endTime)) { + if (!input.trySkipNullValue()) { + endTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1421161002: { + if (input.isAtField(FieldNames.remaining)) { + if (!input.trySkipNullValue()) { + remaining = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1805606060: { + if (input.isAtField(FieldNames.switch_)) { + if (!input.trySkipNullValue()) { + switch_ = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MonthlyCardRewards clone() { + return new MonthlyCardRewards().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MonthlyCardRewards parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MonthlyCardRewards(), data).checkInitialized(); + } + + public static MonthlyCardRewards parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MonthlyCardRewards(), input).checkInitialized(); + } + + public static MonthlyCardRewards parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MonthlyCardRewards(), input).checkInitialized(); + } + + /** + * @return factory for creating MonthlyCardRewards messages + */ + public static MessageFactory getFactory() { + return MonthlyCardRewardsFactory.INSTANCE; + } + + private enum MonthlyCardRewardsFactory implements MessageFactory { + INSTANCE; + + @Override + public MonthlyCardRewards create() { + return MonthlyCardRewards.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName endTime = FieldName.forField("EndTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName remaining = FieldName.forField("Remaining"); + + static final FieldName switch_ = FieldName.forField("Switch"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } + + /** + * Protobuf type {@code TowerBookFateCardCollectNotify} + */ + public static final class TowerBookFateCardCollectNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Cards = 1; + */ + private final RepeatedInt cards = RepeatedInt.newEmptyInstance(); + + private TowerBookFateCardCollectNotify() { + } + + /** + * @return a new empty instance of {@code TowerBookFateCardCollectNotify} + */ + public static TowerBookFateCardCollectNotify newInstance() { + return new TowerBookFateCardCollectNotify(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public TowerBookFateCardCollectNotify clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public TowerBookFateCardCollectNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public TowerBookFateCardCollectNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public TowerBookFateCardCollectNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Cards = 1; + * @return whether the cards field is set + */ + public boolean hasCards() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Cards = 1; + * @return this + */ + public TowerBookFateCardCollectNotify clearCards() { + bitField0_ &= ~0x00000002; + cards.clear(); + return this; + } + + /** + * repeated uint32 Cards = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCards() { + return cards; + } + + /** + * repeated uint32 Cards = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCards() { + bitField0_ |= 0x00000002; + return cards; + } + + /** + * repeated uint32 Cards = 1; + * @param value the cards to add + * @return this + */ + public TowerBookFateCardCollectNotify addCards(final int value) { + bitField0_ |= 0x00000002; + cards.add(value); + return this; + } + + /** + * repeated uint32 Cards = 1; + * @param values the cards to add + * @return this + */ + public TowerBookFateCardCollectNotify addAllCards(final int... values) { + bitField0_ |= 0x00000002; + cards.addAll(values); + return this; + } + + @Override + public TowerBookFateCardCollectNotify copyFrom(final TowerBookFateCardCollectNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + cards.copyFrom(other.cards); + } + return this; + } + + @Override + public TowerBookFateCardCollectNotify mergeFrom(final TowerBookFateCardCollectNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCards()) { + getMutableCards().addAll(other.cards); + } + return this; + } + + @Override + public TowerBookFateCardCollectNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cards.clear(); + return this; + } + + @Override + public TowerBookFateCardCollectNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cards.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerBookFateCardCollectNotify)) { + return false; + } + TowerBookFateCardCollectNotify other = (TowerBookFateCardCollectNotify) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCards() || cards.equals(other.cards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < cards.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(cards.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * cards.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(cards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerBookFateCardCollectNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // cards [packed=true] + input.readPackedUInt32(cards, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // cards [packed=false] + tag = input.readRepeatedUInt32(cards, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.cards, cards); + } + output.endObject(); + } + + @Override + public TowerBookFateCardCollectNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64878403: { + if (input.isAtField(FieldNames.cards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(cards); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerBookFateCardCollectNotify clone() { + return new TowerBookFateCardCollectNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerBookFateCardCollectNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerBookFateCardCollectNotify(), data).checkInitialized(); + } + + public static TowerBookFateCardCollectNotify parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardCollectNotify(), input).checkInitialized(); + } + + public static TowerBookFateCardCollectNotify parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardCollectNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerBookFateCardCollectNotify messages + */ + public static MessageFactory getFactory() { + return TowerBookFateCardCollectNotifyFactory.INSTANCE; + } + + private enum TowerBookFateCardCollectNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public TowerBookFateCardCollectNotify create() { + return TowerBookFateCardCollectNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cards = FieldName.forField("Cards"); + } + } + + /** + * Protobuf type {@code TowerBookFateCardRewardChangeNotify} + */ + public static final class TowerBookFateCardRewardChangeNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool Option = 2; + */ + private boolean option; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 List = 1; + */ + private final RepeatedInt list = RepeatedInt.newEmptyInstance(); + + private TowerBookFateCardRewardChangeNotify() { + } + + /** + * @return a new empty instance of {@code TowerBookFateCardRewardChangeNotify} + */ + public static TowerBookFateCardRewardChangeNotify newInstance() { + return new TowerBookFateCardRewardChangeNotify(); + } + + /** + * optional bool Option = 2; + * @return whether the option field is set + */ + public boolean hasOption() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool Option = 2; + * @return this + */ + public TowerBookFateCardRewardChangeNotify clearOption() { + bitField0_ &= ~0x00000001; + option = false; + return this; + } + + /** + * optional bool Option = 2; + * @return the option + */ + public boolean getOption() { + return option; + } + + /** + * optional bool Option = 2; + * @param value the option to set + * @return this + */ + public TowerBookFateCardRewardChangeNotify setOption(final boolean value) { + bitField0_ |= 0x00000001; + option = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public TowerBookFateCardRewardChangeNotify clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public TowerBookFateCardRewardChangeNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public TowerBookFateCardRewardChangeNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public TowerBookFateCardRewardChangeNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 List = 1; + * @return this + */ + public TowerBookFateCardRewardChangeNotify clearList() { + bitField0_ &= ~0x00000004; + list.clear(); + return this; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getList() { + return list; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableList() { + bitField0_ |= 0x00000004; + return list; + } + + /** + * repeated uint32 List = 1; + * @param value the list to add + * @return this + */ + public TowerBookFateCardRewardChangeNotify addList(final int value) { + bitField0_ |= 0x00000004; + list.add(value); + return this; + } + + /** + * repeated uint32 List = 1; + * @param values the list to add + * @return this + */ + public TowerBookFateCardRewardChangeNotify addAllList(final int... values) { + bitField0_ |= 0x00000004; + list.addAll(values); + return this; + } + + @Override + public TowerBookFateCardRewardChangeNotify copyFrom( + final TowerBookFateCardRewardChangeNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + option = other.option; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public TowerBookFateCardRewardChangeNotify mergeFrom( + final TowerBookFateCardRewardChangeNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOption()) { + setOption(other.option); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public TowerBookFateCardRewardChangeNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + option = false; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public TowerBookFateCardRewardChangeNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerBookFateCardRewardChangeNotify)) { + return false; + } + TowerBookFateCardRewardChangeNotify other = (TowerBookFateCardRewardChangeNotify) o; + return bitField0_ == other.bitField0_ + && (!hasOption() || option == other.option) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(option); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(list.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerBookFateCardRewardChangeNotify mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // option + option = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list [packed=true] + input.readPackedUInt32(list, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // list [packed=false] + tag = input.readRepeatedUInt32(list, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.option, option); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public TowerBookFateCardRewardChangeNotify mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1926269803: { + if (input.isAtField(FieldNames.option)) { + if (!input.trySkipNullValue()) { + option = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(list); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerBookFateCardRewardChangeNotify clone() { + return new TowerBookFateCardRewardChangeNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerBookFateCardRewardChangeNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerBookFateCardRewardChangeNotify(), data).checkInitialized(); + } + + public static TowerBookFateCardRewardChangeNotify parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardRewardChangeNotify(), input).checkInitialized(); + } + + public static TowerBookFateCardRewardChangeNotify parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardRewardChangeNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerBookFateCardRewardChangeNotify messages + */ + public static MessageFactory getFactory() { + return TowerBookFateCardRewardChangeNotifyFactory.INSTANCE; + } + + private enum TowerBookFateCardRewardChangeNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public TowerBookFateCardRewardChangeNotify create() { + return TowerBookFateCardRewardChangeNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName option = FieldName.forField("Option"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code HonorChangeNotify} + */ + public static final class HonorChangeNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .HonorInfo Honors = 1; + */ + private final RepeatedMessage honors = RepeatedMessage.newEmptyInstance(Public.HonorInfo.getFactory()); + + private HonorChangeNotify() { + } + + /** + * @return a new empty instance of {@code HonorChangeNotify} + */ + public static HonorChangeNotify newInstance() { + return new HonorChangeNotify(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public HonorChangeNotify clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public HonorChangeNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public HonorChangeNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public HonorChangeNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .HonorInfo Honors = 1; + * @return whether the honors field is set + */ + public boolean hasHonors() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .HonorInfo Honors = 1; + * @return this + */ + public HonorChangeNotify clearHonors() { + bitField0_ &= ~0x00000002; + honors.clear(); + return this; + } + + /** + * repeated .HonorInfo Honors = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHonors()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getHonors() { + return honors; + } + + /** + * repeated .HonorInfo Honors = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableHonors() { + bitField0_ |= 0x00000002; + return honors; + } + + /** + * repeated .HonorInfo Honors = 1; + * @param value the honors to add + * @return this + */ + public HonorChangeNotify addHonors(final Public.HonorInfo value) { + bitField0_ |= 0x00000002; + honors.add(value); + return this; + } + + /** + * repeated .HonorInfo Honors = 1; + * @param values the honors to add + * @return this + */ + public HonorChangeNotify addAllHonors(final Public.HonorInfo... values) { + bitField0_ |= 0x00000002; + honors.addAll(values); + return this; + } + + @Override + public HonorChangeNotify copyFrom(final HonorChangeNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + honors.copyFrom(other.honors); + } + return this; + } + + @Override + public HonorChangeNotify mergeFrom(final HonorChangeNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasHonors()) { + getMutableHonors().addAll(other.honors); + } + return this; + } + + @Override + public HonorChangeNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + honors.clear(); + return this; + } + + @Override + public HonorChangeNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + honors.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof HonorChangeNotify)) { + return false; + } + HonorChangeNotify other = (HonorChangeNotify) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasHonors() || honors.equals(other.honors)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < honors.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(honors.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * honors.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(honors); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public HonorChangeNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // honors + tag = input.readRepeatedMessage(honors, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.honors, honors); + } + output.endObject(); + } + + @Override + public HonorChangeNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2127770263: { + if (input.isAtField(FieldNames.honors)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(honors); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public HonorChangeNotify clone() { + return new HonorChangeNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static HonorChangeNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new HonorChangeNotify(), data).checkInitialized(); + } + + public static HonorChangeNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new HonorChangeNotify(), input).checkInitialized(); + } + + public static HonorChangeNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new HonorChangeNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating HonorChangeNotify messages + */ + public static MessageFactory getFactory() { + return HonorChangeNotifyFactory.INSTANCE; + } + + private enum HonorChangeNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public HonorChangeNotify create() { + return HonorChangeNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName honors = FieldName.forField("Honors"); + } + } + + /** + * Protobuf type {@code NoticeChangeNotify} + */ + public static final class NoticeChangeNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 StartTime = 3; + */ + private long startTime; + + /** + * optional int64 EndTime = 4; + */ + private long endTime; + + /** + * optional int32 Interval = 5; + */ + private int interval; + + /** + * optional int32 Duration = 6; + */ + private int duration; + + /** + * optional bool IsStop = 7; + */ + private boolean isStop; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Content = 1; + */ + private final Utf8String content = Utf8String.newEmptyInstance(); + + /** + * repeated int32 Channel = 2; + */ + private final RepeatedInt channel = RepeatedInt.newEmptyInstance(); + + private NoticeChangeNotify() { + } + + /** + * @return a new empty instance of {@code NoticeChangeNotify} + */ + public static NoticeChangeNotify newInstance() { + return new NoticeChangeNotify(); + } + + /** + * optional int64 StartTime = 3; + * @return whether the startTime field is set + */ + public boolean hasStartTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 StartTime = 3; + * @return this + */ + public NoticeChangeNotify clearStartTime() { + bitField0_ &= ~0x00000001; + startTime = 0L; + return this; + } + + /** + * optional int64 StartTime = 3; + * @return the startTime + */ + public long getStartTime() { + return startTime; + } + + /** + * optional int64 StartTime = 3; + * @param value the startTime to set + * @return this + */ + public NoticeChangeNotify setStartTime(final long value) { + bitField0_ |= 0x00000001; + startTime = value; + return this; + } + + /** + * optional int64 EndTime = 4; + * @return whether the endTime field is set + */ + public boolean hasEndTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int64 EndTime = 4; + * @return this + */ + public NoticeChangeNotify clearEndTime() { + bitField0_ &= ~0x00000002; + endTime = 0L; + return this; + } + + /** + * optional int64 EndTime = 4; + * @return the endTime + */ + public long getEndTime() { + return endTime; + } + + /** + * optional int64 EndTime = 4; + * @param value the endTime to set + * @return this + */ + public NoticeChangeNotify setEndTime(final long value) { + bitField0_ |= 0x00000002; + endTime = value; + return this; + } + + /** + * optional int32 Interval = 5; + * @return whether the interval field is set + */ + public boolean hasInterval() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional int32 Interval = 5; + * @return this + */ + public NoticeChangeNotify clearInterval() { + bitField0_ &= ~0x00000004; + interval = 0; + return this; + } + + /** + * optional int32 Interval = 5; + * @return the interval + */ + public int getInterval() { + return interval; + } + + /** + * optional int32 Interval = 5; + * @param value the interval to set + * @return this + */ + public NoticeChangeNotify setInterval(final int value) { + bitField0_ |= 0x00000004; + interval = value; + return this; + } + + /** + * optional int32 Duration = 6; + * @return whether the duration field is set + */ + public boolean hasDuration() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional int32 Duration = 6; + * @return this + */ + public NoticeChangeNotify clearDuration() { + bitField0_ &= ~0x00000008; + duration = 0; + return this; + } + + /** + * optional int32 Duration = 6; + * @return the duration + */ + public int getDuration() { + return duration; + } + + /** + * optional int32 Duration = 6; + * @param value the duration to set + * @return this + */ + public NoticeChangeNotify setDuration(final int value) { + bitField0_ |= 0x00000008; + duration = value; + return this; + } + + /** + * optional bool IsStop = 7; + * @return whether the isStop field is set + */ + public boolean hasIsStop() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bool IsStop = 7; + * @return this + */ + public NoticeChangeNotify clearIsStop() { + bitField0_ &= ~0x00000010; + isStop = false; + return this; + } + + /** + * optional bool IsStop = 7; + * @return the isStop + */ + public boolean getIsStop() { + return isStop; + } + + /** + * optional bool IsStop = 7; + * @param value the isStop to set + * @return this + */ + public NoticeChangeNotify setIsStop(final boolean value) { + bitField0_ |= 0x00000010; + isStop = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public NoticeChangeNotify clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public NoticeChangeNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public NoticeChangeNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public NoticeChangeNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Content = 1; + * @return whether the content field is set + */ + public boolean hasContent() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional string Content = 1; + * @return this + */ + public NoticeChangeNotify clearContent() { + bitField0_ &= ~0x00000040; + content.clear(); + return this; + } + + /** + * optional string Content = 1; + * @return the content + */ + public String getContent() { + return content.getString(); + } + + /** + * optional string Content = 1; + * @return internal {@code Utf8String} representation of content for reading + */ + public Utf8String getContentBytes() { + return this.content; + } + + /** + * optional string Content = 1; + * @return internal {@code Utf8String} representation of content for modifications + */ + public Utf8String getMutableContentBytes() { + bitField0_ |= 0x00000040; + return this.content; + } + + /** + * optional string Content = 1; + * @param value the content to set + * @return this + */ + public NoticeChangeNotify setContent(final CharSequence value) { + bitField0_ |= 0x00000040; + content.copyFrom(value); + return this; + } + + /** + * optional string Content = 1; + * @param value the content to set + * @return this + */ + public NoticeChangeNotify setContent(final Utf8String value) { + bitField0_ |= 0x00000040; + content.copyFrom(value); + return this; + } + + /** + * repeated int32 Channel = 2; + * @return whether the channel field is set + */ + public boolean hasChannel() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * repeated int32 Channel = 2; + * @return this + */ + public NoticeChangeNotify clearChannel() { + bitField0_ &= ~0x00000080; + channel.clear(); + return this; + } + + /** + * repeated int32 Channel = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChannel()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getChannel() { + return channel; + } + + /** + * repeated int32 Channel = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableChannel() { + bitField0_ |= 0x00000080; + return channel; + } + + /** + * repeated int32 Channel = 2; + * @param value the channel to add + * @return this + */ + public NoticeChangeNotify addChannel(final int value) { + bitField0_ |= 0x00000080; + channel.add(value); + return this; + } + + /** + * repeated int32 Channel = 2; + * @param values the channel to add + * @return this + */ + public NoticeChangeNotify addAllChannel(final int... values) { + bitField0_ |= 0x00000080; + channel.addAll(values); + return this; + } + + @Override + public NoticeChangeNotify copyFrom(final NoticeChangeNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + startTime = other.startTime; + endTime = other.endTime; + interval = other.interval; + duration = other.duration; + isStop = other.isStop; + nextPackage.copyFrom(other.nextPackage); + content.copyFrom(other.content); + channel.copyFrom(other.channel); + } + return this; + } + + @Override + public NoticeChangeNotify mergeFrom(final NoticeChangeNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStartTime()) { + setStartTime(other.startTime); + } + if (other.hasEndTime()) { + setEndTime(other.endTime); + } + if (other.hasInterval()) { + setInterval(other.interval); + } + if (other.hasDuration()) { + setDuration(other.duration); + } + if (other.hasIsStop()) { + setIsStop(other.isStop); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasContent()) { + getMutableContentBytes().copyFrom(other.content); + } + if (other.hasChannel()) { + getMutableChannel().addAll(other.channel); + } + return this; + } + + @Override + public NoticeChangeNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + startTime = 0L; + endTime = 0L; + interval = 0; + duration = 0; + isStop = false; + nextPackage.clear(); + content.clear(); + channel.clear(); + return this; + } + + @Override + public NoticeChangeNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + content.clear(); + channel.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NoticeChangeNotify)) { + return false; + } + NoticeChangeNotify other = (NoticeChangeNotify) o; + return bitField0_ == other.bitField0_ + && (!hasStartTime() || startTime == other.startTime) + && (!hasEndTime() || endTime == other.endTime) + && (!hasInterval() || interval == other.interval) + && (!hasDuration() || duration == other.duration) + && (!hasIsStop() || isStop == other.isStop) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasContent() || content.equals(other.content)) + && (!hasChannel() || channel.equals(other.channel)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeInt64NoTag(endTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 40); + output.writeInt32NoTag(interval); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 48); + output.writeInt32NoTag(duration); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(isStop); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(content); + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < channel.length(); i++) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(channel.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(endTime); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(interval); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(duration); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(content); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * channel.length()) + ProtoSink.computeRepeatedInt32SizeNoTag(channel); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NoticeChangeNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // startTime + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // endTime + endTime = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // interval + interval = input.readInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // duration + duration = input.readInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // isStop + isStop = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // content + input.readString(content); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // channel [packed=true] + input.readPackedInt32(channel, tag); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // channel [packed=false] + tag = input.readRepeatedInt32(channel, tag); + bitField0_ |= 0x00000080; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.startTime, startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.endTime, endTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeInt32(FieldNames.interval, interval); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeInt32(FieldNames.duration, duration); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.isStop, isStop); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeString(FieldNames.content, content); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedInt32(FieldNames.channel, channel); + } + output.endObject(); + } + + @Override + public NoticeChangeNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -125326801: { + if (input.isAtField(FieldNames.startTime)) { + if (!input.trySkipNullValue()) { + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 57410088: { + if (input.isAtField(FieldNames.endTime)) { + if (!input.trySkipNullValue()) { + endTime = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 635062501: { + if (input.isAtField(FieldNames.interval)) { + if (!input.trySkipNullValue()) { + interval = input.readInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1927368268: { + if (input.isAtField(FieldNames.duration)) { + if (!input.trySkipNullValue()) { + duration = input.readInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2096246676: { + if (input.isAtField(FieldNames.isStop)) { + if (!input.trySkipNullValue()) { + isStop = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1678783399: { + if (input.isAtField(FieldNames.content)) { + if (!input.trySkipNullValue()) { + input.readString(content); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891363613: { + if (input.isAtField(FieldNames.channel)) { + if (!input.trySkipNullValue()) { + input.readRepeatedInt32(channel); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NoticeChangeNotify clone() { + return new NoticeChangeNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NoticeChangeNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NoticeChangeNotify(), data).checkInitialized(); + } + + public static NoticeChangeNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeChangeNotify(), input).checkInitialized(); + } + + public static NoticeChangeNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeChangeNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating NoticeChangeNotify messages + */ + public static MessageFactory getFactory() { + return NoticeChangeNotifyFactory.INSTANCE; + } + + private enum NoticeChangeNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public NoticeChangeNotify create() { + return NoticeChangeNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName startTime = FieldName.forField("StartTime"); + + static final FieldName endTime = FieldName.forField("EndTime"); + + static final FieldName interval = FieldName.forField("Interval"); + + static final FieldName duration = FieldName.forField("Duration"); + + static final FieldName isStop = FieldName.forField("IsStop"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName content = FieldName.forField("Content"); + + static final FieldName channel = FieldName.forField("Channel"); + } + } + + /** + * Protobuf type {@code PlayerHeadIconChangeNotify} + */ + public static final class PlayerHeadIconChangeNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Set = 1; + */ + private int set; + + /** + * optional uint32 Del = 2; + */ + private int del; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerHeadIconChangeNotify() { + } + + /** + * @return a new empty instance of {@code PlayerHeadIconChangeNotify} + */ + public static PlayerHeadIconChangeNotify newInstance() { + return new PlayerHeadIconChangeNotify(); + } + + /** + * optional uint32 Set = 1; + * @return whether the set field is set + */ + public boolean hasSet() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Set = 1; + * @return this + */ + public PlayerHeadIconChangeNotify clearSet() { + bitField0_ &= ~0x00000001; + set = 0; + return this; + } + + /** + * optional uint32 Set = 1; + * @return the set + */ + public int getSet() { + return set; + } + + /** + * optional uint32 Set = 1; + * @param value the set to set + * @return this + */ + public PlayerHeadIconChangeNotify setSet(final int value) { + bitField0_ |= 0x00000001; + set = value; + return this; + } + + /** + * optional uint32 Del = 2; + * @return whether the del field is set + */ + public boolean hasDel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Del = 2; + * @return this + */ + public PlayerHeadIconChangeNotify clearDel() { + bitField0_ &= ~0x00000002; + del = 0; + return this; + } + + /** + * optional uint32 Del = 2; + * @return the del + */ + public int getDel() { + return del; + } + + /** + * optional uint32 Del = 2; + * @param value the del to set + * @return this + */ + public PlayerHeadIconChangeNotify setDel(final int value) { + bitField0_ |= 0x00000002; + del = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerHeadIconChangeNotify clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerHeadIconChangeNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerHeadIconChangeNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerHeadIconChangeNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerHeadIconChangeNotify copyFrom(final PlayerHeadIconChangeNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + set = other.set; + del = other.del; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerHeadIconChangeNotify mergeFrom(final PlayerHeadIconChangeNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSet()) { + setSet(other.set); + } + if (other.hasDel()) { + setDel(other.del); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerHeadIconChangeNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + set = 0; + del = 0; + nextPackage.clear(); + return this; + } + + @Override + public PlayerHeadIconChangeNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerHeadIconChangeNotify)) { + return false; + } + PlayerHeadIconChangeNotify other = (PlayerHeadIconChangeNotify) o; + return bitField0_ == other.bitField0_ + && (!hasSet() || set == other.set) + && (!hasDel() || del == other.del) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(set); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(del); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(set); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(del); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerHeadIconChangeNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // set + set = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // del + del = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.set, set); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.del, del); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerHeadIconChangeNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 83010: { + if (input.isAtField(FieldNames.set)) { + if (!input.trySkipNullValue()) { + set = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 68587: { + if (input.isAtField(FieldNames.del)) { + if (!input.trySkipNullValue()) { + del = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerHeadIconChangeNotify clone() { + return new PlayerHeadIconChangeNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerHeadIconChangeNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerHeadIconChangeNotify(), data).checkInitialized(); + } + + public static PlayerHeadIconChangeNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHeadIconChangeNotify(), input).checkInitialized(); + } + + public static PlayerHeadIconChangeNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHeadIconChangeNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerHeadIconChangeNotify messages + */ + public static MessageFactory getFactory() { + return PlayerHeadIconChangeNotifyFactory.INSTANCE; + } + + private enum PlayerHeadIconChangeNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerHeadIconChangeNotify create() { + return PlayerHeadIconChangeNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName set = FieldName.forField("Set"); + + static final FieldName del = FieldName.forField("Del"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityMiningEnterLayerNotify} + */ + public static final class ActivityMiningEnterLayerNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .MiningLayer Layer = 1; + */ + private final PublicMining.MiningLayer layer = PublicMining.MiningLayer.newInstance(); + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + */ + private final PublicMining.MiningChangeInfo miningChangeInfo = PublicMining.MiningChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityMiningEnterLayerNotify() { + } + + /** + * @return a new empty instance of {@code ActivityMiningEnterLayerNotify} + */ + public static ActivityMiningEnterLayerNotify newInstance() { + return new ActivityMiningEnterLayerNotify(); + } + + /** + * optional .MiningLayer Layer = 1; + * @return whether the layer field is set + */ + public boolean hasLayer() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .MiningLayer Layer = 1; + * @return this + */ + public ActivityMiningEnterLayerNotify clearLayer() { + bitField0_ &= ~0x00000001; + layer.clear(); + return this; + } + + /** + * optional .MiningLayer Layer = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLayer()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicMining.MiningLayer getLayer() { + return layer; + } + + /** + * optional .MiningLayer Layer = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicMining.MiningLayer getMutableLayer() { + bitField0_ |= 0x00000001; + return layer; + } + + /** + * optional .MiningLayer Layer = 1; + * @param value the layer to set + * @return this + */ + public ActivityMiningEnterLayerNotify setLayer(final PublicMining.MiningLayer value) { + bitField0_ |= 0x00000001; + layer.copyFrom(value); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return whether the miningChangeInfo field is set + */ + public boolean hasMiningChangeInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @return this + */ + public ActivityMiningEnterLayerNotify clearMiningChangeInfo() { + bitField0_ &= ~0x00000002; + miningChangeInfo.clear(); + return this; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMiningChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicMining.MiningChangeInfo getMiningChangeInfo() { + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicMining.MiningChangeInfo getMutableMiningChangeInfo() { + bitField0_ |= 0x00000002; + return miningChangeInfo; + } + + /** + * optional .MiningChangeInfo MiningChangeInfo = 2; + * @param value the miningChangeInfo to set + * @return this + */ + public ActivityMiningEnterLayerNotify setMiningChangeInfo( + final PublicMining.MiningChangeInfo value) { + bitField0_ |= 0x00000002; + miningChangeInfo.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ActivityMiningEnterLayerNotify clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ActivityMiningEnterLayerNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ActivityMiningEnterLayerNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ActivityMiningEnterLayerNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityMiningEnterLayerNotify copyFrom(final ActivityMiningEnterLayerNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + layer.copyFrom(other.layer); + miningChangeInfo.copyFrom(other.miningChangeInfo); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningEnterLayerNotify mergeFrom(final ActivityMiningEnterLayerNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLayer()) { + getMutableLayer().mergeFrom(other.layer); + } + if (other.hasMiningChangeInfo()) { + getMutableMiningChangeInfo().mergeFrom(other.miningChangeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityMiningEnterLayerNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + layer.clear(); + miningChangeInfo.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ActivityMiningEnterLayerNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + layer.clearQuick(); + miningChangeInfo.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMiningEnterLayerNotify)) { + return false; + } + ActivityMiningEnterLayerNotify other = (ActivityMiningEnterLayerNotify) o; + return bitField0_ == other.bitField0_ + && (!hasLayer() || layer.equals(other.layer)) + && (!hasMiningChangeInfo() || miningChangeInfo.equals(other.miningChangeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMiningEnterLayerNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // layer + input.readMessage(layer); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // miningChangeInfo + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.layer, layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.miningChangeInfo, miningChangeInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityMiningEnterLayerNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73196849: { + if (input.isAtField(FieldNames.layer)) { + if (!input.trySkipNullValue()) { + input.readMessage(layer); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1023670002: { + if (input.isAtField(FieldNames.miningChangeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(miningChangeInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMiningEnterLayerNotify clone() { + return new ActivityMiningEnterLayerNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMiningEnterLayerNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMiningEnterLayerNotify(), data).checkInitialized(); + } + + public static ActivityMiningEnterLayerNotify parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningEnterLayerNotify(), input).checkInitialized(); + } + + public static ActivityMiningEnterLayerNotify parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ActivityMiningEnterLayerNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMiningEnterLayerNotify messages + */ + public static MessageFactory getFactory() { + return ActivityMiningEnterLayerNotifyFactory.INSTANCE; + } + + private enum ActivityMiningEnterLayerNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public ActivityMiningEnterLayerNotify create() { + return ActivityMiningEnterLayerNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName layer = FieldName.forField("Layer"); + + static final FieldName miningChangeInfo = FieldName.forField("MiningChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code OrderCollected} + */ + public static final class OrderCollected extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .OrderStateChange Orders = 1; + */ + private final RepeatedMessage orders = RepeatedMessage.newEmptyInstance(OrderStateChange.getFactory()); + + private OrderCollected() { + } + + /** + * @return a new empty instance of {@code OrderCollected} + */ + public static OrderCollected newInstance() { + return new OrderCollected(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public OrderCollected clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public OrderCollected addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public OrderCollected addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public OrderCollected setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .OrderStateChange Orders = 1; + * @return whether the orders field is set + */ + public boolean hasOrders() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .OrderStateChange Orders = 1; + * @return this + */ + public OrderCollected clearOrders() { + bitField0_ &= ~0x00000002; + orders.clear(); + return this; + } + + /** + * repeated .OrderStateChange Orders = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableOrders()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getOrders() { + return orders; + } + + /** + * repeated .OrderStateChange Orders = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableOrders() { + bitField0_ |= 0x00000002; + return orders; + } + + /** + * repeated .OrderStateChange Orders = 1; + * @param value the orders to add + * @return this + */ + public OrderCollected addOrders(final OrderStateChange value) { + bitField0_ |= 0x00000002; + orders.add(value); + return this; + } + + /** + * repeated .OrderStateChange Orders = 1; + * @param values the orders to add + * @return this + */ + public OrderCollected addAllOrders(final OrderStateChange... values) { + bitField0_ |= 0x00000002; + orders.addAll(values); + return this; + } + + @Override + public OrderCollected copyFrom(final OrderCollected other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + orders.copyFrom(other.orders); + } + return this; + } + + @Override + public OrderCollected mergeFrom(final OrderCollected other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasOrders()) { + getMutableOrders().addAll(other.orders); + } + return this; + } + + @Override + public OrderCollected clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + orders.clear(); + return this; + } + + @Override + public OrderCollected clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + orders.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof OrderCollected)) { + return false; + } + OrderCollected other = (OrderCollected) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasOrders() || orders.equals(other.orders)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < orders.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(orders.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * orders.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(orders); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public OrderCollected mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // orders + tag = input.readRepeatedMessage(orders, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.orders, orders); + } + output.endObject(); + } + + @Override + public OrderCollected mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1924903163: { + if (input.isAtField(FieldNames.orders)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(orders); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public OrderCollected clone() { + return new OrderCollected().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static OrderCollected parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new OrderCollected(), data).checkInitialized(); + } + + public static OrderCollected parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new OrderCollected(), input).checkInitialized(); + } + + public static OrderCollected parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new OrderCollected(), input).checkInitialized(); + } + + /** + * @return factory for creating OrderCollected messages + */ + public static MessageFactory getFactory() { + return OrderCollectedFactory.INSTANCE; + } + + private enum OrderCollectedFactory implements MessageFactory { + INSTANCE; + + @Override + public OrderCollected create() { + return OrderCollected.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName orders = FieldName.forField("Orders"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/NotifyGm.java b/src/generated/main/emu/nebula/proto/NotifyGm.java new file mode 100644 index 0000000..55d71a7 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/NotifyGm.java @@ -0,0 +1,10951 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class NotifyGm { + /** + * Protobuf type {@code GmWorldClass} + */ + public static final class GmWorldClass extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 LastExp = 2; + */ + private int lastExp; + + /** + * optional uint32 FinalClass = 1; + */ + private int finalClass; + + /** + * optional uint32 Stage = 3; + */ + private int stage; + + /** + * optional bytes RewardsFlag = 15; + */ + private final RepeatedByte rewardsFlag = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private GmWorldClass() { + } + + /** + * @return a new empty instance of {@code GmWorldClass} + */ + public static GmWorldClass newInstance() { + return new GmWorldClass(); + } + + /** + * optional int32 LastExp = 2; + * @return whether the lastExp field is set + */ + public boolean hasLastExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 LastExp = 2; + * @return this + */ + public GmWorldClass clearLastExp() { + bitField0_ &= ~0x00000001; + lastExp = 0; + return this; + } + + /** + * optional int32 LastExp = 2; + * @return the lastExp + */ + public int getLastExp() { + return lastExp; + } + + /** + * optional int32 LastExp = 2; + * @param value the lastExp to set + * @return this + */ + public GmWorldClass setLastExp(final int value) { + bitField0_ |= 0x00000001; + lastExp = value; + return this; + } + + /** + * optional uint32 FinalClass = 1; + * @return whether the finalClass field is set + */ + public boolean hasFinalClass() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 FinalClass = 1; + * @return this + */ + public GmWorldClass clearFinalClass() { + bitField0_ &= ~0x00000002; + finalClass = 0; + return this; + } + + /** + * optional uint32 FinalClass = 1; + * @return the finalClass + */ + public int getFinalClass() { + return finalClass; + } + + /** + * optional uint32 FinalClass = 1; + * @param value the finalClass to set + * @return this + */ + public GmWorldClass setFinalClass(final int value) { + bitField0_ |= 0x00000002; + finalClass = value; + return this; + } + + /** + * optional uint32 Stage = 3; + * @return whether the stage field is set + */ + public boolean hasStage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Stage = 3; + * @return this + */ + public GmWorldClass clearStage() { + bitField0_ &= ~0x00000004; + stage = 0; + return this; + } + + /** + * optional uint32 Stage = 3; + * @return the stage + */ + public int getStage() { + return stage; + } + + /** + * optional uint32 Stage = 3; + * @param value the stage to set + * @return this + */ + public GmWorldClass setStage(final int value) { + bitField0_ |= 0x00000004; + stage = value; + return this; + } + + /** + * optional bytes RewardsFlag = 15; + * @return whether the rewardsFlag field is set + */ + public boolean hasRewardsFlag() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes RewardsFlag = 15; + * @return this + */ + public GmWorldClass clearRewardsFlag() { + bitField0_ &= ~0x00000008; + rewardsFlag.clear(); + return this; + } + + /** + * optional bytes RewardsFlag = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewardsFlag()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getRewardsFlag() { + return rewardsFlag; + } + + /** + * optional bytes RewardsFlag = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableRewardsFlag() { + bitField0_ |= 0x00000008; + return rewardsFlag; + } + + /** + * optional bytes RewardsFlag = 15; + * @param value the rewardsFlag to add + * @return this + */ + public GmWorldClass addRewardsFlag(final byte value) { + bitField0_ |= 0x00000008; + rewardsFlag.add(value); + return this; + } + + /** + * optional bytes RewardsFlag = 15; + * @param values the rewardsFlag to add + * @return this + */ + public GmWorldClass addAllRewardsFlag(final byte... values) { + bitField0_ |= 0x00000008; + rewardsFlag.addAll(values); + return this; + } + + /** + * optional bytes RewardsFlag = 15; + * @param values the rewardsFlag to set + * @return this + */ + public GmWorldClass setRewardsFlag(final byte... values) { + bitField0_ |= 0x00000008; + rewardsFlag.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmWorldClass clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmWorldClass addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmWorldClass addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmWorldClass setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public GmWorldClass copyFrom(final GmWorldClass other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lastExp = other.lastExp; + finalClass = other.finalClass; + stage = other.stage; + rewardsFlag.copyFrom(other.rewardsFlag); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GmWorldClass mergeFrom(final GmWorldClass other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLastExp()) { + setLastExp(other.lastExp); + } + if (other.hasFinalClass()) { + setFinalClass(other.finalClass); + } + if (other.hasStage()) { + setStage(other.stage); + } + if (other.hasRewardsFlag()) { + getMutableRewardsFlag().copyFrom(other.rewardsFlag); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public GmWorldClass clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lastExp = 0; + finalClass = 0; + stage = 0; + rewardsFlag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public GmWorldClass clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + rewardsFlag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmWorldClass)) { + return false; + } + GmWorldClass other = (GmWorldClass) o; + return bitField0_ == other.bitField0_ + && (!hasLastExp() || lastExp == other.lastExp) + && (!hasFinalClass() || finalClass == other.finalClass) + && (!hasStage() || stage == other.stage) + && (!hasRewardsFlag() || rewardsFlag.equals(other.rewardsFlag)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(lastExp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(finalClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(stage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 122); + output.writeBytesNoTag(rewardsFlag); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(lastExp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(finalClass); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(stage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(rewardsFlag); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmWorldClass mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // lastExp + lastExp = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // finalClass + finalClass = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // stage + stage = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // rewardsFlag + input.readBytes(rewardsFlag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.lastExp, lastExp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.finalClass, finalClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.stage, stage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.rewardsFlag, rewardsFlag); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public GmWorldClass mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1617561479: { + if (input.isAtField(FieldNames.lastExp)) { + if (!input.trySkipNullValue()) { + lastExp = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 106057154: { + if (input.isAtField(FieldNames.finalClass)) { + if (!input.trySkipNullValue()) { + finalClass = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80204510: { + if (input.isAtField(FieldNames.stage)) { + if (!input.trySkipNullValue()) { + stage = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1711439728: { + if (input.isAtField(FieldNames.rewardsFlag)) { + if (!input.trySkipNullValue()) { + input.readBytes(rewardsFlag); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmWorldClass clone() { + return new GmWorldClass().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmWorldClass parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmWorldClass(), data).checkInitialized(); + } + + public static GmWorldClass parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmWorldClass(), input).checkInitialized(); + } + + public static GmWorldClass parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmWorldClass(), input).checkInitialized(); + } + + /** + * @return factory for creating GmWorldClass messages + */ + public static MessageFactory getFactory() { + return GmWorldClassFactory.INSTANCE; + } + + private enum GmWorldClassFactory implements MessageFactory { + INSTANCE; + + @Override + public GmWorldClass create() { + return GmWorldClass.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lastExp = FieldName.forField("LastExp"); + + static final FieldName finalClass = FieldName.forField("FinalClass"); + + static final FieldName stage = FieldName.forField("Stage"); + + static final FieldName rewardsFlag = FieldName.forField("RewardsFlag"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code GmClearAllVampireSurvivor} + */ + public static final class GmClearAllVampireSurvivor extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .VampireSurvivorLevel Records = 1; + */ + private final RepeatedMessage records = RepeatedMessage.newEmptyInstance(Public.VampireSurvivorLevel.getFactory()); + + private GmClearAllVampireSurvivor() { + } + + /** + * @return a new empty instance of {@code GmClearAllVampireSurvivor} + */ + public static GmClearAllVampireSurvivor newInstance() { + return new GmClearAllVampireSurvivor(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllVampireSurvivor clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllVampireSurvivor addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllVampireSurvivor addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllVampireSurvivor setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .VampireSurvivorLevel Records = 1; + * @return whether the records field is set + */ + public boolean hasRecords() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .VampireSurvivorLevel Records = 1; + * @return this + */ + public GmClearAllVampireSurvivor clearRecords() { + bitField0_ &= ~0x00000002; + records.clear(); + return this; + } + + /** + * repeated .VampireSurvivorLevel Records = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecords()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRecords() { + return records; + } + + /** + * repeated .VampireSurvivorLevel Records = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRecords() { + bitField0_ |= 0x00000002; + return records; + } + + /** + * repeated .VampireSurvivorLevel Records = 1; + * @param value the records to add + * @return this + */ + public GmClearAllVampireSurvivor addRecords(final Public.VampireSurvivorLevel value) { + bitField0_ |= 0x00000002; + records.add(value); + return this; + } + + /** + * repeated .VampireSurvivorLevel Records = 1; + * @param values the records to add + * @return this + */ + public GmClearAllVampireSurvivor addAllRecords(final Public.VampireSurvivorLevel... values) { + bitField0_ |= 0x00000002; + records.addAll(values); + return this; + } + + @Override + public GmClearAllVampireSurvivor copyFrom(final GmClearAllVampireSurvivor other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + records.copyFrom(other.records); + } + return this; + } + + @Override + public GmClearAllVampireSurvivor mergeFrom(final GmClearAllVampireSurvivor other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRecords()) { + getMutableRecords().addAll(other.records); + } + return this; + } + + @Override + public GmClearAllVampireSurvivor clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + records.clear(); + return this; + } + + @Override + public GmClearAllVampireSurvivor clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + records.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllVampireSurvivor)) { + return false; + } + GmClearAllVampireSurvivor other = (GmClearAllVampireSurvivor) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRecords() || records.equals(other.records)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < records.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(records.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * records.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(records); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllVampireSurvivor mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // records + tag = input.readRepeatedMessage(records, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.records, records); + } + output.endObject(); + } + + @Override + public GmClearAllVampireSurvivor mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1547717086: { + if (input.isAtField(FieldNames.records)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(records); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllVampireSurvivor clone() { + return new GmClearAllVampireSurvivor().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllVampireSurvivor parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllVampireSurvivor(), data).checkInitialized(); + } + + public static GmClearAllVampireSurvivor parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllVampireSurvivor(), input).checkInitialized(); + } + + public static GmClearAllVampireSurvivor parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllVampireSurvivor(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllVampireSurvivor messages + */ + public static MessageFactory getFactory() { + return GmClearAllVampireSurvivorFactory.INSTANCE; + } + + private enum GmClearAllVampireSurvivorFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllVampireSurvivor create() { + return GmClearAllVampireSurvivor.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName records = FieldName.forField("Records"); + } + } + + /** + * Protobuf type {@code StarTowerSubNoteSkillInfo} + */ + public static final class StarTowerSubNoteSkillInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .StarTowerSubNoteSkillInfo.StageFloorNum SubNoteSkillInfo = 1; + */ + private final RepeatedMessage subNoteSkillInfo = RepeatedMessage.newEmptyInstance(StageFloorNum.getFactory()); + + private StarTowerSubNoteSkillInfo() { + } + + /** + * @return a new empty instance of {@code StarTowerSubNoteSkillInfo} + */ + public static StarTowerSubNoteSkillInfo newInstance() { + return new StarTowerSubNoteSkillInfo(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public StarTowerSubNoteSkillInfo clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public StarTowerSubNoteSkillInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public StarTowerSubNoteSkillInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public StarTowerSubNoteSkillInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.StageFloorNum SubNoteSkillInfo = 1; + * @return whether the subNoteSkillInfo field is set + */ + public boolean hasSubNoteSkillInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.StageFloorNum SubNoteSkillInfo = 1; + * @return this + */ + public StarTowerSubNoteSkillInfo clearSubNoteSkillInfo() { + bitField0_ &= ~0x00000002; + subNoteSkillInfo.clear(); + return this; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.StageFloorNum SubNoteSkillInfo = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSubNoteSkillInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getSubNoteSkillInfo() { + return subNoteSkillInfo; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.StageFloorNum SubNoteSkillInfo = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableSubNoteSkillInfo() { + bitField0_ |= 0x00000002; + return subNoteSkillInfo; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.StageFloorNum SubNoteSkillInfo = 1; + * @param value the subNoteSkillInfo to add + * @return this + */ + public StarTowerSubNoteSkillInfo addSubNoteSkillInfo(final StageFloorNum value) { + bitField0_ |= 0x00000002; + subNoteSkillInfo.add(value); + return this; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.StageFloorNum SubNoteSkillInfo = 1; + * @param values the subNoteSkillInfo to add + * @return this + */ + public StarTowerSubNoteSkillInfo addAllSubNoteSkillInfo(final StageFloorNum... values) { + bitField0_ |= 0x00000002; + subNoteSkillInfo.addAll(values); + return this; + } + + @Override + public StarTowerSubNoteSkillInfo copyFrom(final StarTowerSubNoteSkillInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + subNoteSkillInfo.copyFrom(other.subNoteSkillInfo); + } + return this; + } + + @Override + public StarTowerSubNoteSkillInfo mergeFrom(final StarTowerSubNoteSkillInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSubNoteSkillInfo()) { + getMutableSubNoteSkillInfo().addAll(other.subNoteSkillInfo); + } + return this; + } + + @Override + public StarTowerSubNoteSkillInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + subNoteSkillInfo.clear(); + return this; + } + + @Override + public StarTowerSubNoteSkillInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + subNoteSkillInfo.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerSubNoteSkillInfo)) { + return false; + } + StarTowerSubNoteSkillInfo other = (StarTowerSubNoteSkillInfo) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSubNoteSkillInfo() || subNoteSkillInfo.equals(other.subNoteSkillInfo)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < subNoteSkillInfo.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(subNoteSkillInfo.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * subNoteSkillInfo.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(subNoteSkillInfo); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerSubNoteSkillInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // subNoteSkillInfo + tag = input.readRepeatedMessage(subNoteSkillInfo, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.subNoteSkillInfo, subNoteSkillInfo); + } + output.endObject(); + } + + @Override + public StarTowerSubNoteSkillInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1931686029: { + if (input.isAtField(FieldNames.subNoteSkillInfo)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(subNoteSkillInfo); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerSubNoteSkillInfo clone() { + return new StarTowerSubNoteSkillInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerSubNoteSkillInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerSubNoteSkillInfo(), data).checkInitialized(); + } + + public static StarTowerSubNoteSkillInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerSubNoteSkillInfo(), input).checkInitialized(); + } + + public static StarTowerSubNoteSkillInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerSubNoteSkillInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerSubNoteSkillInfo messages + */ + public static MessageFactory getFactory() { + return StarTowerSubNoteSkillInfoFactory.INSTANCE; + } + + /** + * Protobuf type {@code FloorNum} + */ + public static final class FloorNum extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Floor = 1; + */ + private int floor; + + /** + * optional uint32 Num = 2; + */ + private int num; + + private FloorNum() { + } + + /** + * @return a new empty instance of {@code FloorNum} + */ + public static FloorNum newInstance() { + return new FloorNum(); + } + + /** + * optional uint32 Floor = 1; + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Floor = 1; + * @return this + */ + public FloorNum clearFloor() { + bitField0_ &= ~0x00000001; + floor = 0; + return this; + } + + /** + * optional uint32 Floor = 1; + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * optional uint32 Floor = 1; + * @param value the floor to set + * @return this + */ + public FloorNum setFloor(final int value) { + bitField0_ |= 0x00000001; + floor = value; + return this; + } + + /** + * optional uint32 Num = 2; + * @return whether the num field is set + */ + public boolean hasNum() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Num = 2; + * @return this + */ + public FloorNum clearNum() { + bitField0_ &= ~0x00000002; + num = 0; + return this; + } + + /** + * optional uint32 Num = 2; + * @return the num + */ + public int getNum() { + return num; + } + + /** + * optional uint32 Num = 2; + * @param value the num to set + * @return this + */ + public FloorNum setNum(final int value) { + bitField0_ |= 0x00000002; + num = value; + return this; + } + + @Override + public FloorNum copyFrom(final FloorNum other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + floor = other.floor; + num = other.num; + } + return this; + } + + @Override + public FloorNum mergeFrom(final FloorNum other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasNum()) { + setNum(other.num); + } + return this; + } + + @Override + public FloorNum clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + floor = 0; + num = 0; + return this; + } + + @Override + public FloorNum clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FloorNum)) { + return false; + } + FloorNum other = (FloorNum) o; + return bitField0_ == other.bitField0_ + && (!hasFloor() || floor == other.floor) + && (!hasNum() || num == other.num); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(num); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(num); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FloorNum mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // num + num = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.num, num); + } + output.endObject(); + } + + @Override + public FloorNum mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 78694: { + if (input.isAtField(FieldNames.num)) { + if (!input.trySkipNullValue()) { + num = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FloorNum clone() { + return new FloorNum().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FloorNum parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FloorNum(), data).checkInitialized(); + } + + public static FloorNum parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FloorNum(), input).checkInitialized(); + } + + public static FloorNum parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FloorNum(), input).checkInitialized(); + } + + /** + * @return factory for creating FloorNum messages + */ + public static MessageFactory getFactory() { + return FloorNumFactory.INSTANCE; + } + + private enum FloorNumFactory implements MessageFactory { + INSTANCE; + + @Override + public FloorNum create() { + return FloorNum.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName num = FieldName.forField("Num"); + } + } + + /** + * Protobuf type {@code StageFloorNum} + */ + public static final class StageFloorNum extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 StageId = 1; + */ + private int stageId; + + /** + * repeated .StarTowerSubNoteSkillInfo.FloorNum Infos = 2; + */ + private final RepeatedMessage infos = RepeatedMessage.newEmptyInstance(FloorNum.getFactory()); + + private StageFloorNum() { + } + + /** + * @return a new empty instance of {@code StageFloorNum} + */ + public static StageFloorNum newInstance() { + return new StageFloorNum(); + } + + /** + * optional uint32 StageId = 1; + * @return whether the stageId field is set + */ + public boolean hasStageId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 StageId = 1; + * @return this + */ + public StageFloorNum clearStageId() { + bitField0_ &= ~0x00000001; + stageId = 0; + return this; + } + + /** + * optional uint32 StageId = 1; + * @return the stageId + */ + public int getStageId() { + return stageId; + } + + /** + * optional uint32 StageId = 1; + * @param value the stageId to set + * @return this + */ + public StageFloorNum setStageId(final int value) { + bitField0_ |= 0x00000001; + stageId = value; + return this; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.FloorNum Infos = 2; + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.FloorNum Infos = 2; + * @return this + */ + public StageFloorNum clearInfos() { + bitField0_ &= ~0x00000002; + infos.clear(); + return this; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.FloorNum Infos = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInfos() { + return infos; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.FloorNum Infos = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInfos() { + bitField0_ |= 0x00000002; + return infos; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.FloorNum Infos = 2; + * @param value the infos to add + * @return this + */ + public StageFloorNum addInfos(final FloorNum value) { + bitField0_ |= 0x00000002; + infos.add(value); + return this; + } + + /** + * repeated .StarTowerSubNoteSkillInfo.FloorNum Infos = 2; + * @param values the infos to add + * @return this + */ + public StageFloorNum addAllInfos(final FloorNum... values) { + bitField0_ |= 0x00000002; + infos.addAll(values); + return this; + } + + @Override + public StageFloorNum copyFrom(final StageFloorNum other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + stageId = other.stageId; + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public StageFloorNum mergeFrom(final StageFloorNum other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStageId()) { + setStageId(other.stageId); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public StageFloorNum clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + stageId = 0; + infos.clear(); + return this; + } + + @Override + public StageFloorNum clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StageFloorNum)) { + return false; + } + StageFloorNum other = (StageFloorNum) o; + return bitField0_ == other.bitField0_ + && (!hasStageId() || stageId == other.stageId) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(stageId); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(stageId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StageFloorNum mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // stageId + stageId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.stageId, stageId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public StageFloorNum mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -232874855: { + if (input.isAtField(FieldNames.stageId)) { + if (!input.trySkipNullValue()) { + stageId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StageFloorNum clone() { + return new StageFloorNum().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StageFloorNum parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StageFloorNum(), data).checkInitialized(); + } + + public static StageFloorNum parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StageFloorNum(), input).checkInitialized(); + } + + public static StageFloorNum parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StageFloorNum(), input).checkInitialized(); + } + + /** + * @return factory for creating StageFloorNum messages + */ + public static MessageFactory getFactory() { + return StageFloorNumFactory.INSTANCE; + } + + private enum StageFloorNumFactory implements MessageFactory { + INSTANCE; + + @Override + public StageFloorNum create() { + return StageFloorNum.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName stageId = FieldName.forField("StageId"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + private enum StarTowerSubNoteSkillInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public StarTowerSubNoteSkillInfo create() { + return StarTowerSubNoteSkillInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName subNoteSkillInfo = FieldName.forField("SubNoteSkillInfo"); + } + } + + /** + * Protobuf type {@code AgentInfos} + */ + public static final class AgentInfos extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .AgentInfo Infos = 1; + */ + private final RepeatedMessage infos = RepeatedMessage.newEmptyInstance(Public.AgentInfo.getFactory()); + + private AgentInfos() { + } + + /** + * @return a new empty instance of {@code AgentInfos} + */ + public static AgentInfos newInstance() { + return new AgentInfos(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AgentInfos clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AgentInfos addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AgentInfos addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AgentInfos setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .AgentInfo Infos = 1; + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .AgentInfo Infos = 1; + * @return this + */ + public AgentInfos clearInfos() { + bitField0_ &= ~0x00000002; + infos.clear(); + return this; + } + + /** + * repeated .AgentInfo Infos = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInfos() { + return infos; + } + + /** + * repeated .AgentInfo Infos = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInfos() { + bitField0_ |= 0x00000002; + return infos; + } + + /** + * repeated .AgentInfo Infos = 1; + * @param value the infos to add + * @return this + */ + public AgentInfos addInfos(final Public.AgentInfo value) { + bitField0_ |= 0x00000002; + infos.add(value); + return this; + } + + /** + * repeated .AgentInfo Infos = 1; + * @param values the infos to add + * @return this + */ + public AgentInfos addAllInfos(final Public.AgentInfo... values) { + bitField0_ |= 0x00000002; + infos.addAll(values); + return this; + } + + @Override + public AgentInfos copyFrom(final AgentInfos other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public AgentInfos mergeFrom(final AgentInfos other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public AgentInfos clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clear(); + return this; + } + + @Override + public AgentInfos clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentInfos)) { + return false; + } + AgentInfos other = (AgentInfos) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentInfos mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public AgentInfos mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentInfos clone() { + return new AgentInfos().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentInfos parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentInfos(), data).checkInitialized(); + } + + public static AgentInfos parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentInfos(), input).checkInitialized(); + } + + public static AgentInfos parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentInfos(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentInfos messages + */ + public static MessageFactory getFactory() { + return AgentInfosFactory.INSTANCE; + } + + private enum AgentInfosFactory implements MessageFactory { + INSTANCE; + + @Override + public AgentInfos create() { + return AgentInfos.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code GmClearAllDailyInstance} + */ + public static final class GmClearAllDailyInstance extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .DailyInstance DailyInstances = 1; + */ + private final RepeatedMessage dailyInstances = RepeatedMessage.newEmptyInstance(Public.DailyInstance.getFactory()); + + private GmClearAllDailyInstance() { + } + + /** + * @return a new empty instance of {@code GmClearAllDailyInstance} + */ + public static GmClearAllDailyInstance newInstance() { + return new GmClearAllDailyInstance(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public GmClearAllDailyInstance clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public GmClearAllDailyInstance setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllDailyInstance clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllDailyInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllDailyInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllDailyInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .DailyInstance DailyInstances = 1; + * @return whether the dailyInstances field is set + */ + public boolean hasDailyInstances() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .DailyInstance DailyInstances = 1; + * @return this + */ + public GmClearAllDailyInstance clearDailyInstances() { + bitField0_ &= ~0x00000004; + dailyInstances.clear(); + return this; + } + + /** + * repeated .DailyInstance DailyInstances = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDailyInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getDailyInstances() { + return dailyInstances; + } + + /** + * repeated .DailyInstance DailyInstances = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableDailyInstances() { + bitField0_ |= 0x00000004; + return dailyInstances; + } + + /** + * repeated .DailyInstance DailyInstances = 1; + * @param value the dailyInstances to add + * @return this + */ + public GmClearAllDailyInstance addDailyInstances(final Public.DailyInstance value) { + bitField0_ |= 0x00000004; + dailyInstances.add(value); + return this; + } + + /** + * repeated .DailyInstance DailyInstances = 1; + * @param values the dailyInstances to add + * @return this + */ + public GmClearAllDailyInstance addAllDailyInstances(final Public.DailyInstance... values) { + bitField0_ |= 0x00000004; + dailyInstances.addAll(values); + return this; + } + + @Override + public GmClearAllDailyInstance copyFrom(final GmClearAllDailyInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + dailyInstances.copyFrom(other.dailyInstances); + } + return this; + } + + @Override + public GmClearAllDailyInstance mergeFrom(final GmClearAllDailyInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasDailyInstances()) { + getMutableDailyInstances().addAll(other.dailyInstances); + } + return this; + } + + @Override + public GmClearAllDailyInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + dailyInstances.clear(); + return this; + } + + @Override + public GmClearAllDailyInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + dailyInstances.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllDailyInstance)) { + return false; + } + GmClearAllDailyInstance other = (GmClearAllDailyInstance) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasDailyInstances() || dailyInstances.equals(other.dailyInstances)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < dailyInstances.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(dailyInstances.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * dailyInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dailyInstances); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllDailyInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // dailyInstances + tag = input.readRepeatedMessage(dailyInstances, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.dailyInstances, dailyInstances); + } + output.endObject(); + } + + @Override + public GmClearAllDailyInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1187764357: { + if (input.isAtField(FieldNames.dailyInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(dailyInstances); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllDailyInstance clone() { + return new GmClearAllDailyInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllDailyInstance parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllDailyInstance(), data).checkInitialized(); + } + + public static GmClearAllDailyInstance parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllDailyInstance(), input).checkInitialized(); + } + + public static GmClearAllDailyInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllDailyInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllDailyInstance messages + */ + public static MessageFactory getFactory() { + return GmClearAllDailyInstanceFactory.INSTANCE; + } + + private enum GmClearAllDailyInstanceFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllDailyInstance create() { + return GmClearAllDailyInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName dailyInstances = FieldName.forField("DailyInstances"); + } + } + + /** + * Protobuf type {@code WeekBossLevels} + */ + public static final class WeekBossLevels extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .WeekBossLevel WeekBossLevels = 1; + */ + private final RepeatedMessage weekBossLevels = RepeatedMessage.newEmptyInstance(Public.WeekBossLevel.getFactory()); + + private WeekBossLevels() { + } + + /** + * @return a new empty instance of {@code WeekBossLevels} + */ + public static WeekBossLevels newInstance() { + return new WeekBossLevels(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public WeekBossLevels clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public WeekBossLevels addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public WeekBossLevels addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public WeekBossLevels setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 1; + * @return whether the weekBossLevels field is set + */ + public boolean hasWeekBossLevels() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 1; + * @return this + */ + public WeekBossLevels clearWeekBossLevels() { + bitField0_ &= ~0x00000002; + weekBossLevels.clear(); + return this; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableWeekBossLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getWeekBossLevels() { + return weekBossLevels; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableWeekBossLevels() { + bitField0_ |= 0x00000002; + return weekBossLevels; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 1; + * @param value the weekBossLevels to add + * @return this + */ + public WeekBossLevels addWeekBossLevels(final Public.WeekBossLevel value) { + bitField0_ |= 0x00000002; + weekBossLevels.add(value); + return this; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 1; + * @param values the weekBossLevels to add + * @return this + */ + public WeekBossLevels addAllWeekBossLevels(final Public.WeekBossLevel... values) { + bitField0_ |= 0x00000002; + weekBossLevels.addAll(values); + return this; + } + + @Override + public WeekBossLevels copyFrom(final WeekBossLevels other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + weekBossLevels.copyFrom(other.weekBossLevels); + } + return this; + } + + @Override + public WeekBossLevels mergeFrom(final WeekBossLevels other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasWeekBossLevels()) { + getMutableWeekBossLevels().addAll(other.weekBossLevels); + } + return this; + } + + @Override + public WeekBossLevels clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + weekBossLevels.clear(); + return this; + } + + @Override + public WeekBossLevels clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + weekBossLevels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WeekBossLevels)) { + return false; + } + WeekBossLevels other = (WeekBossLevels) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasWeekBossLevels() || weekBossLevels.equals(other.weekBossLevels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < weekBossLevels.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(weekBossLevels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * weekBossLevels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(weekBossLevels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WeekBossLevels mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // weekBossLevels + tag = input.readRepeatedMessage(weekBossLevels, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.weekBossLevels, weekBossLevels); + } + output.endObject(); + } + + @Override + public WeekBossLevels mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1516494448: { + if (input.isAtField(FieldNames.weekBossLevels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(weekBossLevels); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WeekBossLevels clone() { + return new WeekBossLevels().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WeekBossLevels parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WeekBossLevels(), data).checkInitialized(); + } + + public static WeekBossLevels parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossLevels(), input).checkInitialized(); + } + + public static WeekBossLevels parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossLevels(), input).checkInitialized(); + } + + /** + * @return factory for creating WeekBossLevels messages + */ + public static MessageFactory getFactory() { + return WeekBossLevelsFactory.INSTANCE; + } + + private enum WeekBossLevelsFactory implements MessageFactory { + INSTANCE; + + @Override + public WeekBossLevels create() { + return WeekBossLevels.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName weekBossLevels = FieldName.forField("WeekBossLevels"); + } + } + + /** + * Protobuf type {@code GmClearAllRegionBossLevel} + */ + public static final class GmClearAllRegionBossLevel extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .RegionBossLevel RegionBossLevels = 1; + */ + private final RepeatedMessage regionBossLevels = RepeatedMessage.newEmptyInstance(Public.RegionBossLevel.getFactory()); + + private GmClearAllRegionBossLevel() { + } + + /** + * @return a new empty instance of {@code GmClearAllRegionBossLevel} + */ + public static GmClearAllRegionBossLevel newInstance() { + return new GmClearAllRegionBossLevel(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public GmClearAllRegionBossLevel clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public GmClearAllRegionBossLevel setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllRegionBossLevel clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllRegionBossLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllRegionBossLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllRegionBossLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 1; + * @return whether the regionBossLevels field is set + */ + public boolean hasRegionBossLevels() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 1; + * @return this + */ + public GmClearAllRegionBossLevel clearRegionBossLevels() { + bitField0_ &= ~0x00000004; + regionBossLevels.clear(); + return this; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRegionBossLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRegionBossLevels() { + return regionBossLevels; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRegionBossLevels() { + bitField0_ |= 0x00000004; + return regionBossLevels; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 1; + * @param value the regionBossLevels to add + * @return this + */ + public GmClearAllRegionBossLevel addRegionBossLevels(final Public.RegionBossLevel value) { + bitField0_ |= 0x00000004; + regionBossLevels.add(value); + return this; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 1; + * @param values the regionBossLevels to add + * @return this + */ + public GmClearAllRegionBossLevel addAllRegionBossLevels( + final Public.RegionBossLevel... values) { + bitField0_ |= 0x00000004; + regionBossLevels.addAll(values); + return this; + } + + @Override + public GmClearAllRegionBossLevel copyFrom(final GmClearAllRegionBossLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + regionBossLevels.copyFrom(other.regionBossLevels); + } + return this; + } + + @Override + public GmClearAllRegionBossLevel mergeFrom(final GmClearAllRegionBossLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRegionBossLevels()) { + getMutableRegionBossLevels().addAll(other.regionBossLevels); + } + return this; + } + + @Override + public GmClearAllRegionBossLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + regionBossLevels.clear(); + return this; + } + + @Override + public GmClearAllRegionBossLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + regionBossLevels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllRegionBossLevel)) { + return false; + } + GmClearAllRegionBossLevel other = (GmClearAllRegionBossLevel) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRegionBossLevels() || regionBossLevels.equals(other.regionBossLevels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < regionBossLevels.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(regionBossLevels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * regionBossLevels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(regionBossLevels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllRegionBossLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // regionBossLevels + tag = input.readRepeatedMessage(regionBossLevels, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.regionBossLevels, regionBossLevels); + } + output.endObject(); + } + + @Override + public GmClearAllRegionBossLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -231400080: { + if (input.isAtField(FieldNames.regionBossLevels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(regionBossLevels); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllRegionBossLevel clone() { + return new GmClearAllRegionBossLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllRegionBossLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllRegionBossLevel(), data).checkInitialized(); + } + + public static GmClearAllRegionBossLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllRegionBossLevel(), input).checkInitialized(); + } + + public static GmClearAllRegionBossLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllRegionBossLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllRegionBossLevel messages + */ + public static MessageFactory getFactory() { + return GmClearAllRegionBossLevelFactory.INSTANCE; + } + + private enum GmClearAllRegionBossLevelFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllRegionBossLevel create() { + return GmClearAllRegionBossLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName regionBossLevels = FieldName.forField("RegionBossLevels"); + } + } + + /** + * Protobuf type {@code GmClearAllTravelerDue} + */ + public static final class GmClearAllTravelerDue extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .TravelerDuelBossLevel Levels = 1; + */ + private final RepeatedMessage levels = RepeatedMessage.newEmptyInstance(Public.TravelerDuelBossLevel.getFactory()); + + private GmClearAllTravelerDue() { + } + + /** + * @return a new empty instance of {@code GmClearAllTravelerDue} + */ + public static GmClearAllTravelerDue newInstance() { + return new GmClearAllTravelerDue(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public GmClearAllTravelerDue clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public GmClearAllTravelerDue setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllTravelerDue clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllTravelerDue addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllTravelerDue addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllTravelerDue setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .TravelerDuelBossLevel Levels = 1; + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .TravelerDuelBossLevel Levels = 1; + * @return this + */ + public GmClearAllTravelerDue clearLevels() { + bitField0_ &= ~0x00000004; + levels.clear(); + return this; + } + + /** + * repeated .TravelerDuelBossLevel Levels = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getLevels() { + return levels; + } + + /** + * repeated .TravelerDuelBossLevel Levels = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableLevels() { + bitField0_ |= 0x00000004; + return levels; + } + + /** + * repeated .TravelerDuelBossLevel Levels = 1; + * @param value the levels to add + * @return this + */ + public GmClearAllTravelerDue addLevels(final Public.TravelerDuelBossLevel value) { + bitField0_ |= 0x00000004; + levels.add(value); + return this; + } + + /** + * repeated .TravelerDuelBossLevel Levels = 1; + * @param values the levels to add + * @return this + */ + public GmClearAllTravelerDue addAllLevels(final Public.TravelerDuelBossLevel... values) { + bitField0_ |= 0x00000004; + levels.addAll(values); + return this; + } + + @Override + public GmClearAllTravelerDue copyFrom(final GmClearAllTravelerDue other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + levels.copyFrom(other.levels); + } + return this; + } + + @Override + public GmClearAllTravelerDue mergeFrom(final GmClearAllTravelerDue other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasLevels()) { + getMutableLevels().addAll(other.levels); + } + return this; + } + + @Override + public GmClearAllTravelerDue clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + levels.clear(); + return this; + } + + @Override + public GmClearAllTravelerDue clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + levels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllTravelerDue)) { + return false; + } + GmClearAllTravelerDue other = (GmClearAllTravelerDue) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasLevels() || levels.equals(other.levels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < levels.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(levels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * levels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(levels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllTravelerDue mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // levels + tag = input.readRepeatedMessage(levels, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.levels, levels); + } + output.endObject(); + } + + @Override + public GmClearAllTravelerDue mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022260337: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(levels); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllTravelerDue clone() { + return new GmClearAllTravelerDue().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllTravelerDue parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllTravelerDue(), data).checkInitialized(); + } + + public static GmClearAllTravelerDue parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllTravelerDue(), input).checkInitialized(); + } + + public static GmClearAllTravelerDue parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllTravelerDue(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllTravelerDue messages + */ + public static MessageFactory getFactory() { + return GmClearAllTravelerDueFactory.INSTANCE; + } + + private enum GmClearAllTravelerDueFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllTravelerDue create() { + return GmClearAllTravelerDue.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName levels = FieldName.forField("Levels"); + } + } + + /** + * Protobuf type {@code GmClearAllSkillInstance} + */ + public static final class GmClearAllSkillInstance extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .SkillInstance SkillInstances = 1; + */ + private final RepeatedMessage skillInstances = RepeatedMessage.newEmptyInstance(Public.SkillInstance.getFactory()); + + private GmClearAllSkillInstance() { + } + + /** + * @return a new empty instance of {@code GmClearAllSkillInstance} + */ + public static GmClearAllSkillInstance newInstance() { + return new GmClearAllSkillInstance(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllSkillInstance clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllSkillInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllSkillInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllSkillInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .SkillInstance SkillInstances = 1; + * @return whether the skillInstances field is set + */ + public boolean hasSkillInstances() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .SkillInstance SkillInstances = 1; + * @return this + */ + public GmClearAllSkillInstance clearSkillInstances() { + bitField0_ &= ~0x00000002; + skillInstances.clear(); + return this; + } + + /** + * repeated .SkillInstance SkillInstances = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSkillInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getSkillInstances() { + return skillInstances; + } + + /** + * repeated .SkillInstance SkillInstances = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableSkillInstances() { + bitField0_ |= 0x00000002; + return skillInstances; + } + + /** + * repeated .SkillInstance SkillInstances = 1; + * @param value the skillInstances to add + * @return this + */ + public GmClearAllSkillInstance addSkillInstances(final Public.SkillInstance value) { + bitField0_ |= 0x00000002; + skillInstances.add(value); + return this; + } + + /** + * repeated .SkillInstance SkillInstances = 1; + * @param values the skillInstances to add + * @return this + */ + public GmClearAllSkillInstance addAllSkillInstances(final Public.SkillInstance... values) { + bitField0_ |= 0x00000002; + skillInstances.addAll(values); + return this; + } + + @Override + public GmClearAllSkillInstance copyFrom(final GmClearAllSkillInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + skillInstances.copyFrom(other.skillInstances); + } + return this; + } + + @Override + public GmClearAllSkillInstance mergeFrom(final GmClearAllSkillInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSkillInstances()) { + getMutableSkillInstances().addAll(other.skillInstances); + } + return this; + } + + @Override + public GmClearAllSkillInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + skillInstances.clear(); + return this; + } + + @Override + public GmClearAllSkillInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + skillInstances.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllSkillInstance)) { + return false; + } + GmClearAllSkillInstance other = (GmClearAllSkillInstance) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSkillInstances() || skillInstances.equals(other.skillInstances)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < skillInstances.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(skillInstances.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * skillInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(skillInstances); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllSkillInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // skillInstances + tag = input.readRepeatedMessage(skillInstances, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.skillInstances, skillInstances); + } + output.endObject(); + } + + @Override + public GmClearAllSkillInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1814965069: { + if (input.isAtField(FieldNames.skillInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(skillInstances); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllSkillInstance clone() { + return new GmClearAllSkillInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllSkillInstance parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllSkillInstance(), data).checkInitialized(); + } + + public static GmClearAllSkillInstance parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllSkillInstance(), input).checkInitialized(); + } + + public static GmClearAllSkillInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllSkillInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllSkillInstance messages + */ + public static MessageFactory getFactory() { + return GmClearAllSkillInstanceFactory.INSTANCE; + } + + private enum GmClearAllSkillInstanceFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllSkillInstance create() { + return GmClearAllSkillInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName skillInstances = FieldName.forField("SkillInstances"); + } + } + + /** + * Protobuf type {@code CharAffinity} + */ + public static final class CharAffinity extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .AffinityInfo Info = 1; + */ + private final Public.AffinityInfo info = Public.AffinityInfo.newInstance(); + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharAffinity() { + } + + /** + * @return a new empty instance of {@code CharAffinity} + */ + public static CharAffinity newInstance() { + return new CharAffinity(); + } + + /** + * optional .AffinityInfo Info = 1; + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .AffinityInfo Info = 1; + * @return this + */ + public CharAffinity clearInfo() { + bitField0_ &= ~0x00000001; + info.clear(); + return this; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AffinityInfo getInfo() { + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AffinityInfo getMutableInfo() { + bitField0_ |= 0x00000001; + return info; + } + + /** + * optional .AffinityInfo Info = 1; + * @param value the info to set + * @return this + */ + public CharAffinity setInfo(final Public.AffinityInfo value) { + bitField0_ |= 0x00000001; + info.copyFrom(value); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public CharAffinity clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public CharAffinity setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAffinity clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAffinity addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAffinity addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAffinity setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharAffinity copyFrom(final CharAffinity other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + info.copyFrom(other.info); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinity mergeFrom(final CharAffinity other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAffinity clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clear(); + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharAffinity clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAffinity)) { + return false; + } + CharAffinity other = (CharAffinity) o; + return bitField0_ == other.bitField0_ + && (!hasInfo() || info.equals(other.info)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAffinity mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // info + input.readMessage(info); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharAffinity mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAffinity clone() { + return new CharAffinity().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAffinity parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAffinity(), data).checkInitialized(); + } + + public static CharAffinity parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinity(), input).checkInitialized(); + } + + public static CharAffinity parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinity(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAffinity messages + */ + public static MessageFactory getFactory() { + return CharAffinityFactory.INSTANCE; + } + + private enum CharAffinityFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAffinity create() { + return CharAffinity.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName info = FieldName.forField("Info"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code GmSTClearAllStarTower} + */ + public static final class GmSTClearAllStarTower extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Ids = 1; + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + private GmSTClearAllStarTower() { + } + + /** + * @return a new empty instance of {@code GmSTClearAllStarTower} + */ + public static GmSTClearAllStarTower newInstance() { + return new GmSTClearAllStarTower(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmSTClearAllStarTower clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmSTClearAllStarTower addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmSTClearAllStarTower addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmSTClearAllStarTower setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Ids = 1; + * @return this + */ + public GmSTClearAllStarTower clearIds() { + bitField0_ &= ~0x00000002; + ids.clear(); + return this; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000002; + return ids; + } + + /** + * repeated uint32 Ids = 1; + * @param value the ids to add + * @return this + */ + public GmSTClearAllStarTower addIds(final int value) { + bitField0_ |= 0x00000002; + ids.add(value); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @param values the ids to add + * @return this + */ + public GmSTClearAllStarTower addAllIds(final int... values) { + bitField0_ |= 0x00000002; + ids.addAll(values); + return this; + } + + @Override + public GmSTClearAllStarTower copyFrom(final GmSTClearAllStarTower other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + } + return this; + } + + @Override + public GmSTClearAllStarTower mergeFrom(final GmSTClearAllStarTower other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + return this; + } + + @Override + public GmSTClearAllStarTower clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public GmSTClearAllStarTower clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmSTClearAllStarTower)) { + return false; + } + GmSTClearAllStarTower other = (GmSTClearAllStarTower) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmSTClearAllStarTower mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + output.endObject(); + } + + @Override + public GmSTClearAllStarTower mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmSTClearAllStarTower clone() { + return new GmSTClearAllStarTower().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmSTClearAllStarTower parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmSTClearAllStarTower(), data).checkInitialized(); + } + + public static GmSTClearAllStarTower parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmSTClearAllStarTower(), input).checkInitialized(); + } + + public static GmSTClearAllStarTower parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmSTClearAllStarTower(), input).checkInitialized(); + } + + /** + * @return factory for creating GmSTClearAllStarTower messages + */ + public static MessageFactory getFactory() { + return GmSTClearAllStarTowerFactory.INSTANCE; + } + + private enum GmSTClearAllStarTowerFactory implements MessageFactory { + INSTANCE; + + @Override + public GmSTClearAllStarTower create() { + return GmSTClearAllStarTower.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + } + } + + /** + * Protobuf type {@code STAddTeamExpNtf} + */ + public static final class STAddTeamExpNtf extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Level = 1; + */ + private int level; + + /** + * optional uint32 Exp = 2; + */ + private int exp; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .StarTowerRoomCase Cases = 3; + */ + private final RepeatedMessage cases = RepeatedMessage.newEmptyInstance(PublicStarTower.StarTowerRoomCase.getFactory()); + + private STAddTeamExpNtf() { + } + + /** + * @return a new empty instance of {@code STAddTeamExpNtf} + */ + public static STAddTeamExpNtf newInstance() { + return new STAddTeamExpNtf(); + } + + /** + * optional uint32 Level = 1; + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Level = 1; + * @return this + */ + public STAddTeamExpNtf clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * optional uint32 Level = 1; + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * optional uint32 Level = 1; + * @param value the level to set + * @return this + */ + public STAddTeamExpNtf setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Exp = 2; + * @return this + */ + public STAddTeamExpNtf clearExp() { + bitField0_ &= ~0x00000002; + exp = 0; + return this; + } + + /** + * optional uint32 Exp = 2; + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * optional uint32 Exp = 2; + * @param value the exp to set + * @return this + */ + public STAddTeamExpNtf setExp(final int value) { + bitField0_ |= 0x00000002; + exp = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public STAddTeamExpNtf clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public STAddTeamExpNtf addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public STAddTeamExpNtf addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public STAddTeamExpNtf setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .StarTowerRoomCase Cases = 3; + * @return whether the cases field is set + */ + public boolean hasCases() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .StarTowerRoomCase Cases = 3; + * @return this + */ + public STAddTeamExpNtf clearCases() { + bitField0_ &= ~0x00000008; + cases.clear(); + return this; + } + + /** + * repeated .StarTowerRoomCase Cases = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCases()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCases() { + return cases; + } + + /** + * repeated .StarTowerRoomCase Cases = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCases() { + bitField0_ |= 0x00000008; + return cases; + } + + /** + * repeated .StarTowerRoomCase Cases = 3; + * @param value the cases to add + * @return this + */ + public STAddTeamExpNtf addCases(final PublicStarTower.StarTowerRoomCase value) { + bitField0_ |= 0x00000008; + cases.add(value); + return this; + } + + /** + * repeated .StarTowerRoomCase Cases = 3; + * @param values the cases to add + * @return this + */ + public STAddTeamExpNtf addAllCases(final PublicStarTower.StarTowerRoomCase... values) { + bitField0_ |= 0x00000008; + cases.addAll(values); + return this; + } + + @Override + public STAddTeamExpNtf copyFrom(final STAddTeamExpNtf other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + exp = other.exp; + nextPackage.copyFrom(other.nextPackage); + cases.copyFrom(other.cases); + } + return this; + } + + @Override + public STAddTeamExpNtf mergeFrom(final STAddTeamExpNtf other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCases()) { + getMutableCases().addAll(other.cases); + } + return this; + } + + @Override + public STAddTeamExpNtf clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + exp = 0; + nextPackage.clear(); + cases.clear(); + return this; + } + + @Override + public STAddTeamExpNtf clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cases.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof STAddTeamExpNtf)) { + return false; + } + STAddTeamExpNtf other = (STAddTeamExpNtf) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasExp() || exp == other.exp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCases() || cases.equals(other.cases)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < cases.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(cases.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * cases.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(cases); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public STAddTeamExpNtf mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // cases + tag = input.readRepeatedMessage(cases, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.cases, cases); + } + output.endObject(); + } + + @Override + public STAddTeamExpNtf mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64879395: { + if (input.isAtField(FieldNames.cases)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(cases); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public STAddTeamExpNtf clone() { + return new STAddTeamExpNtf().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static STAddTeamExpNtf parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new STAddTeamExpNtf(), data).checkInitialized(); + } + + public static STAddTeamExpNtf parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new STAddTeamExpNtf(), input).checkInitialized(); + } + + public static STAddTeamExpNtf parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new STAddTeamExpNtf(), input).checkInitialized(); + } + + /** + * @return factory for creating STAddTeamExpNtf messages + */ + public static MessageFactory getFactory() { + return STAddTeamExpNtfFactory.INSTANCE; + } + + private enum STAddTeamExpNtfFactory implements MessageFactory { + INSTANCE; + + @Override + public STAddTeamExpNtf create() { + return STAddTeamExpNtf.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cases = FieldName.forField("Cases"); + } + } + + /** + * Protobuf type {@code GmClearAllEquipmentInstance} + */ + public static final class GmClearAllEquipmentInstance extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .EquipmentInstance EquipmentInstances = 1; + */ + private final RepeatedMessage equipmentInstances = RepeatedMessage.newEmptyInstance(Public.EquipmentInstance.getFactory()); + + private GmClearAllEquipmentInstance() { + } + + /** + * @return a new empty instance of {@code GmClearAllEquipmentInstance} + */ + public static GmClearAllEquipmentInstance newInstance() { + return new GmClearAllEquipmentInstance(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public GmClearAllEquipmentInstance clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public GmClearAllEquipmentInstance setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllEquipmentInstance clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllEquipmentInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllEquipmentInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllEquipmentInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 1; + * @return whether the equipmentInstances field is set + */ + public boolean hasEquipmentInstances() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 1; + * @return this + */ + public GmClearAllEquipmentInstance clearEquipmentInstances() { + bitField0_ &= ~0x00000004; + equipmentInstances.clear(); + return this; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEquipmentInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getEquipmentInstances() { + return equipmentInstances; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableEquipmentInstances() { + bitField0_ |= 0x00000004; + return equipmentInstances; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 1; + * @param value the equipmentInstances to add + * @return this + */ + public GmClearAllEquipmentInstance addEquipmentInstances(final Public.EquipmentInstance value) { + bitField0_ |= 0x00000004; + equipmentInstances.add(value); + return this; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 1; + * @param values the equipmentInstances to add + * @return this + */ + public GmClearAllEquipmentInstance addAllEquipmentInstances( + final Public.EquipmentInstance... values) { + bitField0_ |= 0x00000004; + equipmentInstances.addAll(values); + return this; + } + + @Override + public GmClearAllEquipmentInstance copyFrom(final GmClearAllEquipmentInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + equipmentInstances.copyFrom(other.equipmentInstances); + } + return this; + } + + @Override + public GmClearAllEquipmentInstance mergeFrom(final GmClearAllEquipmentInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEquipmentInstances()) { + getMutableEquipmentInstances().addAll(other.equipmentInstances); + } + return this; + } + + @Override + public GmClearAllEquipmentInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + equipmentInstances.clear(); + return this; + } + + @Override + public GmClearAllEquipmentInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + equipmentInstances.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllEquipmentInstance)) { + return false; + } + GmClearAllEquipmentInstance other = (GmClearAllEquipmentInstance) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEquipmentInstances() || equipmentInstances.equals(other.equipmentInstances)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < equipmentInstances.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(equipmentInstances.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * equipmentInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(equipmentInstances); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllEquipmentInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // equipmentInstances + tag = input.readRepeatedMessage(equipmentInstances, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.equipmentInstances, equipmentInstances); + } + output.endObject(); + } + + @Override + public GmClearAllEquipmentInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 362304688: { + if (input.isAtField(FieldNames.equipmentInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(equipmentInstances); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllEquipmentInstance clone() { + return new GmClearAllEquipmentInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllEquipmentInstance parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllEquipmentInstance(), data).checkInitialized(); + } + + public static GmClearAllEquipmentInstance parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new GmClearAllEquipmentInstance(), input).checkInitialized(); + } + + public static GmClearAllEquipmentInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllEquipmentInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllEquipmentInstance messages + */ + public static MessageFactory getFactory() { + return GmClearAllEquipmentInstanceFactory.INSTANCE; + } + + private enum GmClearAllEquipmentInstanceFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllEquipmentInstance create() { + return GmClearAllEquipmentInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName equipmentInstances = FieldName.forField("EquipmentInstances"); + } + } + + /** + * Protobuf type {@code GmAllInfinityTowerInfos} + */ + public static final class GmAllInfinityTowerInfos extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .InfinityTowerLevelInfo Infos = 1; + */ + private final RepeatedMessage infos = RepeatedMessage.newEmptyInstance(Public.InfinityTowerLevelInfo.getFactory()); + + private GmAllInfinityTowerInfos() { + } + + /** + * @return a new empty instance of {@code GmAllInfinityTowerInfos} + */ + public static GmAllInfinityTowerInfos newInstance() { + return new GmAllInfinityTowerInfos(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmAllInfinityTowerInfos clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmAllInfinityTowerInfos addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmAllInfinityTowerInfos addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmAllInfinityTowerInfos setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 1; + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 1; + * @return this + */ + public GmAllInfinityTowerInfos clearInfos() { + bitField0_ &= ~0x00000002; + infos.clear(); + return this; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInfos() { + return infos; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInfos() { + bitField0_ |= 0x00000002; + return infos; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 1; + * @param value the infos to add + * @return this + */ + public GmAllInfinityTowerInfos addInfos(final Public.InfinityTowerLevelInfo value) { + bitField0_ |= 0x00000002; + infos.add(value); + return this; + } + + /** + * repeated .InfinityTowerLevelInfo Infos = 1; + * @param values the infos to add + * @return this + */ + public GmAllInfinityTowerInfos addAllInfos(final Public.InfinityTowerLevelInfo... values) { + bitField0_ |= 0x00000002; + infos.addAll(values); + return this; + } + + @Override + public GmAllInfinityTowerInfos copyFrom(final GmAllInfinityTowerInfos other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public GmAllInfinityTowerInfos mergeFrom(final GmAllInfinityTowerInfos other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public GmAllInfinityTowerInfos clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clear(); + return this; + } + + @Override + public GmAllInfinityTowerInfos clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmAllInfinityTowerInfos)) { + return false; + } + GmAllInfinityTowerInfos other = (GmAllInfinityTowerInfos) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmAllInfinityTowerInfos mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public GmAllInfinityTowerInfos mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmAllInfinityTowerInfos clone() { + return new GmAllInfinityTowerInfos().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmAllInfinityTowerInfos parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmAllInfinityTowerInfos(), data).checkInitialized(); + } + + public static GmAllInfinityTowerInfos parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmAllInfinityTowerInfos(), input).checkInitialized(); + } + + public static GmAllInfinityTowerInfos parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmAllInfinityTowerInfos(), input).checkInitialized(); + } + + /** + * @return factory for creating GmAllInfinityTowerInfos messages + */ + public static MessageFactory getFactory() { + return GmAllInfinityTowerInfosFactory.INSTANCE; + } + + private enum GmAllInfinityTowerInfosFactory implements MessageFactory { + INSTANCE; + + @Override + public GmAllInfinityTowerInfos create() { + return GmAllInfinityTowerInfos.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code GmStory} + */ + public static final class GmStory extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 3; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Evidences = 1; + */ + private final RepeatedInt evidences = RepeatedInt.newEmptyInstance(); + + /** + * repeated .Story Stories = 2; + */ + private final RepeatedMessage stories = RepeatedMessage.newEmptyInstance(Public.Story.getFactory()); + + private GmStory() { + } + + /** + * @return a new empty instance of {@code GmStory} + */ + public static GmStory newInstance() { + return new GmStory(); + } + + /** + * optional .ChangeInfo Change = 3; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 3; + * @return this + */ + public GmStory clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 3; + * @param value the change to set + * @return this + */ + public GmStory setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmStory clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmStory addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmStory addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmStory setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Evidences = 1; + * @return whether the evidences field is set + */ + public boolean hasEvidences() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 Evidences = 1; + * @return this + */ + public GmStory clearEvidences() { + bitField0_ &= ~0x00000004; + evidences.clear(); + return this; + } + + /** + * repeated uint32 Evidences = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvidences()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getEvidences() { + return evidences; + } + + /** + * repeated uint32 Evidences = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableEvidences() { + bitField0_ |= 0x00000004; + return evidences; + } + + /** + * repeated uint32 Evidences = 1; + * @param value the evidences to add + * @return this + */ + public GmStory addEvidences(final int value) { + bitField0_ |= 0x00000004; + evidences.add(value); + return this; + } + + /** + * repeated uint32 Evidences = 1; + * @param values the evidences to add + * @return this + */ + public GmStory addAllEvidences(final int... values) { + bitField0_ |= 0x00000004; + evidences.addAll(values); + return this; + } + + /** + * repeated .Story Stories = 2; + * @return whether the stories field is set + */ + public boolean hasStories() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .Story Stories = 2; + * @return this + */ + public GmStory clearStories() { + bitField0_ &= ~0x00000008; + stories.clear(); + return this; + } + + /** + * repeated .Story Stories = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStories()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getStories() { + return stories; + } + + /** + * repeated .Story Stories = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableStories() { + bitField0_ |= 0x00000008; + return stories; + } + + /** + * repeated .Story Stories = 2; + * @param value the stories to add + * @return this + */ + public GmStory addStories(final Public.Story value) { + bitField0_ |= 0x00000008; + stories.add(value); + return this; + } + + /** + * repeated .Story Stories = 2; + * @param values the stories to add + * @return this + */ + public GmStory addAllStories(final Public.Story... values) { + bitField0_ |= 0x00000008; + stories.addAll(values); + return this; + } + + @Override + public GmStory copyFrom(final GmStory other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + evidences.copyFrom(other.evidences); + stories.copyFrom(other.stories); + } + return this; + } + + @Override + public GmStory mergeFrom(final GmStory other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEvidences()) { + getMutableEvidences().addAll(other.evidences); + } + if (other.hasStories()) { + getMutableStories().addAll(other.stories); + } + return this; + } + + @Override + public GmStory clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + evidences.clear(); + stories.clear(); + return this; + } + + @Override + public GmStory clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + evidences.clear(); + stories.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmStory)) { + return false; + } + GmStory other = (GmStory) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEvidences() || evidences.equals(other.evidences)) + && (!hasStories() || stories.equals(other.stories)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < evidences.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(evidences.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < stories.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(stories.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * evidences.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(evidences); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * stories.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(stories); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmStory mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // evidences [packed=true] + input.readPackedUInt32(evidences, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // stories + tag = input.readRepeatedMessage(stories, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // evidences [packed=false] + tag = input.readRepeatedUInt32(evidences, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.evidences, evidences); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.stories, stories); + } + output.endObject(); + } + + @Override + public GmStory mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 991055068: { + if (input.isAtField(FieldNames.evidences)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(evidences); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -219613133: { + if (input.isAtField(FieldNames.stories)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(stories); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmStory clone() { + return new GmStory().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmStory parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmStory(), data).checkInitialized(); + } + + public static GmStory parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmStory(), input).checkInitialized(); + } + + public static GmStory parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmStory(), input).checkInitialized(); + } + + /** + * @return factory for creating GmStory messages + */ + public static MessageFactory getFactory() { + return GmStoryFactory.INSTANCE; + } + + private enum GmStoryFactory implements MessageFactory { + INSTANCE; + + @Override + public GmStory create() { + return GmStory.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName evidences = FieldName.forField("Evidences"); + + static final FieldName stories = FieldName.forField("Stories"); + } + } + + /** + * Protobuf type {@code GmHarmonySkillNotify} + */ + public static final class GmHarmonySkillNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 List = 1; + */ + private final RepeatedInt list = RepeatedInt.newEmptyInstance(); + + private GmHarmonySkillNotify() { + } + + /** + * @return a new empty instance of {@code GmHarmonySkillNotify} + */ + public static GmHarmonySkillNotify newInstance() { + return new GmHarmonySkillNotify(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmHarmonySkillNotify clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmHarmonySkillNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmHarmonySkillNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmHarmonySkillNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 List = 1; + * @return this + */ + public GmHarmonySkillNotify clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getList() { + return list; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated uint32 List = 1; + * @param value the list to add + * @return this + */ + public GmHarmonySkillNotify addList(final int value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated uint32 List = 1; + * @param values the list to add + * @return this + */ + public GmHarmonySkillNotify addAllList(final int... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public GmHarmonySkillNotify copyFrom(final GmHarmonySkillNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public GmHarmonySkillNotify mergeFrom(final GmHarmonySkillNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public GmHarmonySkillNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public GmHarmonySkillNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmHarmonySkillNotify)) { + return false; + } + GmHarmonySkillNotify other = (GmHarmonySkillNotify) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(list.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmHarmonySkillNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list [packed=true] + input.readPackedUInt32(list, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // list [packed=false] + tag = input.readRepeatedUInt32(list, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public GmHarmonySkillNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmHarmonySkillNotify clone() { + return new GmHarmonySkillNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmHarmonySkillNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmHarmonySkillNotify(), data).checkInitialized(); + } + + public static GmHarmonySkillNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmHarmonySkillNotify(), input).checkInitialized(); + } + + public static GmHarmonySkillNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmHarmonySkillNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating GmHarmonySkillNotify messages + */ + public static MessageFactory getFactory() { + return GmHarmonySkillNotifyFactory.INSTANCE; + } + + private enum GmHarmonySkillNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public GmHarmonySkillNotify create() { + return GmHarmonySkillNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code GmTowerGrowthNodesNotify} + */ + public static final class GmTowerGrowthNodesNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Detail = 1; + */ + private final RepeatedInt detail = RepeatedInt.newEmptyInstance(); + + private GmTowerGrowthNodesNotify() { + } + + /** + * @return a new empty instance of {@code GmTowerGrowthNodesNotify} + */ + public static GmTowerGrowthNodesNotify newInstance() { + return new GmTowerGrowthNodesNotify(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmTowerGrowthNodesNotify clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmTowerGrowthNodesNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmTowerGrowthNodesNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmTowerGrowthNodesNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Detail = 1; + * @return whether the detail field is set + */ + public boolean hasDetail() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Detail = 1; + * @return this + */ + public GmTowerGrowthNodesNotify clearDetail() { + bitField0_ &= ~0x00000002; + detail.clear(); + return this; + } + + /** + * repeated uint32 Detail = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDetail()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDetail() { + return detail; + } + + /** + * repeated uint32 Detail = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDetail() { + bitField0_ |= 0x00000002; + return detail; + } + + /** + * repeated uint32 Detail = 1; + * @param value the detail to add + * @return this + */ + public GmTowerGrowthNodesNotify addDetail(final int value) { + bitField0_ |= 0x00000002; + detail.add(value); + return this; + } + + /** + * repeated uint32 Detail = 1; + * @param values the detail to add + * @return this + */ + public GmTowerGrowthNodesNotify addAllDetail(final int... values) { + bitField0_ |= 0x00000002; + detail.addAll(values); + return this; + } + + @Override + public GmTowerGrowthNodesNotify copyFrom(final GmTowerGrowthNodesNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + detail.copyFrom(other.detail); + } + return this; + } + + @Override + public GmTowerGrowthNodesNotify mergeFrom(final GmTowerGrowthNodesNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasDetail()) { + getMutableDetail().addAll(other.detail); + } + return this; + } + + @Override + public GmTowerGrowthNodesNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + detail.clear(); + return this; + } + + @Override + public GmTowerGrowthNodesNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + detail.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmTowerGrowthNodesNotify)) { + return false; + } + GmTowerGrowthNodesNotify other = (GmTowerGrowthNodesNotify) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasDetail() || detail.equals(other.detail)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < detail.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(detail.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * detail.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(detail); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmTowerGrowthNodesNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // detail [packed=true] + input.readPackedUInt32(detail, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // detail [packed=false] + tag = input.readRepeatedUInt32(detail, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.detail, detail); + } + output.endObject(); + } + + @Override + public GmTowerGrowthNodesNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2043610225: { + if (input.isAtField(FieldNames.detail)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(detail); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmTowerGrowthNodesNotify clone() { + return new GmTowerGrowthNodesNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmTowerGrowthNodesNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmTowerGrowthNodesNotify(), data).checkInitialized(); + } + + public static GmTowerGrowthNodesNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmTowerGrowthNodesNotify(), input).checkInitialized(); + } + + public static GmTowerGrowthNodesNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmTowerGrowthNodesNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating GmTowerGrowthNodesNotify messages + */ + public static MessageFactory getFactory() { + return GmTowerGrowthNodesNotifyFactory.INSTANCE; + } + + private enum GmTowerGrowthNodesNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public GmTowerGrowthNodesNotify create() { + return GmTowerGrowthNodesNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName detail = FieldName.forField("Detail"); + } + } + + /** + * Protobuf type {@code GmCharUpNotify} + */ + public static final class GmCharUpNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .Char Char = 1; + */ + private final Public.Char char_ = Public.Char.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .HandbookInfo Handbook = 2; + */ + private final RepeatedMessage handbook = RepeatedMessage.newEmptyInstance(Public.HandbookInfo.getFactory()); + + private GmCharUpNotify() { + } + + /** + * @return a new empty instance of {@code GmCharUpNotify} + */ + public static GmCharUpNotify newInstance() { + return new GmCharUpNotify(); + } + + /** + * optional .Char Char = 1; + * @return whether the char_ field is set + */ + public boolean hasChar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .Char Char = 1; + * @return this + */ + public GmCharUpNotify clearChar() { + bitField0_ &= ~0x00000001; + char_.clear(); + return this; + } + + /** + * optional .Char Char = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChar()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Char getChar() { + return char_; + } + + /** + * optional .Char Char = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Char getMutableChar() { + bitField0_ |= 0x00000001; + return char_; + } + + /** + * optional .Char Char = 1; + * @param value the char_ to set + * @return this + */ + public GmCharUpNotify setChar(final Public.Char value) { + bitField0_ |= 0x00000001; + char_.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmCharUpNotify clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmCharUpNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmCharUpNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmCharUpNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .HandbookInfo Handbook = 2; + * @return whether the handbook field is set + */ + public boolean hasHandbook() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .HandbookInfo Handbook = 2; + * @return this + */ + public GmCharUpNotify clearHandbook() { + bitField0_ &= ~0x00000004; + handbook.clear(); + return this; + } + + /** + * repeated .HandbookInfo Handbook = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHandbook()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getHandbook() { + return handbook; + } + + /** + * repeated .HandbookInfo Handbook = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableHandbook() { + bitField0_ |= 0x00000004; + return handbook; + } + + /** + * repeated .HandbookInfo Handbook = 2; + * @param value the handbook to add + * @return this + */ + public GmCharUpNotify addHandbook(final Public.HandbookInfo value) { + bitField0_ |= 0x00000004; + handbook.add(value); + return this; + } + + /** + * repeated .HandbookInfo Handbook = 2; + * @param values the handbook to add + * @return this + */ + public GmCharUpNotify addAllHandbook(final Public.HandbookInfo... values) { + bitField0_ |= 0x00000004; + handbook.addAll(values); + return this; + } + + @Override + public GmCharUpNotify copyFrom(final GmCharUpNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + char_.copyFrom(other.char_); + nextPackage.copyFrom(other.nextPackage); + handbook.copyFrom(other.handbook); + } + return this; + } + + @Override + public GmCharUpNotify mergeFrom(final GmCharUpNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChar()) { + getMutableChar().mergeFrom(other.char_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasHandbook()) { + getMutableHandbook().addAll(other.handbook); + } + return this; + } + + @Override + public GmCharUpNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + char_.clear(); + nextPackage.clear(); + handbook.clear(); + return this; + } + + @Override + public GmCharUpNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + char_.clearQuick(); + nextPackage.clear(); + handbook.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmCharUpNotify)) { + return false; + } + GmCharUpNotify other = (GmCharUpNotify) o; + return bitField0_ == other.bitField0_ + && (!hasChar() || char_.equals(other.char_)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasHandbook() || handbook.equals(other.handbook)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(char_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < handbook.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(handbook.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(char_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * handbook.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(handbook); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmCharUpNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // char_ + input.readMessage(char_); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // handbook + tag = input.readRepeatedMessage(handbook, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.char_, char_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.handbook, handbook); + } + output.endObject(); + } + + @Override + public GmCharUpNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2099062: { + if (input.isAtField(FieldNames.char_)) { + if (!input.trySkipNullValue()) { + input.readMessage(char_); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66424824: { + if (input.isAtField(FieldNames.handbook)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(handbook); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmCharUpNotify clone() { + return new GmCharUpNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmCharUpNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmCharUpNotify(), data).checkInitialized(); + } + + public static GmCharUpNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmCharUpNotify(), input).checkInitialized(); + } + + public static GmCharUpNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmCharUpNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating GmCharUpNotify messages + */ + public static MessageFactory getFactory() { + return GmCharUpNotifyFactory.INSTANCE; + } + + private enum GmCharUpNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public GmCharUpNotify create() { + return GmCharUpNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName char_ = FieldName.forField("Char"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName handbook = FieldName.forField("Handbook"); + } + } + + /** + * Protobuf type {@code GmClearAllCharGemInstance} + */ + public static final class GmClearAllCharGemInstance extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .CharGemInstance CharGemInstances = 1; + */ + private final RepeatedMessage charGemInstances = RepeatedMessage.newEmptyInstance(Public.CharGemInstance.getFactory()); + + private GmClearAllCharGemInstance() { + } + + /** + * @return a new empty instance of {@code GmClearAllCharGemInstance} + */ + public static GmClearAllCharGemInstance newInstance() { + return new GmClearAllCharGemInstance(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllCharGemInstance clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllCharGemInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllCharGemInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllCharGemInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .CharGemInstance CharGemInstances = 1; + * @return whether the charGemInstances field is set + */ + public boolean hasCharGemInstances() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .CharGemInstance CharGemInstances = 1; + * @return this + */ + public GmClearAllCharGemInstance clearCharGemInstances() { + bitField0_ &= ~0x00000002; + charGemInstances.clear(); + return this; + } + + /** + * repeated .CharGemInstance CharGemInstances = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGemInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCharGemInstances() { + return charGemInstances; + } + + /** + * repeated .CharGemInstance CharGemInstances = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCharGemInstances() { + bitField0_ |= 0x00000002; + return charGemInstances; + } + + /** + * repeated .CharGemInstance CharGemInstances = 1; + * @param value the charGemInstances to add + * @return this + */ + public GmClearAllCharGemInstance addCharGemInstances(final Public.CharGemInstance value) { + bitField0_ |= 0x00000002; + charGemInstances.add(value); + return this; + } + + /** + * repeated .CharGemInstance CharGemInstances = 1; + * @param values the charGemInstances to add + * @return this + */ + public GmClearAllCharGemInstance addAllCharGemInstances( + final Public.CharGemInstance... values) { + bitField0_ |= 0x00000002; + charGemInstances.addAll(values); + return this; + } + + @Override + public GmClearAllCharGemInstance copyFrom(final GmClearAllCharGemInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + charGemInstances.copyFrom(other.charGemInstances); + } + return this; + } + + @Override + public GmClearAllCharGemInstance mergeFrom(final GmClearAllCharGemInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharGemInstances()) { + getMutableCharGemInstances().addAll(other.charGemInstances); + } + return this; + } + + @Override + public GmClearAllCharGemInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charGemInstances.clear(); + return this; + } + + @Override + public GmClearAllCharGemInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charGemInstances.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllCharGemInstance)) { + return false; + } + GmClearAllCharGemInstance other = (GmClearAllCharGemInstance) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharGemInstances() || charGemInstances.equals(other.charGemInstances)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < charGemInstances.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(charGemInstances.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * charGemInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charGemInstances); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllCharGemInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // charGemInstances + tag = input.readRepeatedMessage(charGemInstances, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.charGemInstances, charGemInstances); + } + output.endObject(); + } + + @Override + public GmClearAllCharGemInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1297796475: { + if (input.isAtField(FieldNames.charGemInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charGemInstances); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllCharGemInstance clone() { + return new GmClearAllCharGemInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllCharGemInstance parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllCharGemInstance(), data).checkInitialized(); + } + + public static GmClearAllCharGemInstance parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllCharGemInstance(), input).checkInitialized(); + } + + public static GmClearAllCharGemInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllCharGemInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllCharGemInstance messages + */ + public static MessageFactory getFactory() { + return GmClearAllCharGemInstanceFactory.INSTANCE; + } + + private enum GmClearAllCharGemInstanceFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllCharGemInstance create() { + return GmClearAllCharGemInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charGemInstances = FieldName.forField("CharGemInstances"); + } + } + + /** + * Protobuf type {@code GmImportCharGemsNotify} + */ + public static final class GmImportCharGemsNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional .CharGemPresets CharGemPresets = 3; + */ + private final Public.CharGemPresets charGemPresets = Public.CharGemPresets.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .CharGemSlot CharGemSlots = 2; + */ + private final RepeatedMessage charGemSlots = RepeatedMessage.newEmptyInstance(Public.CharGemSlot.getFactory()); + + private GmImportCharGemsNotify() { + } + + /** + * @return a new empty instance of {@code GmImportCharGemsNotify} + */ + public static GmImportCharGemsNotify newInstance() { + return new GmImportCharGemsNotify(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public GmImportCharGemsNotify clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public GmImportCharGemsNotify setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional .CharGemPresets CharGemPresets = 3; + * @return whether the charGemPresets field is set + */ + public boolean hasCharGemPresets() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .CharGemPresets CharGemPresets = 3; + * @return this + */ + public GmImportCharGemsNotify clearCharGemPresets() { + bitField0_ &= ~0x00000002; + charGemPresets.clear(); + return this; + } + + /** + * optional .CharGemPresets CharGemPresets = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGemPresets()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.CharGemPresets getCharGemPresets() { + return charGemPresets; + } + + /** + * optional .CharGemPresets CharGemPresets = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.CharGemPresets getMutableCharGemPresets() { + bitField0_ |= 0x00000002; + return charGemPresets; + } + + /** + * optional .CharGemPresets CharGemPresets = 3; + * @param value the charGemPresets to set + * @return this + */ + public GmImportCharGemsNotify setCharGemPresets(final Public.CharGemPresets value) { + bitField0_ |= 0x00000002; + charGemPresets.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmImportCharGemsNotify clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmImportCharGemsNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmImportCharGemsNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmImportCharGemsNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .CharGemSlot CharGemSlots = 2; + * @return whether the charGemSlots field is set + */ + public boolean hasCharGemSlots() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated .CharGemSlot CharGemSlots = 2; + * @return this + */ + public GmImportCharGemsNotify clearCharGemSlots() { + bitField0_ &= ~0x00000008; + charGemSlots.clear(); + return this; + } + + /** + * repeated .CharGemSlot CharGemSlots = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGemSlots()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCharGemSlots() { + return charGemSlots; + } + + /** + * repeated .CharGemSlot CharGemSlots = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCharGemSlots() { + bitField0_ |= 0x00000008; + return charGemSlots; + } + + /** + * repeated .CharGemSlot CharGemSlots = 2; + * @param value the charGemSlots to add + * @return this + */ + public GmImportCharGemsNotify addCharGemSlots(final Public.CharGemSlot value) { + bitField0_ |= 0x00000008; + charGemSlots.add(value); + return this; + } + + /** + * repeated .CharGemSlot CharGemSlots = 2; + * @param values the charGemSlots to add + * @return this + */ + public GmImportCharGemsNotify addAllCharGemSlots(final Public.CharGemSlot... values) { + bitField0_ |= 0x00000008; + charGemSlots.addAll(values); + return this; + } + + @Override + public GmImportCharGemsNotify copyFrom(final GmImportCharGemsNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + charGemPresets.copyFrom(other.charGemPresets); + nextPackage.copyFrom(other.nextPackage); + charGemSlots.copyFrom(other.charGemSlots); + } + return this; + } + + @Override + public GmImportCharGemsNotify mergeFrom(final GmImportCharGemsNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasCharGemPresets()) { + getMutableCharGemPresets().mergeFrom(other.charGemPresets); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharGemSlots()) { + getMutableCharGemSlots().addAll(other.charGemSlots); + } + return this; + } + + @Override + public GmImportCharGemsNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + charGemPresets.clear(); + nextPackage.clear(); + charGemSlots.clear(); + return this; + } + + @Override + public GmImportCharGemsNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charGemPresets.clearQuick(); + nextPackage.clear(); + charGemSlots.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmImportCharGemsNotify)) { + return false; + } + GmImportCharGemsNotify other = (GmImportCharGemsNotify) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasCharGemPresets() || charGemPresets.equals(other.charGemPresets)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharGemSlots() || charGemSlots.equals(other.charGemSlots)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(charGemPresets); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < charGemSlots.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(charGemSlots.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(charGemPresets); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * charGemSlots.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charGemSlots); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmImportCharGemsNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // charGemPresets + input.readMessage(charGemPresets); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // charGemSlots + tag = input.readRepeatedMessage(charGemSlots, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.charGemPresets, charGemPresets); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.charGemSlots, charGemSlots); + } + output.endObject(); + } + + @Override + public GmImportCharGemsNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82576187: { + if (input.isAtField(FieldNames.charGemPresets)) { + if (!input.trySkipNullValue()) { + input.readMessage(charGemPresets); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2084461124: { + if (input.isAtField(FieldNames.charGemSlots)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charGemSlots); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmImportCharGemsNotify clone() { + return new GmImportCharGemsNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmImportCharGemsNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmImportCharGemsNotify(), data).checkInitialized(); + } + + public static GmImportCharGemsNotify parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmImportCharGemsNotify(), input).checkInitialized(); + } + + public static GmImportCharGemsNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmImportCharGemsNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating GmImportCharGemsNotify messages + */ + public static MessageFactory getFactory() { + return GmImportCharGemsNotifyFactory.INSTANCE; + } + + private enum GmImportCharGemsNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public GmImportCharGemsNotify create() { + return GmImportCharGemsNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName charGemPresets = FieldName.forField("CharGemPresets"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charGemSlots = FieldName.forField("CharGemSlots"); + } + } + + /** + * Protobuf type {@code GmClearAllActivityAvgNotify} + */ + public static final class GmClearAllActivityAvgNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ActivityAvg Avgs = 1; + */ + private final RepeatedMessage avgs = RepeatedMessage.newEmptyInstance(Public.ActivityAvg.getFactory()); + + private GmClearAllActivityAvgNotify() { + } + + /** + * @return a new empty instance of {@code GmClearAllActivityAvgNotify} + */ + public static GmClearAllActivityAvgNotify newInstance() { + return new GmClearAllActivityAvgNotify(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllActivityAvgNotify clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllActivityAvgNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllActivityAvgNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllActivityAvgNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ActivityAvg Avgs = 1; + * @return whether the avgs field is set + */ + public boolean hasAvgs() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .ActivityAvg Avgs = 1; + * @return this + */ + public GmClearAllActivityAvgNotify clearAvgs() { + bitField0_ &= ~0x00000002; + avgs.clear(); + return this; + } + + /** + * repeated .ActivityAvg Avgs = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAvgs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getAvgs() { + return avgs; + } + + /** + * repeated .ActivityAvg Avgs = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableAvgs() { + bitField0_ |= 0x00000002; + return avgs; + } + + /** + * repeated .ActivityAvg Avgs = 1; + * @param value the avgs to add + * @return this + */ + public GmClearAllActivityAvgNotify addAvgs(final Public.ActivityAvg value) { + bitField0_ |= 0x00000002; + avgs.add(value); + return this; + } + + /** + * repeated .ActivityAvg Avgs = 1; + * @param values the avgs to add + * @return this + */ + public GmClearAllActivityAvgNotify addAllAvgs(final Public.ActivityAvg... values) { + bitField0_ |= 0x00000002; + avgs.addAll(values); + return this; + } + + @Override + public GmClearAllActivityAvgNotify copyFrom(final GmClearAllActivityAvgNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + avgs.copyFrom(other.avgs); + } + return this; + } + + @Override + public GmClearAllActivityAvgNotify mergeFrom(final GmClearAllActivityAvgNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAvgs()) { + getMutableAvgs().addAll(other.avgs); + } + return this; + } + + @Override + public GmClearAllActivityAvgNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + avgs.clear(); + return this; + } + + @Override + public GmClearAllActivityAvgNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + avgs.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllActivityAvgNotify)) { + return false; + } + GmClearAllActivityAvgNotify other = (GmClearAllActivityAvgNotify) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAvgs() || avgs.equals(other.avgs)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < avgs.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(avgs.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * avgs.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(avgs); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllActivityAvgNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // avgs + tag = input.readRepeatedMessage(avgs, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.avgs, avgs); + } + output.endObject(); + } + + @Override + public GmClearAllActivityAvgNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2053121: { + if (input.isAtField(FieldNames.avgs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(avgs); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllActivityAvgNotify clone() { + return new GmClearAllActivityAvgNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllActivityAvgNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllActivityAvgNotify(), data).checkInitialized(); + } + + public static GmClearAllActivityAvgNotify parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new GmClearAllActivityAvgNotify(), input).checkInitialized(); + } + + public static GmClearAllActivityAvgNotify parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new GmClearAllActivityAvgNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllActivityAvgNotify messages + */ + public static MessageFactory getFactory() { + return GmClearAllActivityAvgNotifyFactory.INSTANCE; + } + + private enum GmClearAllActivityAvgNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllActivityAvgNotify create() { + return GmClearAllActivityAvgNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName avgs = FieldName.forField("Avgs"); + } + } + + /** + * Protobuf type {@code GmClearAllActivityLevelsNotify} + */ + public static final class GmClearAllActivityLevelsNotify extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ActivityLevels levels = 1; + */ + private final RepeatedMessage levels = RepeatedMessage.newEmptyInstance(Public.ActivityLevels.getFactory()); + + private GmClearAllActivityLevelsNotify() { + } + + /** + * @return a new empty instance of {@code GmClearAllActivityLevelsNotify} + */ + public static GmClearAllActivityLevelsNotify newInstance() { + return new GmClearAllActivityLevelsNotify(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public GmClearAllActivityLevelsNotify clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public GmClearAllActivityLevelsNotify addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public GmClearAllActivityLevelsNotify addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public GmClearAllActivityLevelsNotify setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ActivityLevels levels = 1; + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .ActivityLevels levels = 1; + * @return this + */ + public GmClearAllActivityLevelsNotify clearLevels() { + bitField0_ &= ~0x00000002; + levels.clear(); + return this; + } + + /** + * repeated .ActivityLevels levels = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getLevels() { + return levels; + } + + /** + * repeated .ActivityLevels levels = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableLevels() { + bitField0_ |= 0x00000002; + return levels; + } + + /** + * repeated .ActivityLevels levels = 1; + * @param value the levels to add + * @return this + */ + public GmClearAllActivityLevelsNotify addLevels(final Public.ActivityLevels value) { + bitField0_ |= 0x00000002; + levels.add(value); + return this; + } + + /** + * repeated .ActivityLevels levels = 1; + * @param values the levels to add + * @return this + */ + public GmClearAllActivityLevelsNotify addAllLevels(final Public.ActivityLevels... values) { + bitField0_ |= 0x00000002; + levels.addAll(values); + return this; + } + + @Override + public GmClearAllActivityLevelsNotify copyFrom(final GmClearAllActivityLevelsNotify other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + levels.copyFrom(other.levels); + } + return this; + } + + @Override + public GmClearAllActivityLevelsNotify mergeFrom(final GmClearAllActivityLevelsNotify other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasLevels()) { + getMutableLevels().addAll(other.levels); + } + return this; + } + + @Override + public GmClearAllActivityLevelsNotify clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + levels.clear(); + return this; + } + + @Override + public GmClearAllActivityLevelsNotify clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + levels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof GmClearAllActivityLevelsNotify)) { + return false; + } + GmClearAllActivityLevelsNotify other = (GmClearAllActivityLevelsNotify) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasLevels() || levels.equals(other.levels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < levels.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(levels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * levels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(levels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public GmClearAllActivityLevelsNotify mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // levels + tag = input.readRepeatedMessage(levels, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.levels, levels); + } + output.endObject(); + } + + @Override + public GmClearAllActivityLevelsNotify mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1106127505: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(levels); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public GmClearAllActivityLevelsNotify clone() { + return new GmClearAllActivityLevelsNotify().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static GmClearAllActivityLevelsNotify parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new GmClearAllActivityLevelsNotify(), data).checkInitialized(); + } + + public static GmClearAllActivityLevelsNotify parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new GmClearAllActivityLevelsNotify(), input).checkInitialized(); + } + + public static GmClearAllActivityLevelsNotify parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new GmClearAllActivityLevelsNotify(), input).checkInitialized(); + } + + /** + * @return factory for creating GmClearAllActivityLevelsNotify messages + */ + public static MessageFactory getFactory() { + return GmClearAllActivityLevelsNotifyFactory.INSTANCE; + } + + private enum GmClearAllActivityLevelsNotifyFactory implements MessageFactory { + INSTANCE; + + @Override + public GmClearAllActivityLevelsNotify create() { + return GmClearAllActivityLevelsNotify.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName levels = FieldName.forField("levels"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/NpcAffinityBookGet.java b/src/generated/main/emu/nebula/proto/NpcAffinityBookGet.java new file mode 100644 index 0000000..689d446 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/NpcAffinityBookGet.java @@ -0,0 +1,497 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class NpcAffinityBookGet { + /** + * Protobuf type {@code NPCAffinityBookGetResp} + */ + public static final class NPCAffinityBookGetResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Number = 2; + */ + private int number; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .NPCAffinity Infos = 1; + */ + private final RepeatedMessage infos = RepeatedMessage.newEmptyInstance(Public.NPCAffinity.getFactory()); + + private NPCAffinityBookGetResp() { + } + + /** + * @return a new empty instance of {@code NPCAffinityBookGetResp} + */ + public static NPCAffinityBookGetResp newInstance() { + return new NPCAffinityBookGetResp(); + } + + /** + * optional uint32 Number = 2; + * @return whether the number field is set + */ + public boolean hasNumber() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Number = 2; + * @return this + */ + public NPCAffinityBookGetResp clearNumber() { + bitField0_ &= ~0x00000001; + number = 0; + return this; + } + + /** + * optional uint32 Number = 2; + * @return the number + */ + public int getNumber() { + return number; + } + + /** + * optional uint32 Number = 2; + * @param value the number to set + * @return this + */ + public NPCAffinityBookGetResp setNumber(final int value) { + bitField0_ |= 0x00000001; + number = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public NPCAffinityBookGetResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public NPCAffinityBookGetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public NPCAffinityBookGetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public NPCAffinityBookGetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .NPCAffinity Infos = 1; + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .NPCAffinity Infos = 1; + * @return this + */ + public NPCAffinityBookGetResp clearInfos() { + bitField0_ &= ~0x00000004; + infos.clear(); + return this; + } + + /** + * repeated .NPCAffinity Infos = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getInfos() { + return infos; + } + + /** + * repeated .NPCAffinity Infos = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableInfos() { + bitField0_ |= 0x00000004; + return infos; + } + + /** + * repeated .NPCAffinity Infos = 1; + * @param value the infos to add + * @return this + */ + public NPCAffinityBookGetResp addInfos(final Public.NPCAffinity value) { + bitField0_ |= 0x00000004; + infos.add(value); + return this; + } + + /** + * repeated .NPCAffinity Infos = 1; + * @param values the infos to add + * @return this + */ + public NPCAffinityBookGetResp addAllInfos(final Public.NPCAffinity... values) { + bitField0_ |= 0x00000004; + infos.addAll(values); + return this; + } + + @Override + public NPCAffinityBookGetResp copyFrom(final NPCAffinityBookGetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + number = other.number; + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public NPCAffinityBookGetResp mergeFrom(final NPCAffinityBookGetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNumber()) { + setNumber(other.number); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public NPCAffinityBookGetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + number = 0; + nextPackage.clear(); + infos.clear(); + return this; + } + + @Override + public NPCAffinityBookGetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NPCAffinityBookGetResp)) { + return false; + } + NPCAffinityBookGetResp other = (NPCAffinityBookGetResp) o; + return bitField0_ == other.bitField0_ + && (!hasNumber() || number == other.number) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(number); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(number); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NPCAffinityBookGetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // number + number = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.number, number); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public NPCAffinityBookGetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1950496919: { + if (input.isAtField(FieldNames.number)) { + if (!input.trySkipNullValue()) { + number = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NPCAffinityBookGetResp clone() { + return new NPCAffinityBookGetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NPCAffinityBookGetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NPCAffinityBookGetResp(), data).checkInitialized(); + } + + public static NPCAffinityBookGetResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityBookGetResp(), input).checkInitialized(); + } + + public static NPCAffinityBookGetResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityBookGetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating NPCAffinityBookGetResp messages + */ + public static MessageFactory getFactory() { + return NPCAffinityBookGetRespFactory.INSTANCE; + } + + private enum NPCAffinityBookGetRespFactory implements MessageFactory { + INSTANCE; + + @Override + public NPCAffinityBookGetResp create() { + return NPCAffinityBookGetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName number = FieldName.forField("Number"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/NpcAffinityPlotRewardReceive.java b/src/generated/main/emu/nebula/proto/NpcAffinityPlotRewardReceive.java new file mode 100644 index 0000000..2d8cbd6 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/NpcAffinityPlotRewardReceive.java @@ -0,0 +1,521 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class NpcAffinityPlotRewardReceive { + /** + * Protobuf type {@code NPCAffinityPlotRewardReceiveResp} + */ + public static final class NPCAffinityPlotRewardReceiveResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .ChangeInfo Change = 2; + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Show = 1; + */ + private final RepeatedMessage show = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private NPCAffinityPlotRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code NPCAffinityPlotRewardReceiveResp} + */ + public static NPCAffinityPlotRewardReceiveResp newInstance() { + return new NPCAffinityPlotRewardReceiveResp(); + } + + /** + * optional .ChangeInfo Change = 2; + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .ChangeInfo Change = 2; + * @return this + */ + public NPCAffinityPlotRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * optional .ChangeInfo Change = 2; + * @param value the change to set + * @return this + */ + public NPCAffinityPlotRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public NPCAffinityPlotRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public NPCAffinityPlotRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public NPCAffinityPlotRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public NPCAffinityPlotRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * @return whether the show field is set + */ + public boolean hasShow() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .ItemTpl Show = 1; + * @return this + */ + public NPCAffinityPlotRewardReceiveResp clearShow() { + bitField0_ &= ~0x00000004; + show.clear(); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShow()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getShow() { + return show; + } + + /** + * repeated .ItemTpl Show = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableShow() { + bitField0_ |= 0x00000004; + return show; + } + + /** + * repeated .ItemTpl Show = 1; + * @param value the show to add + * @return this + */ + public NPCAffinityPlotRewardReceiveResp addShow(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + show.add(value); + return this; + } + + /** + * repeated .ItemTpl Show = 1; + * @param values the show to add + * @return this + */ + public NPCAffinityPlotRewardReceiveResp addAllShow(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + show.addAll(values); + return this; + } + + @Override + public NPCAffinityPlotRewardReceiveResp copyFrom(final NPCAffinityPlotRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + show.copyFrom(other.show); + } + return this; + } + + @Override + public NPCAffinityPlotRewardReceiveResp mergeFrom( + final NPCAffinityPlotRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShow()) { + getMutableShow().addAll(other.show); + } + return this; + } + + @Override + public NPCAffinityPlotRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + show.clear(); + return this; + } + + @Override + public NPCAffinityPlotRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + show.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NPCAffinityPlotRewardReceiveResp)) { + return false; + } + NPCAffinityPlotRewardReceiveResp other = (NPCAffinityPlotRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShow() || show.equals(other.show)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < show.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(show.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * show.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(show); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NPCAffinityPlotRewardReceiveResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // show + tag = input.readRepeatedMessage(show, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.show, show); + } + output.endObject(); + } + + @Override + public NPCAffinityPlotRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576157: { + if (input.isAtField(FieldNames.show)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(show); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NPCAffinityPlotRewardReceiveResp clone() { + return new NPCAffinityPlotRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NPCAffinityPlotRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NPCAffinityPlotRewardReceiveResp(), data).checkInitialized(); + } + + public static NPCAffinityPlotRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new NPCAffinityPlotRewardReceiveResp(), input).checkInitialized(); + } + + public static NPCAffinityPlotRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new NPCAffinityPlotRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating NPCAffinityPlotRewardReceiveResp messages + */ + public static MessageFactory getFactory() { + return NPCAffinityPlotRewardReceiveRespFactory.INSTANCE; + } + + private enum NPCAffinityPlotRewardReceiveRespFactory implements MessageFactory { + INSTANCE; + + @Override + public NPCAffinityPlotRewardReceiveResp create() { + return NPCAffinityPlotRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName show = FieldName.forField("Show"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/Pb.java b/src/generated/main/emu/nebula/proto/Pb.java new file mode 100644 index 0000000..9777db5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/Pb.java @@ -0,0 +1,5025 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoEnum; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class Pb { + /** + * Protobuf enum {@code Platform} + */ + public enum Platform implements ProtoEnum { + /** + * All = 0; + */ + All("All", 0), + + /** + * Ios = 1; + */ + Ios("Ios", 1), + + /** + * Android = 2; + */ + Android("Android", 2), + + /** + * Pc = 3; + */ + Pc("Pc", 3), + + /** + * Harmonyos = 4; + */ + Harmonyos("Harmonyos", 4); + + /** + * All = 0; + */ + public static final int All_VALUE = 0; + + /** + * Ios = 1; + */ + public static final int Ios_VALUE = 1; + + /** + * Android = 2; + */ + public static final int Android_VALUE = 2; + + /** + * Pc = 3; + */ + public static final int Pc_VALUE = 3; + + /** + * Harmonyos = 4; + */ + public static final int Harmonyos_VALUE = 4; + + private final String name; + + private final int number; + + private Platform(String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter converter() { + return PlatformConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static Platform forNumber(int value) { + return PlatformConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static Platform forNumberOr(int number, Platform other) { + Platform value = forNumber(number); + return value == null ? other : value; + } + + enum PlatformConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final Platform[] lookup = new Platform[5]; + + static { + lookup[0] = All; + lookup[1] = Ios; + lookup[2] = Android; + lookup[3] = Pc; + lookup[4] = Harmonyos; + } + + @Override + public final Platform forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final Platform forName(final CharSequence value) { + switch (value.length()) { + case 2: { + if (ProtoUtil.isEqual("Pc", value)) { + return Pc; + } + break; + } + case 3: { + if (ProtoUtil.isEqual("All", value)) { + return All; + } + if (ProtoUtil.isEqual("Ios", value)) { + return Ios; + } + break; + } + case 7: { + if (ProtoUtil.isEqual("Android", value)) { + return Android; + } + break; + } + case 9: { + if (ProtoUtil.isEqual("Harmonyos", value)) { + return Harmonyos; + } + break; + } + } + return null; + } + } + } + + /** + * Protobuf enum {@code OP} + */ + public enum OP implements ProtoEnum { + /** + * Eq = 0; + */ + Eq("Eq", 0), + + /** + * Lt = 1; + */ + Lt("Lt", 1), + + /** + * Gt = 2; + */ + Gt("Gt", 2), + + /** + * Le = 3; + */ + Le("Le", 3), + + /** + * Ge = 4; + */ + Ge("Ge", 4); + + /** + * Eq = 0; + */ + public static final int Eq_VALUE = 0; + + /** + * Lt = 1; + */ + public static final int Lt_VALUE = 1; + + /** + * Gt = 2; + */ + public static final int Gt_VALUE = 2; + + /** + * Le = 3; + */ + public static final int Le_VALUE = 3; + + /** + * Ge = 4; + */ + public static final int Ge_VALUE = 4; + + private final String name; + + private final int number; + + private OP(String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter converter() { + return OPConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static OP forNumber(int value) { + return OPConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static OP forNumberOr(int number, OP other) { + OP value = forNumber(number); + return value == null ? other : value; + } + + enum OPConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final OP[] lookup = new OP[5]; + + static { + lookup[0] = Eq; + lookup[1] = Lt; + lookup[2] = Gt; + lookup[3] = Le; + lookup[4] = Ge; + } + + @Override + public final OP forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final OP forName(final CharSequence value) { + if (value.length() == 2) { + if (ProtoUtil.isEqual("Eq", value)) { + return Eq; + } + if (ProtoUtil.isEqual("Lt", value)) { + return Lt; + } + if (ProtoUtil.isEqual("Gt", value)) { + return Gt; + } + if (ProtoUtil.isEqual("Le", value)) { + return Le; + } + if (ProtoUtil.isEqual("Ge", value)) { + return Ge; + } + } + return null; + } + } + } + + /** + * Protobuf enum {@code Action} + */ + public enum Action implements ProtoEnum { + /** + * Redirect = 0; + */ + Redirect("Redirect", 0), + + /** + * Download = 1; + */ + Download("Download", 1); + + /** + * Redirect = 0; + */ + public static final int Redirect_VALUE = 0; + + /** + * Download = 1; + */ + public static final int Download_VALUE = 1; + + private final String name; + + private final int number; + + private Action(String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter converter() { + return ActionConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static Action forNumber(int value) { + return ActionConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static Action forNumberOr(int number, Action other) { + Action value = forNumber(number); + return value == null ? other : value; + } + + enum ActionConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final Action[] lookup = new Action[2]; + + static { + lookup[0] = Redirect; + lookup[1] = Download; + } + + @Override + public final Action forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final Action forName(final CharSequence value) { + if (value.length() == 8) { + if (ProtoUtil.isEqual("Redirect", value)) { + return Redirect; + } + if (ProtoUtil.isEqual("Download", value)) { + return Download; + } + } + return null; + } + } + } + + /** + * Protobuf type {@code ServerListMeta} + */ + public static final class ServerListMeta extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 version = 1; + */ + private long version; + + /** + * optional sint32 status = 3; + */ + private int status; + + /** + * optional string message = 4; + */ + private final Utf8String message = Utf8String.newEmptyInstance(); + + /** + * optional string report_endpoint = 6; + */ + private final Utf8String reportEndpoint = Utf8String.newEmptyInstance(); + + /** + * repeated .pb.ServerAgent agent = 2; + */ + private final RepeatedMessage agent = RepeatedMessage.newEmptyInstance(ServerAgent.getFactory()); + + /** + * repeated .pb.Rule rules = 7; + */ + private final RepeatedMessage rules = RepeatedMessage.newEmptyInstance(Rule.getFactory()); + + private ServerListMeta() { + } + + /** + * @return a new empty instance of {@code ServerListMeta} + */ + public static ServerListMeta newInstance() { + return new ServerListMeta(); + } + + /** + * optional int64 version = 1; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 version = 1; + * @return this + */ + public ServerListMeta clearVersion() { + bitField0_ &= ~0x00000001; + version = 0L; + return this; + } + + /** + * optional int64 version = 1; + * @return the version + */ + public long getVersion() { + return version; + } + + /** + * optional int64 version = 1; + * @param value the version to set + * @return this + */ + public ServerListMeta setVersion(final long value) { + bitField0_ |= 0x00000001; + version = value; + return this; + } + + /** + * optional sint32 status = 3; + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional sint32 status = 3; + * @return this + */ + public ServerListMeta clearStatus() { + bitField0_ &= ~0x00000002; + status = 0; + return this; + } + + /** + * optional sint32 status = 3; + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * optional sint32 status = 3; + * @param value the status to set + * @return this + */ + public ServerListMeta setStatus(final int value) { + bitField0_ |= 0x00000002; + status = value; + return this; + } + + /** + * optional string message = 4; + * @return whether the message field is set + */ + public boolean hasMessage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string message = 4; + * @return this + */ + public ServerListMeta clearMessage() { + bitField0_ &= ~0x00000004; + message.clear(); + return this; + } + + /** + * optional string message = 4; + * @return the message + */ + public String getMessage() { + return message.getString(); + } + + /** + * optional string message = 4; + * @return internal {@code Utf8String} representation of message for reading + */ + public Utf8String getMessageBytes() { + return this.message; + } + + /** + * optional string message = 4; + * @return internal {@code Utf8String} representation of message for modifications + */ + public Utf8String getMutableMessageBytes() { + bitField0_ |= 0x00000004; + return this.message; + } + + /** + * optional string message = 4; + * @param value the message to set + * @return this + */ + public ServerListMeta setMessage(final CharSequence value) { + bitField0_ |= 0x00000004; + message.copyFrom(value); + return this; + } + + /** + * optional string message = 4; + * @param value the message to set + * @return this + */ + public ServerListMeta setMessage(final Utf8String value) { + bitField0_ |= 0x00000004; + message.copyFrom(value); + return this; + } + + /** + * optional string report_endpoint = 6; + * @return whether the reportEndpoint field is set + */ + public boolean hasReportEndpoint() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string report_endpoint = 6; + * @return this + */ + public ServerListMeta clearReportEndpoint() { + bitField0_ &= ~0x00000008; + reportEndpoint.clear(); + return this; + } + + /** + * optional string report_endpoint = 6; + * @return the reportEndpoint + */ + public String getReportEndpoint() { + return reportEndpoint.getString(); + } + + /** + * optional string report_endpoint = 6; + * @return internal {@code Utf8String} representation of reportEndpoint for reading + */ + public Utf8String getReportEndpointBytes() { + return this.reportEndpoint; + } + + /** + * optional string report_endpoint = 6; + * @return internal {@code Utf8String} representation of reportEndpoint for modifications + */ + public Utf8String getMutableReportEndpointBytes() { + bitField0_ |= 0x00000008; + return this.reportEndpoint; + } + + /** + * optional string report_endpoint = 6; + * @param value the reportEndpoint to set + * @return this + */ + public ServerListMeta setReportEndpoint(final CharSequence value) { + bitField0_ |= 0x00000008; + reportEndpoint.copyFrom(value); + return this; + } + + /** + * optional string report_endpoint = 6; + * @param value the reportEndpoint to set + * @return this + */ + public ServerListMeta setReportEndpoint(final Utf8String value) { + bitField0_ |= 0x00000008; + reportEndpoint.copyFrom(value); + return this; + } + + /** + * repeated .pb.ServerAgent agent = 2; + * @return whether the agent field is set + */ + public boolean hasAgent() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .pb.ServerAgent agent = 2; + * @return this + */ + public ServerListMeta clearAgent() { + bitField0_ &= ~0x00000010; + agent.clear(); + return this; + } + + /** + * repeated .pb.ServerAgent agent = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAgent()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getAgent() { + return agent; + } + + /** + * repeated .pb.ServerAgent agent = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableAgent() { + bitField0_ |= 0x00000010; + return agent; + } + + /** + * repeated .pb.ServerAgent agent = 2; + * @param value the agent to add + * @return this + */ + public ServerListMeta addAgent(final ServerAgent value) { + bitField0_ |= 0x00000010; + agent.add(value); + return this; + } + + /** + * repeated .pb.ServerAgent agent = 2; + * @param values the agent to add + * @return this + */ + public ServerListMeta addAllAgent(final ServerAgent... values) { + bitField0_ |= 0x00000010; + agent.addAll(values); + return this; + } + + /** + * repeated .pb.Rule rules = 7; + * @return whether the rules field is set + */ + public boolean hasRules() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * repeated .pb.Rule rules = 7; + * @return this + */ + public ServerListMeta clearRules() { + bitField0_ &= ~0x00000020; + rules.clear(); + return this; + } + + /** + * repeated .pb.Rule rules = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRules()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRules() { + return rules; + } + + /** + * repeated .pb.Rule rules = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRules() { + bitField0_ |= 0x00000020; + return rules; + } + + /** + * repeated .pb.Rule rules = 7; + * @param value the rules to add + * @return this + */ + public ServerListMeta addRules(final Rule value) { + bitField0_ |= 0x00000020; + rules.add(value); + return this; + } + + /** + * repeated .pb.Rule rules = 7; + * @param values the rules to add + * @return this + */ + public ServerListMeta addAllRules(final Rule... values) { + bitField0_ |= 0x00000020; + rules.addAll(values); + return this; + } + + @Override + public ServerListMeta copyFrom(final ServerListMeta other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + version = other.version; + status = other.status; + message.copyFrom(other.message); + reportEndpoint.copyFrom(other.reportEndpoint); + agent.copyFrom(other.agent); + rules.copyFrom(other.rules); + } + return this; + } + + @Override + public ServerListMeta mergeFrom(final ServerListMeta other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasStatus()) { + setStatus(other.status); + } + if (other.hasMessage()) { + getMutableMessageBytes().copyFrom(other.message); + } + if (other.hasReportEndpoint()) { + getMutableReportEndpointBytes().copyFrom(other.reportEndpoint); + } + if (other.hasAgent()) { + getMutableAgent().addAll(other.agent); + } + if (other.hasRules()) { + getMutableRules().addAll(other.rules); + } + return this; + } + + @Override + public ServerListMeta clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + version = 0L; + status = 0; + message.clear(); + reportEndpoint.clear(); + agent.clear(); + rules.clear(); + return this; + } + + @Override + public ServerListMeta clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + message.clear(); + reportEndpoint.clear(); + agent.clearQuick(); + rules.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ServerListMeta)) { + return false; + } + ServerListMeta other = (ServerListMeta) o; + return bitField0_ == other.bitField0_ + && (!hasVersion() || version == other.version) + && (!hasStatus() || status == other.status) + && (!hasMessage() || message.equals(other.message)) + && (!hasReportEndpoint() || reportEndpoint.equals(other.reportEndpoint)) + && (!hasAgent() || agent.equals(other.agent)) + && (!hasRules() || rules.equals(other.rules)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt64NoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeSInt32NoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 34); + output.writeStringNoTag(message); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 50); + output.writeStringNoTag(reportEndpoint); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < agent.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(agent.get(i)); + } + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < rules.length(); i++) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(rules.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeSInt32SizeNoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(message); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(reportEndpoint); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * agent.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(agent); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * rules.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rules); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ServerListMeta mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // version + version = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // status + status = input.readSInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // message + input.readString(message); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // reportEndpoint + input.readString(reportEndpoint); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // agent + tag = input.readRepeatedMessage(agent, tag); + bitField0_ |= 0x00000010; + if (tag != 58) { + break; + } + } + case 58: { + // rules + tag = input.readRepeatedMessage(rules, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.version, version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeSInt32(FieldNames.status, status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.message, message); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.reportEndpoint, reportEndpoint); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.agent, agent); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.rules, rules); + } + output.endObject(); + } + + @Override + public ServerListMeta mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 351608024: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -892481550: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + status = input.readSInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 954925063: { + if (input.isAtField(FieldNames.message)) { + if (!input.trySkipNullValue()) { + input.readString(message); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -22060311: + case 1004180544: { + if (input.isAtField(FieldNames.reportEndpoint)) { + if (!input.trySkipNullValue()) { + input.readString(reportEndpoint); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 92750597: { + if (input.isAtField(FieldNames.agent)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(agent); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 108873975: { + if (input.isAtField(FieldNames.rules)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rules); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ServerListMeta clone() { + return new ServerListMeta().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ServerListMeta parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ServerListMeta(), data).checkInitialized(); + } + + public static ServerListMeta parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ServerListMeta(), input).checkInitialized(); + } + + public static ServerListMeta parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ServerListMeta(), input).checkInitialized(); + } + + /** + * @return factory for creating ServerListMeta messages + */ + public static MessageFactory getFactory() { + return ServerListMetaFactory.INSTANCE; + } + + private enum ServerListMetaFactory implements MessageFactory { + INSTANCE; + + @Override + public ServerListMeta create() { + return ServerListMeta.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName version = FieldName.forField("version"); + + static final FieldName status = FieldName.forField("status"); + + static final FieldName message = FieldName.forField("message"); + + static final FieldName reportEndpoint = FieldName.forField("reportEndpoint", "report_endpoint"); + + static final FieldName agent = FieldName.forField("agent"); + + static final FieldName rules = FieldName.forField("rules"); + } + } + + /** + * Protobuf type {@code ServerAgent} + */ + public static final class ServerAgent extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 zone = 4; + */ + private long zone; + + /** + * optional int32 status = 3; + */ + private int status; + + /** + * optional string name = 1; + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + /** + * optional string addr = 2; + */ + private final Utf8String addr = Utf8String.newEmptyInstance(); + + private ServerAgent() { + } + + /** + * @return a new empty instance of {@code ServerAgent} + */ + public static ServerAgent newInstance() { + return new ServerAgent(); + } + + /** + * optional int64 zone = 4; + * @return whether the zone field is set + */ + public boolean hasZone() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 zone = 4; + * @return this + */ + public ServerAgent clearZone() { + bitField0_ &= ~0x00000001; + zone = 0L; + return this; + } + + /** + * optional int64 zone = 4; + * @return the zone + */ + public long getZone() { + return zone; + } + + /** + * optional int64 zone = 4; + * @param value the zone to set + * @return this + */ + public ServerAgent setZone(final long value) { + bitField0_ |= 0x00000001; + zone = value; + return this; + } + + /** + * optional int32 status = 3; + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int32 status = 3; + * @return this + */ + public ServerAgent clearStatus() { + bitField0_ &= ~0x00000002; + status = 0; + return this; + } + + /** + * optional int32 status = 3; + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * optional int32 status = 3; + * @param value the status to set + * @return this + */ + public ServerAgent setStatus(final int value) { + bitField0_ |= 0x00000002; + status = value; + return this; + } + + /** + * optional string name = 1; + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string name = 1; + * @return this + */ + public ServerAgent clearName() { + bitField0_ &= ~0x00000004; + name.clear(); + return this; + } + + /** + * optional string name = 1; + * @return the name + */ + public String getName() { + return name.getString(); + } + + /** + * optional string name = 1; + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * optional string name = 1; + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000004; + return this.name; + } + + /** + * optional string name = 1; + * @param value the name to set + * @return this + */ + public ServerAgent setName(final CharSequence value) { + bitField0_ |= 0x00000004; + name.copyFrom(value); + return this; + } + + /** + * optional string name = 1; + * @param value the name to set + * @return this + */ + public ServerAgent setName(final Utf8String value) { + bitField0_ |= 0x00000004; + name.copyFrom(value); + return this; + } + + /** + * optional string addr = 2; + * @return whether the addr field is set + */ + public boolean hasAddr() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string addr = 2; + * @return this + */ + public ServerAgent clearAddr() { + bitField0_ &= ~0x00000008; + addr.clear(); + return this; + } + + /** + * optional string addr = 2; + * @return the addr + */ + public String getAddr() { + return addr.getString(); + } + + /** + * optional string addr = 2; + * @return internal {@code Utf8String} representation of addr for reading + */ + public Utf8String getAddrBytes() { + return this.addr; + } + + /** + * optional string addr = 2; + * @return internal {@code Utf8String} representation of addr for modifications + */ + public Utf8String getMutableAddrBytes() { + bitField0_ |= 0x00000008; + return this.addr; + } + + /** + * optional string addr = 2; + * @param value the addr to set + * @return this + */ + public ServerAgent setAddr(final CharSequence value) { + bitField0_ |= 0x00000008; + addr.copyFrom(value); + return this; + } + + /** + * optional string addr = 2; + * @param value the addr to set + * @return this + */ + public ServerAgent setAddr(final Utf8String value) { + bitField0_ |= 0x00000008; + addr.copyFrom(value); + return this; + } + + @Override + public ServerAgent copyFrom(final ServerAgent other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + zone = other.zone; + status = other.status; + name.copyFrom(other.name); + addr.copyFrom(other.addr); + } + return this; + } + + @Override + public ServerAgent mergeFrom(final ServerAgent other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasZone()) { + setZone(other.zone); + } + if (other.hasStatus()) { + setStatus(other.status); + } + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + if (other.hasAddr()) { + getMutableAddrBytes().copyFrom(other.addr); + } + return this; + } + + @Override + public ServerAgent clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + zone = 0L; + status = 0; + name.clear(); + addr.clear(); + return this; + } + + @Override + public ServerAgent clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + name.clear(); + addr.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ServerAgent)) { + return false; + } + ServerAgent other = (ServerAgent) o; + return bitField0_ == other.bitField0_ + && (!hasZone() || zone == other.zone) + && (!hasStatus() || status == other.status) + && (!hasName() || name.equals(other.name)) + && (!hasAddr() || addr.equals(other.addr)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeInt64NoTag(zone); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeInt32NoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(name); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(addr); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(zone); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(addr); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ServerAgent mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // zone + zone = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // status + status = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // name + input.readString(name); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // addr + input.readString(addr); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.zone, zone); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.status, status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.name, name); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.addr, addr); + } + output.endObject(); + } + + @Override + public ServerAgent mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3744684: { + if (input.isAtField(FieldNames.zone)) { + if (!input.trySkipNullValue()) { + zone = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -892481550: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + status = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3373707: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2989041: { + if (input.isAtField(FieldNames.addr)) { + if (!input.trySkipNullValue()) { + input.readString(addr); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ServerAgent clone() { + return new ServerAgent().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ServerAgent parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ServerAgent(), data).checkInitialized(); + } + + public static ServerAgent parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ServerAgent(), input).checkInitialized(); + } + + public static ServerAgent parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ServerAgent(), input).checkInitialized(); + } + + /** + * @return factory for creating ServerAgent messages + */ + public static MessageFactory getFactory() { + return ServerAgentFactory.INSTANCE; + } + + private enum ServerAgentFactory implements MessageFactory { + INSTANCE; + + @Override + public ServerAgent create() { + return ServerAgent.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName zone = FieldName.forField("zone"); + + static final FieldName status = FieldName.forField("status"); + + static final FieldName name = FieldName.forField("name"); + + static final FieldName addr = FieldName.forField("addr"); + } + } + + /** + * Protobuf type {@code ClientDiff} + */ + public static final class ClientDiff extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * repeated .pb.FileDiff diff = 1; + */ + private final RepeatedMessage diff = RepeatedMessage.newEmptyInstance(FileDiff.getFactory()); + + private ClientDiff() { + } + + /** + * @return a new empty instance of {@code ClientDiff} + */ + public static ClientDiff newInstance() { + return new ClientDiff(); + } + + /** + * repeated .pb.FileDiff diff = 1; + * @return whether the diff field is set + */ + public boolean hasDiff() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * repeated .pb.FileDiff diff = 1; + * @return this + */ + public ClientDiff clearDiff() { + bitField0_ &= ~0x00000001; + diff.clear(); + return this; + } + + /** + * repeated .pb.FileDiff diff = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDiff()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getDiff() { + return diff; + } + + /** + * repeated .pb.FileDiff diff = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableDiff() { + bitField0_ |= 0x00000001; + return diff; + } + + /** + * repeated .pb.FileDiff diff = 1; + * @param value the diff to add + * @return this + */ + public ClientDiff addDiff(final FileDiff value) { + bitField0_ |= 0x00000001; + diff.add(value); + return this; + } + + /** + * repeated .pb.FileDiff diff = 1; + * @param values the diff to add + * @return this + */ + public ClientDiff addAllDiff(final FileDiff... values) { + bitField0_ |= 0x00000001; + diff.addAll(values); + return this; + } + + @Override + public ClientDiff copyFrom(final ClientDiff other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + diff.copyFrom(other.diff); + } + return this; + } + + @Override + public ClientDiff mergeFrom(final ClientDiff other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDiff()) { + getMutableDiff().addAll(other.diff); + } + return this; + } + + @Override + public ClientDiff clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + diff.clear(); + return this; + } + + @Override + public ClientDiff clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + diff.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ClientDiff)) { + return false; + } + ClientDiff other = (ClientDiff) o; + return bitField0_ == other.bitField0_ + && (!hasDiff() || diff.equals(other.diff)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + for (int i = 0; i < diff.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(diff.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += (1 * diff.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(diff); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ClientDiff mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // diff + tag = input.readRepeatedMessage(diff, tag); + bitField0_ |= 0x00000001; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeRepeatedMessage(FieldNames.diff, diff); + } + output.endObject(); + } + + @Override + public ClientDiff mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3083269: { + if (input.isAtField(FieldNames.diff)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(diff); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ClientDiff clone() { + return new ClientDiff().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ClientDiff parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ClientDiff(), data).checkInitialized(); + } + + public static ClientDiff parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ClientDiff(), input).checkInitialized(); + } + + public static ClientDiff parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ClientDiff(), input).checkInitialized(); + } + + /** + * @return factory for creating ClientDiff messages + */ + public static MessageFactory getFactory() { + return ClientDiffFactory.INSTANCE; + } + + private enum ClientDiffFactory implements MessageFactory { + INSTANCE; + + @Override + public ClientDiff create() { + return ClientDiff.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName diff = FieldName.forField("diff"); + } + } + + /** + * Protobuf type {@code FileDiff} + */ + public static final class FileDiff extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 version = 3; + */ + private long version; + + /** + * optional string file_name = 1; + */ + private final Utf8String fileName = Utf8String.newEmptyInstance(); + + /** + * optional string hash = 2; + */ + private final Utf8String hash = Utf8String.newEmptyInstance(); + + /** + * optional string additional_path = 4; + */ + private final Utf8String additionalPath = Utf8String.newEmptyInstance(); + + private FileDiff() { + } + + /** + * @return a new empty instance of {@code FileDiff} + */ + public static FileDiff newInstance() { + return new FileDiff(); + } + + /** + * optional int64 version = 3; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 version = 3; + * @return this + */ + public FileDiff clearVersion() { + bitField0_ &= ~0x00000001; + version = 0L; + return this; + } + + /** + * optional int64 version = 3; + * @return the version + */ + public long getVersion() { + return version; + } + + /** + * optional int64 version = 3; + * @param value the version to set + * @return this + */ + public FileDiff setVersion(final long value) { + bitField0_ |= 0x00000001; + version = value; + return this; + } + + /** + * optional string file_name = 1; + * @return whether the fileName field is set + */ + public boolean hasFileName() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string file_name = 1; + * @return this + */ + public FileDiff clearFileName() { + bitField0_ &= ~0x00000002; + fileName.clear(); + return this; + } + + /** + * optional string file_name = 1; + * @return the fileName + */ + public String getFileName() { + return fileName.getString(); + } + + /** + * optional string file_name = 1; + * @return internal {@code Utf8String} representation of fileName for reading + */ + public Utf8String getFileNameBytes() { + return this.fileName; + } + + /** + * optional string file_name = 1; + * @return internal {@code Utf8String} representation of fileName for modifications + */ + public Utf8String getMutableFileNameBytes() { + bitField0_ |= 0x00000002; + return this.fileName; + } + + /** + * optional string file_name = 1; + * @param value the fileName to set + * @return this + */ + public FileDiff setFileName(final CharSequence value) { + bitField0_ |= 0x00000002; + fileName.copyFrom(value); + return this; + } + + /** + * optional string file_name = 1; + * @param value the fileName to set + * @return this + */ + public FileDiff setFileName(final Utf8String value) { + bitField0_ |= 0x00000002; + fileName.copyFrom(value); + return this; + } + + /** + * optional string hash = 2; + * @return whether the hash field is set + */ + public boolean hasHash() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string hash = 2; + * @return this + */ + public FileDiff clearHash() { + bitField0_ &= ~0x00000004; + hash.clear(); + return this; + } + + /** + * optional string hash = 2; + * @return the hash + */ + public String getHash() { + return hash.getString(); + } + + /** + * optional string hash = 2; + * @return internal {@code Utf8String} representation of hash for reading + */ + public Utf8String getHashBytes() { + return this.hash; + } + + /** + * optional string hash = 2; + * @return internal {@code Utf8String} representation of hash for modifications + */ + public Utf8String getMutableHashBytes() { + bitField0_ |= 0x00000004; + return this.hash; + } + + /** + * optional string hash = 2; + * @param value the hash to set + * @return this + */ + public FileDiff setHash(final CharSequence value) { + bitField0_ |= 0x00000004; + hash.copyFrom(value); + return this; + } + + /** + * optional string hash = 2; + * @param value the hash to set + * @return this + */ + public FileDiff setHash(final Utf8String value) { + bitField0_ |= 0x00000004; + hash.copyFrom(value); + return this; + } + + /** + * optional string additional_path = 4; + * @return whether the additionalPath field is set + */ + public boolean hasAdditionalPath() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string additional_path = 4; + * @return this + */ + public FileDiff clearAdditionalPath() { + bitField0_ &= ~0x00000008; + additionalPath.clear(); + return this; + } + + /** + * optional string additional_path = 4; + * @return the additionalPath + */ + public String getAdditionalPath() { + return additionalPath.getString(); + } + + /** + * optional string additional_path = 4; + * @return internal {@code Utf8String} representation of additionalPath for reading + */ + public Utf8String getAdditionalPathBytes() { + return this.additionalPath; + } + + /** + * optional string additional_path = 4; + * @return internal {@code Utf8String} representation of additionalPath for modifications + */ + public Utf8String getMutableAdditionalPathBytes() { + bitField0_ |= 0x00000008; + return this.additionalPath; + } + + /** + * optional string additional_path = 4; + * @param value the additionalPath to set + * @return this + */ + public FileDiff setAdditionalPath(final CharSequence value) { + bitField0_ |= 0x00000008; + additionalPath.copyFrom(value); + return this; + } + + /** + * optional string additional_path = 4; + * @param value the additionalPath to set + * @return this + */ + public FileDiff setAdditionalPath(final Utf8String value) { + bitField0_ |= 0x00000008; + additionalPath.copyFrom(value); + return this; + } + + @Override + public FileDiff copyFrom(final FileDiff other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + version = other.version; + fileName.copyFrom(other.fileName); + hash.copyFrom(other.hash); + additionalPath.copyFrom(other.additionalPath); + } + return this; + } + + @Override + public FileDiff mergeFrom(final FileDiff other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasFileName()) { + getMutableFileNameBytes().copyFrom(other.fileName); + } + if (other.hasHash()) { + getMutableHashBytes().copyFrom(other.hash); + } + if (other.hasAdditionalPath()) { + getMutableAdditionalPathBytes().copyFrom(other.additionalPath); + } + return this; + } + + @Override + public FileDiff clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + version = 0L; + fileName.clear(); + hash.clear(); + additionalPath.clear(); + return this; + } + + @Override + public FileDiff clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + fileName.clear(); + hash.clear(); + additionalPath.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FileDiff)) { + return false; + } + FileDiff other = (FileDiff) o; + return bitField0_ == other.bitField0_ + && (!hasVersion() || version == other.version) + && (!hasFileName() || fileName.equals(other.fileName)) + && (!hasHash() || hash.equals(other.hash)) + && (!hasAdditionalPath() || additionalPath.equals(other.additionalPath)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(fileName); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(hash); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeStringNoTag(additionalPath); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(fileName); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(hash); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(additionalPath); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FileDiff mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // version + version = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // fileName + input.readString(fileName); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // hash + input.readString(hash); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // additionalPath + input.readString(additionalPath); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.version, version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.fileName, fileName); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.hash, hash); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.additionalPath, additionalPath); + } + output.endObject(); + } + + @Override + public FileDiff mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 351608024: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -735721945: + case -1316467858: { + if (input.isAtField(FieldNames.fileName)) { + if (!input.trySkipNullValue()) { + input.readString(fileName); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3195150: { + if (input.isAtField(FieldNames.hash)) { + if (!input.trySkipNullValue()) { + input.readString(hash); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -974101268: + case -118086339: { + if (input.isAtField(FieldNames.additionalPath)) { + if (!input.trySkipNullValue()) { + input.readString(additionalPath); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FileDiff clone() { + return new FileDiff().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FileDiff parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FileDiff(), data).checkInitialized(); + } + + public static FileDiff parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FileDiff(), input).checkInitialized(); + } + + public static FileDiff parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FileDiff(), input).checkInitialized(); + } + + /** + * @return factory for creating FileDiff messages + */ + public static MessageFactory getFactory() { + return FileDiffFactory.INSTANCE; + } + + private enum FileDiffFactory implements MessageFactory { + INSTANCE; + + @Override + public FileDiff create() { + return FileDiff.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName version = FieldName.forField("version"); + + static final FieldName fileName = FieldName.forField("fileName", "file_name"); + + static final FieldName hash = FieldName.forField("hash"); + + static final FieldName additionalPath = FieldName.forField("additionalPath", "additional_path"); + } + } + + /** + * Protobuf type {@code Rule} + */ + public static final class Rule extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .pb.Platform platform = 1; + */ + private int platform; + + /** + * optional .pb.OP op = 4; + */ + private int op; + + /** + * optional .pb.Action action = 5; + */ + private int action; + + /** + * optional bool enable = 7; + */ + private boolean enable; + + /** + * optional string channel = 2; + */ + private final Utf8String channel = Utf8String.newEmptyInstance(); + + /** + * optional string version = 3; + */ + private final Utf8String version = Utf8String.newEmptyInstance(); + + /** + * optional string url = 6; + */ + private final Utf8String url = Utf8String.newEmptyInstance(); + + private Rule() { + } + + /** + * @return a new empty instance of {@code Rule} + */ + public static Rule newInstance() { + return new Rule(); + } + + /** + * optional .pb.Platform platform = 1; + * @return whether the platform field is set + */ + public boolean hasPlatform() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .pb.Platform platform = 1; + * @return this + */ + public Rule clearPlatform() { + bitField0_ &= ~0x00000001; + platform = 0; + return this; + } + + /** + * optional .pb.Platform platform = 1; + * @return the platform + */ + public Platform getPlatform() { + return Platform.forNumber(platform); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link Rule#getPlatform()}.getNumber(). + * + * @return numeric wire representation + */ + public int getPlatformValue() { + return platform; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link Platform}. Setting an invalid value + * can cause {@link Rule#getPlatform()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public Rule setPlatformValue(final int value) { + bitField0_ |= 0x00000001; + platform = value; + return this; + } + + /** + * optional .pb.Platform platform = 1; + * @param value the platform to set + * @return this + */ + public Rule setPlatform(final Platform value) { + bitField0_ |= 0x00000001; + platform = value.getNumber(); + return this; + } + + /** + * optional .pb.OP op = 4; + * @return whether the op field is set + */ + public boolean hasOp() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .pb.OP op = 4; + * @return this + */ + public Rule clearOp() { + bitField0_ &= ~0x00000002; + op = 0; + return this; + } + + /** + * optional .pb.OP op = 4; + * @return the op + */ + public OP getOp() { + return OP.forNumber(op); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link Rule#getOp()}.getNumber(). + * + * @return numeric wire representation + */ + public int getOpValue() { + return op; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link OP}. Setting an invalid value + * can cause {@link Rule#getOp()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public Rule setOpValue(final int value) { + bitField0_ |= 0x00000002; + op = value; + return this; + } + + /** + * optional .pb.OP op = 4; + * @param value the op to set + * @return this + */ + public Rule setOp(final OP value) { + bitField0_ |= 0x00000002; + op = value.getNumber(); + return this; + } + + /** + * optional .pb.Action action = 5; + * @return whether the action field is set + */ + public boolean hasAction() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .pb.Action action = 5; + * @return this + */ + public Rule clearAction() { + bitField0_ &= ~0x00000004; + action = 0; + return this; + } + + /** + * optional .pb.Action action = 5; + * @return the action + */ + public Action getAction() { + return Action.forNumber(action); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link Rule#getAction()}.getNumber(). + * + * @return numeric wire representation + */ + public int getActionValue() { + return action; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link Action}. Setting an invalid value + * can cause {@link Rule#getAction()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public Rule setActionValue(final int value) { + bitField0_ |= 0x00000004; + action = value; + return this; + } + + /** + * optional .pb.Action action = 5; + * @param value the action to set + * @return this + */ + public Rule setAction(final Action value) { + bitField0_ |= 0x00000004; + action = value.getNumber(); + return this; + } + + /** + * optional bool enable = 7; + * @return whether the enable field is set + */ + public boolean hasEnable() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bool enable = 7; + * @return this + */ + public Rule clearEnable() { + bitField0_ &= ~0x00000008; + enable = false; + return this; + } + + /** + * optional bool enable = 7; + * @return the enable + */ + public boolean getEnable() { + return enable; + } + + /** + * optional bool enable = 7; + * @param value the enable to set + * @return this + */ + public Rule setEnable(final boolean value) { + bitField0_ |= 0x00000008; + enable = value; + return this; + } + + /** + * optional string channel = 2; + * @return whether the channel field is set + */ + public boolean hasChannel() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional string channel = 2; + * @return this + */ + public Rule clearChannel() { + bitField0_ &= ~0x00000010; + channel.clear(); + return this; + } + + /** + * optional string channel = 2; + * @return the channel + */ + public String getChannel() { + return channel.getString(); + } + + /** + * optional string channel = 2; + * @return internal {@code Utf8String} representation of channel for reading + */ + public Utf8String getChannelBytes() { + return this.channel; + } + + /** + * optional string channel = 2; + * @return internal {@code Utf8String} representation of channel for modifications + */ + public Utf8String getMutableChannelBytes() { + bitField0_ |= 0x00000010; + return this.channel; + } + + /** + * optional string channel = 2; + * @param value the channel to set + * @return this + */ + public Rule setChannel(final CharSequence value) { + bitField0_ |= 0x00000010; + channel.copyFrom(value); + return this; + } + + /** + * optional string channel = 2; + * @param value the channel to set + * @return this + */ + public Rule setChannel(final Utf8String value) { + bitField0_ |= 0x00000010; + channel.copyFrom(value); + return this; + } + + /** + * optional string version = 3; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional string version = 3; + * @return this + */ + public Rule clearVersion() { + bitField0_ &= ~0x00000020; + version.clear(); + return this; + } + + /** + * optional string version = 3; + * @return the version + */ + public String getVersion() { + return version.getString(); + } + + /** + * optional string version = 3; + * @return internal {@code Utf8String} representation of version for reading + */ + public Utf8String getVersionBytes() { + return this.version; + } + + /** + * optional string version = 3; + * @return internal {@code Utf8String} representation of version for modifications + */ + public Utf8String getMutableVersionBytes() { + bitField0_ |= 0x00000020; + return this.version; + } + + /** + * optional string version = 3; + * @param value the version to set + * @return this + */ + public Rule setVersion(final CharSequence value) { + bitField0_ |= 0x00000020; + version.copyFrom(value); + return this; + } + + /** + * optional string version = 3; + * @param value the version to set + * @return this + */ + public Rule setVersion(final Utf8String value) { + bitField0_ |= 0x00000020; + version.copyFrom(value); + return this; + } + + /** + * optional string url = 6; + * @return whether the url field is set + */ + public boolean hasUrl() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional string url = 6; + * @return this + */ + public Rule clearUrl() { + bitField0_ &= ~0x00000040; + url.clear(); + return this; + } + + /** + * optional string url = 6; + * @return the url + */ + public String getUrl() { + return url.getString(); + } + + /** + * optional string url = 6; + * @return internal {@code Utf8String} representation of url for reading + */ + public Utf8String getUrlBytes() { + return this.url; + } + + /** + * optional string url = 6; + * @return internal {@code Utf8String} representation of url for modifications + */ + public Utf8String getMutableUrlBytes() { + bitField0_ |= 0x00000040; + return this.url; + } + + /** + * optional string url = 6; + * @param value the url to set + * @return this + */ + public Rule setUrl(final CharSequence value) { + bitField0_ |= 0x00000040; + url.copyFrom(value); + return this; + } + + /** + * optional string url = 6; + * @param value the url to set + * @return this + */ + public Rule setUrl(final Utf8String value) { + bitField0_ |= 0x00000040; + url.copyFrom(value); + return this; + } + + @Override + public Rule copyFrom(final Rule other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + platform = other.platform; + op = other.op; + action = other.action; + enable = other.enable; + channel.copyFrom(other.channel); + version.copyFrom(other.version); + url.copyFrom(other.url); + } + return this; + } + + @Override + public Rule mergeFrom(final Rule other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPlatform()) { + setPlatformValue(other.platform); + } + if (other.hasOp()) { + setOpValue(other.op); + } + if (other.hasAction()) { + setActionValue(other.action); + } + if (other.hasEnable()) { + setEnable(other.enable); + } + if (other.hasChannel()) { + getMutableChannelBytes().copyFrom(other.channel); + } + if (other.hasVersion()) { + getMutableVersionBytes().copyFrom(other.version); + } + if (other.hasUrl()) { + getMutableUrlBytes().copyFrom(other.url); + } + return this; + } + + @Override + public Rule clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + platform = 0; + op = 0; + action = 0; + enable = false; + channel.clear(); + version.clear(); + url.clear(); + return this; + } + + @Override + public Rule clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + channel.clear(); + version.clear(); + url.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Rule)) { + return false; + } + Rule other = (Rule) o; + return bitField0_ == other.bitField0_ + && (!hasPlatform() || platform == other.platform) + && (!hasOp() || op == other.op) + && (!hasAction() || action == other.action) + && (!hasEnable() || enable == other.enable) + && (!hasChannel() || channel.equals(other.channel)) + && (!hasVersion() || version.equals(other.version)) + && (!hasUrl() || url.equals(other.url)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeEnumNoTag(platform); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeEnumNoTag(op); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 40); + output.writeEnumNoTag(action); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(enable); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(channel); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 26); + output.writeStringNoTag(version); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 50); + output.writeStringNoTag(url); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(platform); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(op); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(action); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(channel); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(version); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(url); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Rule mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // platform + final int value = input.readInt32(); + if (Platform.forNumber(value) != null) { + platform = value; + bitField0_ |= 0x00000001; + } + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // op + final int value = input.readInt32(); + if (OP.forNumber(value) != null) { + op = value; + bitField0_ |= 0x00000002; + } + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // action + final int value = input.readInt32(); + if (Action.forNumber(value) != null) { + action = value; + bitField0_ |= 0x00000004; + } + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // enable + enable = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // channel + input.readString(channel); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // version + input.readString(version); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // url + input.readString(url); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeEnum(FieldNames.platform, platform, Platform.converter()); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeEnum(FieldNames.op, op, OP.converter()); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeEnum(FieldNames.action, action, Action.converter()); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.enable, enable); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeString(FieldNames.channel, channel); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeString(FieldNames.version, version); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeString(FieldNames.url, url); + } + output.endObject(); + } + + @Override + public Rule mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1874684019: { + if (input.isAtField(FieldNames.platform)) { + if (!input.trySkipNullValue()) { + final Platform value = input.readEnum(Platform.converter()); + if (value != null) { + platform = value.getNumber(); + bitField0_ |= 0x00000001; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case 3553: { + if (input.isAtField(FieldNames.op)) { + if (!input.trySkipNullValue()) { + final OP value = input.readEnum(OP.converter()); + if (value != null) { + op = value.getNumber(); + bitField0_ |= 0x00000002; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case -1422950858: { + if (input.isAtField(FieldNames.action)) { + if (!input.trySkipNullValue()) { + final Action value = input.readEnum(Action.converter()); + if (value != null) { + action = value.getNumber(); + bitField0_ |= 0x00000004; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case -1298848381: { + if (input.isAtField(FieldNames.enable)) { + if (!input.trySkipNullValue()) { + enable = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 738950403: { + if (input.isAtField(FieldNames.channel)) { + if (!input.trySkipNullValue()) { + input.readString(channel); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 351608024: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + input.readString(version); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 116079: { + if (input.isAtField(FieldNames.url)) { + if (!input.trySkipNullValue()) { + input.readString(url); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Rule clone() { + return new Rule().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Rule parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Rule(), data).checkInitialized(); + } + + public static Rule parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Rule(), input).checkInitialized(); + } + + public static Rule parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Rule(), input).checkInitialized(); + } + + /** + * @return factory for creating Rule messages + */ + public static MessageFactory getFactory() { + return RuleFactory.INSTANCE; + } + + private enum RuleFactory implements MessageFactory { + INSTANCE; + + @Override + public Rule create() { + return Rule.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName platform = FieldName.forField("platform"); + + static final FieldName op = FieldName.forField("op"); + + static final FieldName action = FieldName.forField("action"); + + static final FieldName enable = FieldName.forField("enable"); + + static final FieldName channel = FieldName.forField("channel"); + + static final FieldName version = FieldName.forField("version"); + + static final FieldName url = FieldName.forField("url"); + } + } + + /** + * Protobuf type {@code NoticeItem} + */ + public static final class NoticeItem extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 end_time = 6; + */ + private long endTime; + + /** + * optional int64 sort = 7; + */ + private long sort; + + /** + * optional uint64 id = 1; + */ + private long id; + + /** + * optional string title = 2; + */ + private final Utf8String title = Utf8String.newEmptyInstance(); + + /** + * optional string content_url = 3; + */ + private final Utf8String contentUrl = Utf8String.newEmptyInstance(); + + /** + * optional string quest_id = 5; + */ + private final Utf8String questId = Utf8String.newEmptyInstance(); + + /** + * repeated uint32 channel = 4; + */ + private final RepeatedInt channel = RepeatedInt.newEmptyInstance(); + + private NoticeItem() { + } + + /** + * @return a new empty instance of {@code NoticeItem} + */ + public static NoticeItem newInstance() { + return new NoticeItem(); + } + + /** + * optional int64 end_time = 6; + * @return whether the endTime field is set + */ + public boolean hasEndTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 end_time = 6; + * @return this + */ + public NoticeItem clearEndTime() { + bitField0_ &= ~0x00000001; + endTime = 0L; + return this; + } + + /** + * optional int64 end_time = 6; + * @return the endTime + */ + public long getEndTime() { + return endTime; + } + + /** + * optional int64 end_time = 6; + * @param value the endTime to set + * @return this + */ + public NoticeItem setEndTime(final long value) { + bitField0_ |= 0x00000001; + endTime = value; + return this; + } + + /** + * optional int64 sort = 7; + * @return whether the sort field is set + */ + public boolean hasSort() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int64 sort = 7; + * @return this + */ + public NoticeItem clearSort() { + bitField0_ &= ~0x00000002; + sort = 0L; + return this; + } + + /** + * optional int64 sort = 7; + * @return the sort + */ + public long getSort() { + return sort; + } + + /** + * optional int64 sort = 7; + * @param value the sort to set + * @return this + */ + public NoticeItem setSort(final long value) { + bitField0_ |= 0x00000002; + sort = value; + return this; + } + + /** + * optional uint64 id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint64 id = 1; + * @return this + */ + public NoticeItem clearId() { + bitField0_ &= ~0x00000004; + id = 0L; + return this; + } + + /** + * optional uint64 id = 1; + * @return the id + */ + public long getId() { + return id; + } + + /** + * optional uint64 id = 1; + * @param value the id to set + * @return this + */ + public NoticeItem setId(final long value) { + bitField0_ |= 0x00000004; + id = value; + return this; + } + + /** + * optional string title = 2; + * @return whether the title field is set + */ + public boolean hasTitle() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional string title = 2; + * @return this + */ + public NoticeItem clearTitle() { + bitField0_ &= ~0x00000008; + title.clear(); + return this; + } + + /** + * optional string title = 2; + * @return the title + */ + public String getTitle() { + return title.getString(); + } + + /** + * optional string title = 2; + * @return internal {@code Utf8String} representation of title for reading + */ + public Utf8String getTitleBytes() { + return this.title; + } + + /** + * optional string title = 2; + * @return internal {@code Utf8String} representation of title for modifications + */ + public Utf8String getMutableTitleBytes() { + bitField0_ |= 0x00000008; + return this.title; + } + + /** + * optional string title = 2; + * @param value the title to set + * @return this + */ + public NoticeItem setTitle(final CharSequence value) { + bitField0_ |= 0x00000008; + title.copyFrom(value); + return this; + } + + /** + * optional string title = 2; + * @param value the title to set + * @return this + */ + public NoticeItem setTitle(final Utf8String value) { + bitField0_ |= 0x00000008; + title.copyFrom(value); + return this; + } + + /** + * optional string content_url = 3; + * @return whether the contentUrl field is set + */ + public boolean hasContentUrl() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional string content_url = 3; + * @return this + */ + public NoticeItem clearContentUrl() { + bitField0_ &= ~0x00000010; + contentUrl.clear(); + return this; + } + + /** + * optional string content_url = 3; + * @return the contentUrl + */ + public String getContentUrl() { + return contentUrl.getString(); + } + + /** + * optional string content_url = 3; + * @return internal {@code Utf8String} representation of contentUrl for reading + */ + public Utf8String getContentUrlBytes() { + return this.contentUrl; + } + + /** + * optional string content_url = 3; + * @return internal {@code Utf8String} representation of contentUrl for modifications + */ + public Utf8String getMutableContentUrlBytes() { + bitField0_ |= 0x00000010; + return this.contentUrl; + } + + /** + * optional string content_url = 3; + * @param value the contentUrl to set + * @return this + */ + public NoticeItem setContentUrl(final CharSequence value) { + bitField0_ |= 0x00000010; + contentUrl.copyFrom(value); + return this; + } + + /** + * optional string content_url = 3; + * @param value the contentUrl to set + * @return this + */ + public NoticeItem setContentUrl(final Utf8String value) { + bitField0_ |= 0x00000010; + contentUrl.copyFrom(value); + return this; + } + + /** + * optional string quest_id = 5; + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional string quest_id = 5; + * @return this + */ + public NoticeItem clearQuestId() { + bitField0_ &= ~0x00000020; + questId.clear(); + return this; + } + + /** + * optional string quest_id = 5; + * @return the questId + */ + public String getQuestId() { + return questId.getString(); + } + + /** + * optional string quest_id = 5; + * @return internal {@code Utf8String} representation of questId for reading + */ + public Utf8String getQuestIdBytes() { + return this.questId; + } + + /** + * optional string quest_id = 5; + * @return internal {@code Utf8String} representation of questId for modifications + */ + public Utf8String getMutableQuestIdBytes() { + bitField0_ |= 0x00000020; + return this.questId; + } + + /** + * optional string quest_id = 5; + * @param value the questId to set + * @return this + */ + public NoticeItem setQuestId(final CharSequence value) { + bitField0_ |= 0x00000020; + questId.copyFrom(value); + return this; + } + + /** + * optional string quest_id = 5; + * @param value the questId to set + * @return this + */ + public NoticeItem setQuestId(final Utf8String value) { + bitField0_ |= 0x00000020; + questId.copyFrom(value); + return this; + } + + /** + * repeated uint32 channel = 4; + * @return whether the channel field is set + */ + public boolean hasChannel() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * repeated uint32 channel = 4; + * @return this + */ + public NoticeItem clearChannel() { + bitField0_ &= ~0x00000040; + channel.clear(); + return this; + } + + /** + * repeated uint32 channel = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChannel()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getChannel() { + return channel; + } + + /** + * repeated uint32 channel = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableChannel() { + bitField0_ |= 0x00000040; + return channel; + } + + /** + * repeated uint32 channel = 4; + * @param value the channel to add + * @return this + */ + public NoticeItem addChannel(final int value) { + bitField0_ |= 0x00000040; + channel.add(value); + return this; + } + + /** + * repeated uint32 channel = 4; + * @param values the channel to add + * @return this + */ + public NoticeItem addAllChannel(final int... values) { + bitField0_ |= 0x00000040; + channel.addAll(values); + return this; + } + + @Override + public NoticeItem copyFrom(final NoticeItem other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + endTime = other.endTime; + sort = other.sort; + id = other.id; + title.copyFrom(other.title); + contentUrl.copyFrom(other.contentUrl); + questId.copyFrom(other.questId); + channel.copyFrom(other.channel); + } + return this; + } + + @Override + public NoticeItem mergeFrom(final NoticeItem other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEndTime()) { + setEndTime(other.endTime); + } + if (other.hasSort()) { + setSort(other.sort); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasTitle()) { + getMutableTitleBytes().copyFrom(other.title); + } + if (other.hasContentUrl()) { + getMutableContentUrlBytes().copyFrom(other.contentUrl); + } + if (other.hasQuestId()) { + getMutableQuestIdBytes().copyFrom(other.questId); + } + if (other.hasChannel()) { + getMutableChannel().addAll(other.channel); + } + return this; + } + + @Override + public NoticeItem clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + endTime = 0L; + sort = 0L; + id = 0L; + title.clear(); + contentUrl.clear(); + questId.clear(); + channel.clear(); + return this; + } + + @Override + public NoticeItem clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + title.clear(); + contentUrl.clear(); + questId.clear(); + channel.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NoticeItem)) { + return false; + } + NoticeItem other = (NoticeItem) o; + return bitField0_ == other.bitField0_ + && (!hasEndTime() || endTime == other.endTime) + && (!hasSort() || sort == other.sort) + && (!hasId() || id == other.id) + && (!hasTitle() || title.equals(other.title)) + && (!hasContentUrl() || contentUrl.equals(other.contentUrl)) + && (!hasQuestId() || questId.equals(other.questId)) + && (!hasChannel() || channel.equals(other.channel)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 48); + output.writeInt64NoTag(endTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 56); + output.writeInt64NoTag(sort); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(title); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 26); + output.writeStringNoTag(contentUrl); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 42); + output.writeStringNoTag(questId); + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < channel.length(); i++) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(channel.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(endTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(sort); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(title); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(contentUrl); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(questId); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * channel.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(channel); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NoticeItem mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 48: { + // endTime + endTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // sort + sort = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // title + input.readString(title); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // contentUrl + input.readString(contentUrl); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // questId + input.readString(questId); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // channel [packed=true] + input.readPackedUInt32(channel, tag); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 32: { + // channel [packed=false] + tag = input.readRepeatedUInt32(channel, tag); + bitField0_ |= 0x00000040; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.endTime, endTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.sort, sort); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.title, title); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeString(FieldNames.contentUrl, contentUrl); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeString(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedUInt32(FieldNames.channel, channel); + } + output.endObject(); + } + + @Override + public NoticeItem mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1607243192: + case 1725551537: { + if (input.isAtField(FieldNames.endTime)) { + if (!input.trySkipNullValue()) { + endTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3536286: { + if (input.isAtField(FieldNames.sort)) { + if (!input.trySkipNullValue()) { + sort = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3355: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 110371416: { + if (input.isAtField(FieldNames.title)) { + if (!input.trySkipNullValue()) { + input.readString(title); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 264542774: + case -388807511: { + if (input.isAtField(FieldNames.contentUrl)) { + if (!input.trySkipNullValue()) { + input.readString(contentUrl); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 655126941: + case -1165879912: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + input.readString(questId); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 738950403: { + if (input.isAtField(FieldNames.channel)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(channel); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NoticeItem clone() { + return new NoticeItem().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NoticeItem parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NoticeItem(), data).checkInitialized(); + } + + public static NoticeItem parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeItem(), input).checkInitialized(); + } + + public static NoticeItem parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeItem(), input).checkInitialized(); + } + + /** + * @return factory for creating NoticeItem messages + */ + public static MessageFactory getFactory() { + return NoticeItemFactory.INSTANCE; + } + + private enum NoticeItemFactory implements MessageFactory { + INSTANCE; + + @Override + public NoticeItem create() { + return NoticeItem.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName endTime = FieldName.forField("endTime", "end_time"); + + static final FieldName sort = FieldName.forField("sort"); + + static final FieldName id = FieldName.forField("id"); + + static final FieldName title = FieldName.forField("title"); + + static final FieldName contentUrl = FieldName.forField("contentUrl", "content_url"); + + static final FieldName questId = FieldName.forField("questId", "quest_id"); + + static final FieldName channel = FieldName.forField("channel"); + } + } + + /** + * Protobuf type {@code NoticeList} + */ + public static final class NoticeList extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * repeated .pb.NoticeType list = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(NoticeType.getFactory()); + + private NoticeList() { + } + + /** + * @return a new empty instance of {@code NoticeList} + */ + public static NoticeList newInstance() { + return new NoticeList(); + } + + /** + * repeated .pb.NoticeType list = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * repeated .pb.NoticeType list = 1; + * @return this + */ + public NoticeList clearList() { + bitField0_ &= ~0x00000001; + list.clear(); + return this; + } + + /** + * repeated .pb.NoticeType list = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .pb.NoticeType list = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000001; + return list; + } + + /** + * repeated .pb.NoticeType list = 1; + * @param value the list to add + * @return this + */ + public NoticeList addList(final NoticeType value) { + bitField0_ |= 0x00000001; + list.add(value); + return this; + } + + /** + * repeated .pb.NoticeType list = 1; + * @param values the list to add + * @return this + */ + public NoticeList addAllList(final NoticeType... values) { + bitField0_ |= 0x00000001; + list.addAll(values); + return this; + } + + @Override + public NoticeList copyFrom(final NoticeList other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + list.copyFrom(other.list); + } + return this; + } + + @Override + public NoticeList mergeFrom(final NoticeList other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public NoticeList clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + list.clear(); + return this; + } + + @Override + public NoticeList clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NoticeList)) { + return false; + } + NoticeList other = (NoticeList) o; + return bitField0_ == other.bitField0_ + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NoticeList mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000001; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public NoticeList mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3322014: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NoticeList clone() { + return new NoticeList().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NoticeList parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NoticeList(), data).checkInitialized(); + } + + public static NoticeList parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeList(), input).checkInitialized(); + } + + public static NoticeList parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeList(), input).checkInitialized(); + } + + /** + * @return factory for creating NoticeList messages + */ + public static MessageFactory getFactory() { + return NoticeListFactory.INSTANCE; + } + + private enum NoticeListFactory implements MessageFactory { + INSTANCE; + + @Override + public NoticeList create() { + return NoticeList.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName list = FieldName.forField("list"); + } + } + + /** + * Protobuf type {@code NoticeType} + */ + public static final class NoticeType extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional string name = 1; + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + /** + * repeated .pb.NoticeItem detail = 2; + */ + private final RepeatedMessage detail = RepeatedMessage.newEmptyInstance(NoticeItem.getFactory()); + + private NoticeType() { + } + + /** + * @return a new empty instance of {@code NoticeType} + */ + public static NoticeType newInstance() { + return new NoticeType(); + } + + /** + * optional string name = 1; + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional string name = 1; + * @return this + */ + public NoticeType clearName() { + bitField0_ &= ~0x00000001; + name.clear(); + return this; + } + + /** + * optional string name = 1; + * @return the name + */ + public String getName() { + return name.getString(); + } + + /** + * optional string name = 1; + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * optional string name = 1; + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000001; + return this.name; + } + + /** + * optional string name = 1; + * @param value the name to set + * @return this + */ + public NoticeType setName(final CharSequence value) { + bitField0_ |= 0x00000001; + name.copyFrom(value); + return this; + } + + /** + * optional string name = 1; + * @param value the name to set + * @return this + */ + public NoticeType setName(final Utf8String value) { + bitField0_ |= 0x00000001; + name.copyFrom(value); + return this; + } + + /** + * repeated .pb.NoticeItem detail = 2; + * @return whether the detail field is set + */ + public boolean hasDetail() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .pb.NoticeItem detail = 2; + * @return this + */ + public NoticeType clearDetail() { + bitField0_ &= ~0x00000002; + detail.clear(); + return this; + } + + /** + * repeated .pb.NoticeItem detail = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDetail()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getDetail() { + return detail; + } + + /** + * repeated .pb.NoticeItem detail = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableDetail() { + bitField0_ |= 0x00000002; + return detail; + } + + /** + * repeated .pb.NoticeItem detail = 2; + * @param value the detail to add + * @return this + */ + public NoticeType addDetail(final NoticeItem value) { + bitField0_ |= 0x00000002; + detail.add(value); + return this; + } + + /** + * repeated .pb.NoticeItem detail = 2; + * @param values the detail to add + * @return this + */ + public NoticeType addAllDetail(final NoticeItem... values) { + bitField0_ |= 0x00000002; + detail.addAll(values); + return this; + } + + @Override + public NoticeType copyFrom(final NoticeType other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + name.copyFrom(other.name); + detail.copyFrom(other.detail); + } + return this; + } + + @Override + public NoticeType mergeFrom(final NoticeType other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + if (other.hasDetail()) { + getMutableDetail().addAll(other.detail); + } + return this; + } + + @Override + public NoticeType clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + name.clear(); + detail.clear(); + return this; + } + + @Override + public NoticeType clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + name.clear(); + detail.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NoticeType)) { + return false; + } + NoticeType other = (NoticeType) o; + return bitField0_ == other.bitField0_ + && (!hasName() || name.equals(other.name)) + && (!hasDetail() || detail.equals(other.detail)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(name); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < detail.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(detail.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * detail.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(detail); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NoticeType mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // name + input.readString(name); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // detail + tag = input.readRepeatedMessage(detail, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeString(FieldNames.name, name); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.detail, detail); + } + output.endObject(); + } + + @Override + public NoticeType mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3373707: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1335224239: { + if (input.isAtField(FieldNames.detail)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(detail); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NoticeType clone() { + return new NoticeType().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NoticeType parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NoticeType(), data).checkInitialized(); + } + + public static NoticeType parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeType(), input).checkInitialized(); + } + + public static NoticeType parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NoticeType(), input).checkInitialized(); + } + + /** + * @return factory for creating NoticeType messages + */ + public static MessageFactory getFactory() { + return NoticeTypeFactory.INSTANCE; + } + + private enum NoticeTypeFactory implements MessageFactory { + INSTANCE; + + @Override + public NoticeType create() { + return NoticeType.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName name = FieldName.forField("name"); + + static final FieldName detail = FieldName.forField("detail"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PhoneContactsInfo.java b/src/generated/main/emu/nebula/proto/PhoneContactsInfo.java new file mode 100644 index 0000000..89d482f --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PhoneContactsInfo.java @@ -0,0 +1,417 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class PhoneContactsInfo { + /** + * Protobuf type {@code PhoneContactsInfoResp} + */ + public static final class PhoneContactsInfoResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Contacts List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Public.Contacts.getFactory()); + + private PhoneContactsInfoResp() { + } + + /** + * @return a new empty instance of {@code PhoneContactsInfoResp} + */ + public static PhoneContactsInfoResp newInstance() { + return new PhoneContactsInfoResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PhoneContactsInfoResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PhoneContactsInfoResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PhoneContactsInfoResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PhoneContactsInfoResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Contacts List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Contacts List = 1; + * @return this + */ + public PhoneContactsInfoResp clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .Contacts List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .Contacts List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .Contacts List = 1; + * @param value the list to add + * @return this + */ + public PhoneContactsInfoResp addList(final Public.Contacts value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .Contacts List = 1; + * @param values the list to add + * @return this + */ + public PhoneContactsInfoResp addAllList(final Public.Contacts... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public PhoneContactsInfoResp copyFrom(final PhoneContactsInfoResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public PhoneContactsInfoResp mergeFrom(final PhoneContactsInfoResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public PhoneContactsInfoResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public PhoneContactsInfoResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PhoneContactsInfoResp)) { + return false; + } + PhoneContactsInfoResp other = (PhoneContactsInfoResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PhoneContactsInfoResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public PhoneContactsInfoResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PhoneContactsInfoResp clone() { + return new PhoneContactsInfoResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PhoneContactsInfoResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PhoneContactsInfoResp(), data).checkInitialized(); + } + + public static PhoneContactsInfoResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PhoneContactsInfoResp(), input).checkInitialized(); + } + + public static PhoneContactsInfoResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PhoneContactsInfoResp(), input).checkInitialized(); + } + + /** + * @return factory for creating PhoneContactsInfoResp messages + */ + public static MessageFactory getFactory() { + return PhoneContactsInfoRespFactory.INSTANCE; + } + + private enum PhoneContactsInfoRespFactory implements MessageFactory { + INSTANCE; + + @Override + public PhoneContactsInfoResp create() { + return PhoneContactsInfoResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PhoneContactsReport.java b/src/generated/main/emu/nebula/proto/PhoneContactsReport.java new file mode 100644 index 0000000..2951d2f --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PhoneContactsReport.java @@ -0,0 +1,664 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class PhoneContactsReport { + /** + * Protobuf type {@code PhoneContactsReportReq} + */ + public static final class PhoneContactsReportReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ChatId = 1; + */ + private int chatId; + + /** + * optional uint32 Process = 3; + */ + private int process; + + /** + * optional bool End = 4; + */ + private boolean end; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Options = 2; + */ + private final RepeatedInt options = RepeatedInt.newEmptyInstance(); + + private PhoneContactsReportReq() { + } + + /** + * @return a new empty instance of {@code PhoneContactsReportReq} + */ + public static PhoneContactsReportReq newInstance() { + return new PhoneContactsReportReq(); + } + + /** + * optional uint32 ChatId = 1; + * @return whether the chatId field is set + */ + public boolean hasChatId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ChatId = 1; + * @return this + */ + public PhoneContactsReportReq clearChatId() { + bitField0_ &= ~0x00000001; + chatId = 0; + return this; + } + + /** + * optional uint32 ChatId = 1; + * @return the chatId + */ + public int getChatId() { + return chatId; + } + + /** + * optional uint32 ChatId = 1; + * @param value the chatId to set + * @return this + */ + public PhoneContactsReportReq setChatId(final int value) { + bitField0_ |= 0x00000001; + chatId = value; + return this; + } + + /** + * optional uint32 Process = 3; + * @return whether the process field is set + */ + public boolean hasProcess() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Process = 3; + * @return this + */ + public PhoneContactsReportReq clearProcess() { + bitField0_ &= ~0x00000002; + process = 0; + return this; + } + + /** + * optional uint32 Process = 3; + * @return the process + */ + public int getProcess() { + return process; + } + + /** + * optional uint32 Process = 3; + * @param value the process to set + * @return this + */ + public PhoneContactsReportReq setProcess(final int value) { + bitField0_ |= 0x00000002; + process = value; + return this; + } + + /** + * optional bool End = 4; + * @return whether the end field is set + */ + public boolean hasEnd() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bool End = 4; + * @return this + */ + public PhoneContactsReportReq clearEnd() { + bitField0_ &= ~0x00000004; + end = false; + return this; + } + + /** + * optional bool End = 4; + * @return the end + */ + public boolean getEnd() { + return end; + } + + /** + * optional bool End = 4; + * @param value the end to set + * @return this + */ + public PhoneContactsReportReq setEnd(final boolean value) { + bitField0_ |= 0x00000004; + end = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PhoneContactsReportReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PhoneContactsReportReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PhoneContactsReportReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PhoneContactsReportReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Options = 2; + * @return whether the options field is set + */ + public boolean hasOptions() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated uint32 Options = 2; + * @return this + */ + public PhoneContactsReportReq clearOptions() { + bitField0_ &= ~0x00000010; + options.clear(); + return this; + } + + /** + * repeated uint32 Options = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableOptions()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getOptions() { + return options; + } + + /** + * repeated uint32 Options = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableOptions() { + bitField0_ |= 0x00000010; + return options; + } + + /** + * repeated uint32 Options = 2; + * @param value the options to add + * @return this + */ + public PhoneContactsReportReq addOptions(final int value) { + bitField0_ |= 0x00000010; + options.add(value); + return this; + } + + /** + * repeated uint32 Options = 2; + * @param values the options to add + * @return this + */ + public PhoneContactsReportReq addAllOptions(final int... values) { + bitField0_ |= 0x00000010; + options.addAll(values); + return this; + } + + @Override + public PhoneContactsReportReq copyFrom(final PhoneContactsReportReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + chatId = other.chatId; + process = other.process; + end = other.end; + nextPackage.copyFrom(other.nextPackage); + options.copyFrom(other.options); + } + return this; + } + + @Override + public PhoneContactsReportReq mergeFrom(final PhoneContactsReportReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChatId()) { + setChatId(other.chatId); + } + if (other.hasProcess()) { + setProcess(other.process); + } + if (other.hasEnd()) { + setEnd(other.end); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasOptions()) { + getMutableOptions().addAll(other.options); + } + return this; + } + + @Override + public PhoneContactsReportReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + chatId = 0; + process = 0; + end = false; + nextPackage.clear(); + options.clear(); + return this; + } + + @Override + public PhoneContactsReportReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + options.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PhoneContactsReportReq)) { + return false; + } + PhoneContactsReportReq other = (PhoneContactsReportReq) o; + return bitField0_ == other.bitField0_ + && (!hasChatId() || chatId == other.chatId) + && (!hasProcess() || process == other.process) + && (!hasEnd() || end == other.end) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasOptions() || options.equals(other.options)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(chatId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(process); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(end); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < options.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(options.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(chatId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(process); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * options.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(options); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PhoneContactsReportReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // chatId + chatId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // process + process = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // end + end = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // options [packed=true] + input.readPackedUInt32(options, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // options [packed=false] + tag = input.readRepeatedUInt32(options, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.chatId, chatId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.process, process); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.end, end); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.options, options); + } + output.endObject(); + } + + @Override + public PhoneContactsReportReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017202867: { + if (input.isAtField(FieldNames.chatId)) { + if (!input.trySkipNullValue()) { + chatId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1355134543: { + if (input.isAtField(FieldNames.process)) { + if (!input.trySkipNullValue()) { + process = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 69819: { + if (input.isAtField(FieldNames.end)) { + if (!input.trySkipNullValue()) { + end = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 415178366: { + if (input.isAtField(FieldNames.options)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(options); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PhoneContactsReportReq clone() { + return new PhoneContactsReportReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PhoneContactsReportReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PhoneContactsReportReq(), data).checkInitialized(); + } + + public static PhoneContactsReportReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PhoneContactsReportReq(), input).checkInitialized(); + } + + public static PhoneContactsReportReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PhoneContactsReportReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PhoneContactsReportReq messages + */ + public static MessageFactory getFactory() { + return PhoneContactsReportReqFactory.INSTANCE; + } + + private enum PhoneContactsReportReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PhoneContactsReportReq create() { + return PhoneContactsReportReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName chatId = FieldName.forField("ChatId"); + + static final FieldName process = FieldName.forField("Process"); + + static final FieldName end = FieldName.forField("End"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName options = FieldName.forField("Options"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PhoneContactsTop.java b/src/generated/main/emu/nebula/proto/PhoneContactsTop.java new file mode 100644 index 0000000..4965b14 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PhoneContactsTop.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class PhoneContactsTop { +} diff --git a/src/generated/main/emu/nebula/proto/PlayerBoard.java b/src/generated/main/emu/nebula/proto/PlayerBoard.java new file mode 100644 index 0000000..7a547b1 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerBoard.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class PlayerBoard { + /** + * Protobuf type {@code PlayerBoardSetReq} + */ + public static final class PlayerBoardSetReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Ids = 1; + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + private PlayerBoardSetReq() { + } + + /** + * @return a new empty instance of {@code PlayerBoardSetReq} + */ + public static PlayerBoardSetReq newInstance() { + return new PlayerBoardSetReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerBoardSetReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerBoardSetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerBoardSetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerBoardSetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 Ids = 1; + * @return this + */ + public PlayerBoardSetReq clearIds() { + bitField0_ &= ~0x00000002; + ids.clear(); + return this; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * repeated uint32 Ids = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000002; + return ids; + } + + /** + * repeated uint32 Ids = 1; + * @param value the ids to add + * @return this + */ + public PlayerBoardSetReq addIds(final int value) { + bitField0_ |= 0x00000002; + ids.add(value); + return this; + } + + /** + * repeated uint32 Ids = 1; + * @param values the ids to add + * @return this + */ + public PlayerBoardSetReq addAllIds(final int... values) { + bitField0_ |= 0x00000002; + ids.addAll(values); + return this; + } + + @Override + public PlayerBoardSetReq copyFrom(final PlayerBoardSetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + } + return this; + } + + @Override + public PlayerBoardSetReq mergeFrom(final PlayerBoardSetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + return this; + } + + @Override + public PlayerBoardSetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public PlayerBoardSetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerBoardSetReq)) { + return false; + } + PlayerBoardSetReq other = (PlayerBoardSetReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerBoardSetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + output.endObject(); + } + + @Override + public PlayerBoardSetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerBoardSetReq clone() { + return new PlayerBoardSetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerBoardSetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerBoardSetReq(), data).checkInitialized(); + } + + public static PlayerBoardSetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerBoardSetReq(), input).checkInitialized(); + } + + public static PlayerBoardSetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerBoardSetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerBoardSetReq messages + */ + public static MessageFactory getFactory() { + return PlayerBoardSetReqFactory.INSTANCE; + } + + private enum PlayerBoardSetReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerBoardSetReq create() { + return PlayerBoardSetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerCharsShow.java b/src/generated/main/emu/nebula/proto/PlayerCharsShow.java new file mode 100644 index 0000000..4e60d96 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerCharsShow.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class PlayerCharsShow { + /** + * Protobuf type {@code PlayerCharsShowReq} + */ + public static final class PlayerCharsShowReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 CharIds = 1; + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + private PlayerCharsShowReq() { + } + + /** + * @return a new empty instance of {@code PlayerCharsShowReq} + */ + public static PlayerCharsShowReq newInstance() { + return new PlayerCharsShowReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerCharsShowReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerCharsShowReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerCharsShowReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerCharsShowReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 CharIds = 1; + * @return this + */ + public PlayerCharsShowReq clearCharIds() { + bitField0_ &= ~0x00000002; + charIds.clear(); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000002; + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * @param value the charIds to add + * @return this + */ + public PlayerCharsShowReq addCharIds(final int value) { + bitField0_ |= 0x00000002; + charIds.add(value); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @param values the charIds to add + * @return this + */ + public PlayerCharsShowReq addAllCharIds(final int... values) { + bitField0_ |= 0x00000002; + charIds.addAll(values); + return this; + } + + @Override + public PlayerCharsShowReq copyFrom(final PlayerCharsShowReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + } + return this; + } + + @Override + public PlayerCharsShowReq mergeFrom(final PlayerCharsShowReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + return this; + } + + @Override + public PlayerCharsShowReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public PlayerCharsShowReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerCharsShowReq)) { + return false; + } + PlayerCharsShowReq other = (PlayerCharsShowReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerCharsShowReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + output.endObject(); + } + + @Override + public PlayerCharsShowReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerCharsShowReq clone() { + return new PlayerCharsShowReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerCharsShowReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerCharsShowReq(), data).checkInitialized(); + } + + public static PlayerCharsShowReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerCharsShowReq(), input).checkInitialized(); + } + + public static PlayerCharsShowReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerCharsShowReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerCharsShowReq messages + */ + public static MessageFactory getFactory() { + return PlayerCharsShowReqFactory.INSTANCE; + } + + private enum PlayerCharsShowReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerCharsShowReq create() { + return PlayerCharsShowReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerData.java b/src/generated/main/emu/nebula/proto/PlayerData.java new file mode 100644 index 0000000..1f80554 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerData.java @@ -0,0 +1,7057 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class PlayerData { + /** + * Protobuf type {@code PlayerInfo} + */ + public static final class PlayerInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + private int bitField1_; + + /** + * optional int64 TalentResetTime = 26; + */ + private long talentResetTime; + + /** + * optional int64 MusicInfo = 122; + */ + private long musicInfo; + + /** + * optional int64 ServerTs = 127; + */ + private long serverTs; + + /** + * optional uint32 SendGiftCnt = 15; + */ + private int sendGiftCnt; + + /** + * optional uint32 SigninIndex = 20; + */ + private int signinIndex; + + /** + * optional uint32 EquipmentDoubleCount = 27; + */ + private int equipmentDoubleCount; + + /** + * optional uint32 TourGuideQuestGroup = 33; + */ + private int tourGuideQuestGroup; + + /** + * optional uint32 TowerTicket = 126; + */ + private int towerTicket; + + /** + * optional bool DailyShopRewardStatus = 125; + */ + private boolean dailyShopRewardStatus; + + /** + * optional .AccInfo Acc = 1; + */ + private final Public.AccInfo acc = Public.AccInfo.newInstance(); + + /** + * optional .TowerFormation Formation = 5; + */ + private final Public.TowerFormation formation = Public.TowerFormation.newInstance(); + + /** + * optional .EnergyInfo Energy = 7; + */ + private final EnergyInfo energy = EnergyInfo.newInstance(); + + /** + * optional .WorldClassInfo WorldClass = 8; + */ + private final WorldClassInfo worldClass = WorldClassInfo.newInstance(); + + /** + * optional .AgentData Agent = 9; + */ + private final Public.AgentData agent = Public.AgentData.newInstance(); + + /** + * optional .Quests Quests = 13; + */ + private final Public.Quests quests = Public.Quests.newInstance(); + + /** + * optional .StateInfo State = 14; + */ + private final Public.StateInfo state = Public.StateInfo.newInstance(); + + /** + * optional .PhoneInfo Phone = 25; + */ + private final PhoneInfo phone = PhoneInfo.newInstance(); + + /** + * optional .StoryInfo Story = 30; + */ + private final Public.StoryInfo story = Public.StoryInfo.newInstance(); + + /** + * optional .VampireSurvivorRecordInfo VampireSurvivorRecord = 31; + */ + private final Public.VampireSurvivorRecordInfo vampireSurvivorRecord = Public.VampireSurvivorRecordInfo.newInstance(); + + /** + * optional bytes Achievements = 18; + */ + private final RepeatedByte achievements = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 RglPassedIds = 10; + */ + private final RepeatedInt rglPassedIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 Board = 16; + */ + private final RepeatedInt board = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 DatingCharIds = 17; + */ + private final RepeatedInt datingCharIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 DailyActiveIds = 32; + */ + private final RepeatedInt dailyActiveIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 HonorList = 123; + */ + private final RepeatedInt honorList = RepeatedInt.newEmptyInstance(); + + /** + * repeated .Res Res = 2; + */ + private final RepeatedMessage res = RepeatedMessage.newEmptyInstance(Public.Res.getFactory()); + + /** + * repeated .Item Items = 3; + */ + private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(Public.Item.getFactory()); + + /** + * repeated .Char Chars = 4; + */ + private final RepeatedMessage chars = RepeatedMessage.newEmptyInstance(Public.Char.getFactory()); + + /** + * repeated .EquipmentInfo Equipments = 11; + */ + private final RepeatedMessage equipments = RepeatedMessage.newEmptyInstance(Public.EquipmentInfo.getFactory()); + + /** + * repeated .RegionBossLevel RegionBossLevels = 12; + */ + private final RepeatedMessage regionBossLevels = RepeatedMessage.newEmptyInstance(Public.RegionBossLevel.getFactory()); + + /** + * repeated .HandbookInfo Handbook = 19; + */ + private final RepeatedMessage handbook = RepeatedMessage.newEmptyInstance(Public.HandbookInfo.getFactory()); + + /** + * repeated .Title Titles = 21; + */ + private final RepeatedMessage titles = RepeatedMessage.newEmptyInstance(Public.Title.getFactory()); + + /** + * repeated .DailyInstance DailyInstances = 22; + */ + private final RepeatedMessage dailyInstances = RepeatedMessage.newEmptyInstance(Public.DailyInstance.getFactory()); + + /** + * repeated .DictionaryTab Dictionaries = 23; + */ + private final RepeatedMessage dictionaries = RepeatedMessage.newEmptyInstance(DictionaryTab.getFactory()); + + /** + * repeated .Activity Activities = 24; + */ + private final RepeatedMessage activities = RepeatedMessage.newEmptyInstance(Public.Activity.getFactory()); + + /** + * repeated .Disc Discs = 28; + */ + private final RepeatedMessage discs = RepeatedMessage.newEmptyInstance(Public.Disc.getFactory()); + + /** + * repeated .EquipmentInstance EquipmentInstances = 29; + */ + private final RepeatedMessage equipmentInstances = RepeatedMessage.newEmptyInstance(Public.EquipmentInstance.getFactory()); + + /** + * repeated .SkillInstance SkillInstances = 34; + */ + private final RepeatedMessage skillInstances = RepeatedMessage.newEmptyInstance(Public.SkillInstance.getFactory()); + + /** + * repeated .WeekBossLevel WeekBossLevels = 35; + */ + private final RepeatedMessage weekBossLevels = RepeatedMessage.newEmptyInstance(Public.WeekBossLevel.getFactory()); + + /** + * repeated .CharGemInstance CharGemInstances = 36; + */ + private final RepeatedMessage charGemInstances = RepeatedMessage.newEmptyInstance(Public.CharGemInstance.getFactory()); + + /** + * repeated .TutorialLevel TutorialLevels = 37; + */ + private final RepeatedMessage tutorialLevels = RepeatedMessage.newEmptyInstance(Public.TutorialLevel.getFactory()); + + /** + * repeated .HonorInfo Honors = 124; + */ + private final RepeatedMessage honors = RepeatedMessage.newEmptyInstance(Public.HonorInfo.getFactory()); + + private PlayerInfo() { + } + + /** + * @return a new empty instance of {@code PlayerInfo} + */ + public static PlayerInfo newInstance() { + return new PlayerInfo(); + } + + /** + * optional int64 TalentResetTime = 26; + * @return whether the talentResetTime field is set + */ + public boolean hasTalentResetTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 TalentResetTime = 26; + * @return this + */ + public PlayerInfo clearTalentResetTime() { + bitField0_ &= ~0x00000001; + talentResetTime = 0L; + return this; + } + + /** + * optional int64 TalentResetTime = 26; + * @return the talentResetTime + */ + public long getTalentResetTime() { + return talentResetTime; + } + + /** + * optional int64 TalentResetTime = 26; + * @param value the talentResetTime to set + * @return this + */ + public PlayerInfo setTalentResetTime(final long value) { + bitField0_ |= 0x00000001; + talentResetTime = value; + return this; + } + + /** + * optional int64 MusicInfo = 122; + * @return whether the musicInfo field is set + */ + public boolean hasMusicInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int64 MusicInfo = 122; + * @return this + */ + public PlayerInfo clearMusicInfo() { + bitField0_ &= ~0x00000002; + musicInfo = 0L; + return this; + } + + /** + * optional int64 MusicInfo = 122; + * @return the musicInfo + */ + public long getMusicInfo() { + return musicInfo; + } + + /** + * optional int64 MusicInfo = 122; + * @param value the musicInfo to set + * @return this + */ + public PlayerInfo setMusicInfo(final long value) { + bitField0_ |= 0x00000002; + musicInfo = value; + return this; + } + + /** + * optional int64 ServerTs = 127; + * @return whether the serverTs field is set + */ + public boolean hasServerTs() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional int64 ServerTs = 127; + * @return this + */ + public PlayerInfo clearServerTs() { + bitField0_ &= ~0x00000004; + serverTs = 0L; + return this; + } + + /** + * optional int64 ServerTs = 127; + * @return the serverTs + */ + public long getServerTs() { + return serverTs; + } + + /** + * optional int64 ServerTs = 127; + * @param value the serverTs to set + * @return this + */ + public PlayerInfo setServerTs(final long value) { + bitField0_ |= 0x00000004; + serverTs = value; + return this; + } + + /** + * optional uint32 SendGiftCnt = 15; + * @return whether the sendGiftCnt field is set + */ + public boolean hasSendGiftCnt() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 SendGiftCnt = 15; + * @return this + */ + public PlayerInfo clearSendGiftCnt() { + bitField0_ &= ~0x00000008; + sendGiftCnt = 0; + return this; + } + + /** + * optional uint32 SendGiftCnt = 15; + * @return the sendGiftCnt + */ + public int getSendGiftCnt() { + return sendGiftCnt; + } + + /** + * optional uint32 SendGiftCnt = 15; + * @param value the sendGiftCnt to set + * @return this + */ + public PlayerInfo setSendGiftCnt(final int value) { + bitField0_ |= 0x00000008; + sendGiftCnt = value; + return this; + } + + /** + * optional uint32 SigninIndex = 20; + * @return whether the signinIndex field is set + */ + public boolean hasSigninIndex() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 SigninIndex = 20; + * @return this + */ + public PlayerInfo clearSigninIndex() { + bitField0_ &= ~0x00000010; + signinIndex = 0; + return this; + } + + /** + * optional uint32 SigninIndex = 20; + * @return the signinIndex + */ + public int getSigninIndex() { + return signinIndex; + } + + /** + * optional uint32 SigninIndex = 20; + * @param value the signinIndex to set + * @return this + */ + public PlayerInfo setSigninIndex(final int value) { + bitField0_ |= 0x00000010; + signinIndex = value; + return this; + } + + /** + * optional uint32 EquipmentDoubleCount = 27; + * @return whether the equipmentDoubleCount field is set + */ + public boolean hasEquipmentDoubleCount() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 EquipmentDoubleCount = 27; + * @return this + */ + public PlayerInfo clearEquipmentDoubleCount() { + bitField0_ &= ~0x00000020; + equipmentDoubleCount = 0; + return this; + } + + /** + * optional uint32 EquipmentDoubleCount = 27; + * @return the equipmentDoubleCount + */ + public int getEquipmentDoubleCount() { + return equipmentDoubleCount; + } + + /** + * optional uint32 EquipmentDoubleCount = 27; + * @param value the equipmentDoubleCount to set + * @return this + */ + public PlayerInfo setEquipmentDoubleCount(final int value) { + bitField0_ |= 0x00000020; + equipmentDoubleCount = value; + return this; + } + + /** + * optional uint32 TourGuideQuestGroup = 33; + * @return whether the tourGuideQuestGroup field is set + */ + public boolean hasTourGuideQuestGroup() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional uint32 TourGuideQuestGroup = 33; + * @return this + */ + public PlayerInfo clearTourGuideQuestGroup() { + bitField0_ &= ~0x00000040; + tourGuideQuestGroup = 0; + return this; + } + + /** + * optional uint32 TourGuideQuestGroup = 33; + * @return the tourGuideQuestGroup + */ + public int getTourGuideQuestGroup() { + return tourGuideQuestGroup; + } + + /** + * optional uint32 TourGuideQuestGroup = 33; + * @param value the tourGuideQuestGroup to set + * @return this + */ + public PlayerInfo setTourGuideQuestGroup(final int value) { + bitField0_ |= 0x00000040; + tourGuideQuestGroup = value; + return this; + } + + /** + * optional uint32 TowerTicket = 126; + * @return whether the towerTicket field is set + */ + public boolean hasTowerTicket() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional uint32 TowerTicket = 126; + * @return this + */ + public PlayerInfo clearTowerTicket() { + bitField0_ &= ~0x00000080; + towerTicket = 0; + return this; + } + + /** + * optional uint32 TowerTicket = 126; + * @return the towerTicket + */ + public int getTowerTicket() { + return towerTicket; + } + + /** + * optional uint32 TowerTicket = 126; + * @param value the towerTicket to set + * @return this + */ + public PlayerInfo setTowerTicket(final int value) { + bitField0_ |= 0x00000080; + towerTicket = value; + return this; + } + + /** + * optional bool DailyShopRewardStatus = 125; + * @return whether the dailyShopRewardStatus field is set + */ + public boolean hasDailyShopRewardStatus() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional bool DailyShopRewardStatus = 125; + * @return this + */ + public PlayerInfo clearDailyShopRewardStatus() { + bitField0_ &= ~0x00000100; + dailyShopRewardStatus = false; + return this; + } + + /** + * optional bool DailyShopRewardStatus = 125; + * @return the dailyShopRewardStatus + */ + public boolean getDailyShopRewardStatus() { + return dailyShopRewardStatus; + } + + /** + * optional bool DailyShopRewardStatus = 125; + * @param value the dailyShopRewardStatus to set + * @return this + */ + public PlayerInfo setDailyShopRewardStatus(final boolean value) { + bitField0_ |= 0x00000100; + dailyShopRewardStatus = value; + return this; + } + + /** + * optional .AccInfo Acc = 1; + * @return whether the acc field is set + */ + public boolean hasAcc() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional .AccInfo Acc = 1; + * @return this + */ + public PlayerInfo clearAcc() { + bitField0_ &= ~0x00000200; + acc.clear(); + return this; + } + + /** + * optional .AccInfo Acc = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAcc()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AccInfo getAcc() { + return acc; + } + + /** + * optional .AccInfo Acc = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AccInfo getMutableAcc() { + bitField0_ |= 0x00000200; + return acc; + } + + /** + * optional .AccInfo Acc = 1; + * @param value the acc to set + * @return this + */ + public PlayerInfo setAcc(final Public.AccInfo value) { + bitField0_ |= 0x00000200; + acc.copyFrom(value); + return this; + } + + /** + * optional .TowerFormation Formation = 5; + * @return whether the formation field is set + */ + public boolean hasFormation() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * optional .TowerFormation Formation = 5; + * @return this + */ + public PlayerInfo clearFormation() { + bitField0_ &= ~0x00000400; + formation.clear(); + return this; + } + + /** + * optional .TowerFormation Formation = 5; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFormation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.TowerFormation getFormation() { + return formation; + } + + /** + * optional .TowerFormation Formation = 5; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.TowerFormation getMutableFormation() { + bitField0_ |= 0x00000400; + return formation; + } + + /** + * optional .TowerFormation Formation = 5; + * @param value the formation to set + * @return this + */ + public PlayerInfo setFormation(final Public.TowerFormation value) { + bitField0_ |= 0x00000400; + formation.copyFrom(value); + return this; + } + + /** + * optional .EnergyInfo Energy = 7; + * @return whether the energy field is set + */ + public boolean hasEnergy() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * optional .EnergyInfo Energy = 7; + * @return this + */ + public PlayerInfo clearEnergy() { + bitField0_ &= ~0x00000800; + energy.clear(); + return this; + } + + /** + * optional .EnergyInfo Energy = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEnergy()} if you want to modify it. + * + * @return internal storage object for reading + */ + public EnergyInfo getEnergy() { + return energy; + } + + /** + * optional .EnergyInfo Energy = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public EnergyInfo getMutableEnergy() { + bitField0_ |= 0x00000800; + return energy; + } + + /** + * optional .EnergyInfo Energy = 7; + * @param value the energy to set + * @return this + */ + public PlayerInfo setEnergy(final EnergyInfo value) { + bitField0_ |= 0x00000800; + energy.copyFrom(value); + return this; + } + + /** + * optional .WorldClassInfo WorldClass = 8; + * @return whether the worldClass field is set + */ + public boolean hasWorldClass() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * optional .WorldClassInfo WorldClass = 8; + * @return this + */ + public PlayerInfo clearWorldClass() { + bitField0_ &= ~0x00001000; + worldClass.clear(); + return this; + } + + /** + * optional .WorldClassInfo WorldClass = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableWorldClass()} if you want to modify it. + * + * @return internal storage object for reading + */ + public WorldClassInfo getWorldClass() { + return worldClass; + } + + /** + * optional .WorldClassInfo WorldClass = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public WorldClassInfo getMutableWorldClass() { + bitField0_ |= 0x00001000; + return worldClass; + } + + /** + * optional .WorldClassInfo WorldClass = 8; + * @param value the worldClass to set + * @return this + */ + public PlayerInfo setWorldClass(final WorldClassInfo value) { + bitField0_ |= 0x00001000; + worldClass.copyFrom(value); + return this; + } + + /** + * optional .AgentData Agent = 9; + * @return whether the agent field is set + */ + public boolean hasAgent() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * optional .AgentData Agent = 9; + * @return this + */ + public PlayerInfo clearAgent() { + bitField0_ &= ~0x00002000; + agent.clear(); + return this; + } + + /** + * optional .AgentData Agent = 9; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAgent()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.AgentData getAgent() { + return agent; + } + + /** + * optional .AgentData Agent = 9; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.AgentData getMutableAgent() { + bitField0_ |= 0x00002000; + return agent; + } + + /** + * optional .AgentData Agent = 9; + * @param value the agent to set + * @return this + */ + public PlayerInfo setAgent(final Public.AgentData value) { + bitField0_ |= 0x00002000; + agent.copyFrom(value); + return this; + } + + /** + * optional .Quests Quests = 13; + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00004000) != 0; + } + + /** + * optional .Quests Quests = 13; + * @return this + */ + public PlayerInfo clearQuests() { + bitField0_ &= ~0x00004000; + quests.clear(); + return this; + } + + /** + * optional .Quests Quests = 13; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Quests getQuests() { + return quests; + } + + /** + * optional .Quests Quests = 13; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Quests getMutableQuests() { + bitField0_ |= 0x00004000; + return quests; + } + + /** + * optional .Quests Quests = 13; + * @param value the quests to set + * @return this + */ + public PlayerInfo setQuests(final Public.Quests value) { + bitField0_ |= 0x00004000; + quests.copyFrom(value); + return this; + } + + /** + * optional .StateInfo State = 14; + * @return whether the state field is set + */ + public boolean hasState() { + return (bitField0_ & 0x00008000) != 0; + } + + /** + * optional .StateInfo State = 14; + * @return this + */ + public PlayerInfo clearState() { + bitField0_ &= ~0x00008000; + state.clear(); + return this; + } + + /** + * optional .StateInfo State = 14; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableState()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.StateInfo getState() { + return state; + } + + /** + * optional .StateInfo State = 14; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.StateInfo getMutableState() { + bitField0_ |= 0x00008000; + return state; + } + + /** + * optional .StateInfo State = 14; + * @param value the state to set + * @return this + */ + public PlayerInfo setState(final Public.StateInfo value) { + bitField0_ |= 0x00008000; + state.copyFrom(value); + return this; + } + + /** + * optional .PhoneInfo Phone = 25; + * @return whether the phone field is set + */ + public boolean hasPhone() { + return (bitField0_ & 0x00010000) != 0; + } + + /** + * optional .PhoneInfo Phone = 25; + * @return this + */ + public PlayerInfo clearPhone() { + bitField0_ &= ~0x00010000; + phone.clear(); + return this; + } + + /** + * optional .PhoneInfo Phone = 25; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePhone()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PhoneInfo getPhone() { + return phone; + } + + /** + * optional .PhoneInfo Phone = 25; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PhoneInfo getMutablePhone() { + bitField0_ |= 0x00010000; + return phone; + } + + /** + * optional .PhoneInfo Phone = 25; + * @param value the phone to set + * @return this + */ + public PlayerInfo setPhone(final PhoneInfo value) { + bitField0_ |= 0x00010000; + phone.copyFrom(value); + return this; + } + + /** + * optional .StoryInfo Story = 30; + * @return whether the story field is set + */ + public boolean hasStory() { + return (bitField0_ & 0x00020000) != 0; + } + + /** + * optional .StoryInfo Story = 30; + * @return this + */ + public PlayerInfo clearStory() { + bitField0_ &= ~0x00020000; + story.clear(); + return this; + } + + /** + * optional .StoryInfo Story = 30; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStory()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.StoryInfo getStory() { + return story; + } + + /** + * optional .StoryInfo Story = 30; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.StoryInfo getMutableStory() { + bitField0_ |= 0x00020000; + return story; + } + + /** + * optional .StoryInfo Story = 30; + * @param value the story to set + * @return this + */ + public PlayerInfo setStory(final Public.StoryInfo value) { + bitField0_ |= 0x00020000; + story.copyFrom(value); + return this; + } + + /** + * optional .VampireSurvivorRecordInfo VampireSurvivorRecord = 31; + * @return whether the vampireSurvivorRecord field is set + */ + public boolean hasVampireSurvivorRecord() { + return (bitField0_ & 0x00040000) != 0; + } + + /** + * optional .VampireSurvivorRecordInfo VampireSurvivorRecord = 31; + * @return this + */ + public PlayerInfo clearVampireSurvivorRecord() { + bitField0_ &= ~0x00040000; + vampireSurvivorRecord.clear(); + return this; + } + + /** + * optional .VampireSurvivorRecordInfo VampireSurvivorRecord = 31; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableVampireSurvivorRecord()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.VampireSurvivorRecordInfo getVampireSurvivorRecord() { + return vampireSurvivorRecord; + } + + /** + * optional .VampireSurvivorRecordInfo VampireSurvivorRecord = 31; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.VampireSurvivorRecordInfo getMutableVampireSurvivorRecord() { + bitField0_ |= 0x00040000; + return vampireSurvivorRecord; + } + + /** + * optional .VampireSurvivorRecordInfo VampireSurvivorRecord = 31; + * @param value the vampireSurvivorRecord to set + * @return this + */ + public PlayerInfo setVampireSurvivorRecord(final Public.VampireSurvivorRecordInfo value) { + bitField0_ |= 0x00040000; + vampireSurvivorRecord.copyFrom(value); + return this; + } + + /** + * optional bytes Achievements = 18; + * @return whether the achievements field is set + */ + public boolean hasAchievements() { + return (bitField0_ & 0x00080000) != 0; + } + + /** + * optional bytes Achievements = 18; + * @return this + */ + public PlayerInfo clearAchievements() { + bitField0_ &= ~0x00080000; + achievements.clear(); + return this; + } + + /** + * optional bytes Achievements = 18; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAchievements()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getAchievements() { + return achievements; + } + + /** + * optional bytes Achievements = 18; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableAchievements() { + bitField0_ |= 0x00080000; + return achievements; + } + + /** + * optional bytes Achievements = 18; + * @param value the achievements to add + * @return this + */ + public PlayerInfo addAchievements(final byte value) { + bitField0_ |= 0x00080000; + achievements.add(value); + return this; + } + + /** + * optional bytes Achievements = 18; + * @param values the achievements to add + * @return this + */ + public PlayerInfo addAllAchievements(final byte... values) { + bitField0_ |= 0x00080000; + achievements.addAll(values); + return this; + } + + /** + * optional bytes Achievements = 18; + * @param values the achievements to set + * @return this + */ + public PlayerInfo setAchievements(final byte... values) { + bitField0_ |= 0x00080000; + achievements.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00100000) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerInfo clearNextPackage() { + bitField0_ &= ~0x00100000; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00100000; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerInfo addNextPackage(final byte value) { + bitField0_ |= 0x00100000; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00100000; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00100000; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 RglPassedIds = 10; + * @return whether the rglPassedIds field is set + */ + public boolean hasRglPassedIds() { + return (bitField0_ & 0x00200000) != 0; + } + + /** + * repeated uint32 RglPassedIds = 10; + * @return this + */ + public PlayerInfo clearRglPassedIds() { + bitField0_ &= ~0x00200000; + rglPassedIds.clear(); + return this; + } + + /** + * repeated uint32 RglPassedIds = 10; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRglPassedIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getRglPassedIds() { + return rglPassedIds; + } + + /** + * repeated uint32 RglPassedIds = 10; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableRglPassedIds() { + bitField0_ |= 0x00200000; + return rglPassedIds; + } + + /** + * repeated uint32 RglPassedIds = 10; + * @param value the rglPassedIds to add + * @return this + */ + public PlayerInfo addRglPassedIds(final int value) { + bitField0_ |= 0x00200000; + rglPassedIds.add(value); + return this; + } + + /** + * repeated uint32 RglPassedIds = 10; + * @param values the rglPassedIds to add + * @return this + */ + public PlayerInfo addAllRglPassedIds(final int... values) { + bitField0_ |= 0x00200000; + rglPassedIds.addAll(values); + return this; + } + + /** + * repeated uint32 Board = 16; + * @return whether the board field is set + */ + public boolean hasBoard() { + return (bitField0_ & 0x00400000) != 0; + } + + /** + * repeated uint32 Board = 16; + * @return this + */ + public PlayerInfo clearBoard() { + bitField0_ &= ~0x00400000; + board.clear(); + return this; + } + + /** + * repeated uint32 Board = 16; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBoard()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getBoard() { + return board; + } + + /** + * repeated uint32 Board = 16; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableBoard() { + bitField0_ |= 0x00400000; + return board; + } + + /** + * repeated uint32 Board = 16; + * @param value the board to add + * @return this + */ + public PlayerInfo addBoard(final int value) { + bitField0_ |= 0x00400000; + board.add(value); + return this; + } + + /** + * repeated uint32 Board = 16; + * @param values the board to add + * @return this + */ + public PlayerInfo addAllBoard(final int... values) { + bitField0_ |= 0x00400000; + board.addAll(values); + return this; + } + + /** + * repeated uint32 DatingCharIds = 17; + * @return whether the datingCharIds field is set + */ + public boolean hasDatingCharIds() { + return (bitField0_ & 0x00800000) != 0; + } + + /** + * repeated uint32 DatingCharIds = 17; + * @return this + */ + public PlayerInfo clearDatingCharIds() { + bitField0_ &= ~0x00800000; + datingCharIds.clear(); + return this; + } + + /** + * repeated uint32 DatingCharIds = 17; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDatingCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDatingCharIds() { + return datingCharIds; + } + + /** + * repeated uint32 DatingCharIds = 17; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDatingCharIds() { + bitField0_ |= 0x00800000; + return datingCharIds; + } + + /** + * repeated uint32 DatingCharIds = 17; + * @param value the datingCharIds to add + * @return this + */ + public PlayerInfo addDatingCharIds(final int value) { + bitField0_ |= 0x00800000; + datingCharIds.add(value); + return this; + } + + /** + * repeated uint32 DatingCharIds = 17; + * @param values the datingCharIds to add + * @return this + */ + public PlayerInfo addAllDatingCharIds(final int... values) { + bitField0_ |= 0x00800000; + datingCharIds.addAll(values); + return this; + } + + /** + * repeated uint32 DailyActiveIds = 32; + * @return whether the dailyActiveIds field is set + */ + public boolean hasDailyActiveIds() { + return (bitField0_ & 0x01000000) != 0; + } + + /** + * repeated uint32 DailyActiveIds = 32; + * @return this + */ + public PlayerInfo clearDailyActiveIds() { + bitField0_ &= ~0x01000000; + dailyActiveIds.clear(); + return this; + } + + /** + * repeated uint32 DailyActiveIds = 32; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDailyActiveIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDailyActiveIds() { + return dailyActiveIds; + } + + /** + * repeated uint32 DailyActiveIds = 32; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDailyActiveIds() { + bitField0_ |= 0x01000000; + return dailyActiveIds; + } + + /** + * repeated uint32 DailyActiveIds = 32; + * @param value the dailyActiveIds to add + * @return this + */ + public PlayerInfo addDailyActiveIds(final int value) { + bitField0_ |= 0x01000000; + dailyActiveIds.add(value); + return this; + } + + /** + * repeated uint32 DailyActiveIds = 32; + * @param values the dailyActiveIds to add + * @return this + */ + public PlayerInfo addAllDailyActiveIds(final int... values) { + bitField0_ |= 0x01000000; + dailyActiveIds.addAll(values); + return this; + } + + /** + * repeated uint32 HonorList = 123; + * @return whether the honorList field is set + */ + public boolean hasHonorList() { + return (bitField0_ & 0x02000000) != 0; + } + + /** + * repeated uint32 HonorList = 123; + * @return this + */ + public PlayerInfo clearHonorList() { + bitField0_ &= ~0x02000000; + honorList.clear(); + return this; + } + + /** + * repeated uint32 HonorList = 123; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHonorList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getHonorList() { + return honorList; + } + + /** + * repeated uint32 HonorList = 123; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableHonorList() { + bitField0_ |= 0x02000000; + return honorList; + } + + /** + * repeated uint32 HonorList = 123; + * @param value the honorList to add + * @return this + */ + public PlayerInfo addHonorList(final int value) { + bitField0_ |= 0x02000000; + honorList.add(value); + return this; + } + + /** + * repeated uint32 HonorList = 123; + * @param values the honorList to add + * @return this + */ + public PlayerInfo addAllHonorList(final int... values) { + bitField0_ |= 0x02000000; + honorList.addAll(values); + return this; + } + + /** + * repeated .Res Res = 2; + * @return whether the res field is set + */ + public boolean hasRes() { + return (bitField0_ & 0x04000000) != 0; + } + + /** + * repeated .Res Res = 2; + * @return this + */ + public PlayerInfo clearRes() { + bitField0_ &= ~0x04000000; + res.clear(); + return this; + } + + /** + * repeated .Res Res = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRes() { + return res; + } + + /** + * repeated .Res Res = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRes() { + bitField0_ |= 0x04000000; + return res; + } + + /** + * repeated .Res Res = 2; + * @param value the res to add + * @return this + */ + public PlayerInfo addRes(final Public.Res value) { + bitField0_ |= 0x04000000; + res.add(value); + return this; + } + + /** + * repeated .Res Res = 2; + * @param values the res to add + * @return this + */ + public PlayerInfo addAllRes(final Public.Res... values) { + bitField0_ |= 0x04000000; + res.addAll(values); + return this; + } + + /** + * repeated .Item Items = 3; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x08000000) != 0; + } + + /** + * repeated .Item Items = 3; + * @return this + */ + public PlayerInfo clearItems() { + bitField0_ &= ~0x08000000; + items.clear(); + return this; + } + + /** + * repeated .Item Items = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getItems() { + return items; + } + + /** + * repeated .Item Items = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableItems() { + bitField0_ |= 0x08000000; + return items; + } + + /** + * repeated .Item Items = 3; + * @param value the items to add + * @return this + */ + public PlayerInfo addItems(final Public.Item value) { + bitField0_ |= 0x08000000; + items.add(value); + return this; + } + + /** + * repeated .Item Items = 3; + * @param values the items to add + * @return this + */ + public PlayerInfo addAllItems(final Public.Item... values) { + bitField0_ |= 0x08000000; + items.addAll(values); + return this; + } + + /** + * repeated .Char Chars = 4; + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x10000000) != 0; + } + + /** + * repeated .Char Chars = 4; + * @return this + */ + public PlayerInfo clearChars() { + bitField0_ &= ~0x10000000; + chars.clear(); + return this; + } + + /** + * repeated .Char Chars = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getChars() { + return chars; + } + + /** + * repeated .Char Chars = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableChars() { + bitField0_ |= 0x10000000; + return chars; + } + + /** + * repeated .Char Chars = 4; + * @param value the chars to add + * @return this + */ + public PlayerInfo addChars(final Public.Char value) { + bitField0_ |= 0x10000000; + chars.add(value); + return this; + } + + /** + * repeated .Char Chars = 4; + * @param values the chars to add + * @return this + */ + public PlayerInfo addAllChars(final Public.Char... values) { + bitField0_ |= 0x10000000; + chars.addAll(values); + return this; + } + + /** + * repeated .EquipmentInfo Equipments = 11; + * @return whether the equipments field is set + */ + public boolean hasEquipments() { + return (bitField0_ & 0x20000000) != 0; + } + + /** + * repeated .EquipmentInfo Equipments = 11; + * @return this + */ + public PlayerInfo clearEquipments() { + bitField0_ &= ~0x20000000; + equipments.clear(); + return this; + } + + /** + * repeated .EquipmentInfo Equipments = 11; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEquipments()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getEquipments() { + return equipments; + } + + /** + * repeated .EquipmentInfo Equipments = 11; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableEquipments() { + bitField0_ |= 0x20000000; + return equipments; + } + + /** + * repeated .EquipmentInfo Equipments = 11; + * @param value the equipments to add + * @return this + */ + public PlayerInfo addEquipments(final Public.EquipmentInfo value) { + bitField0_ |= 0x20000000; + equipments.add(value); + return this; + } + + /** + * repeated .EquipmentInfo Equipments = 11; + * @param values the equipments to add + * @return this + */ + public PlayerInfo addAllEquipments(final Public.EquipmentInfo... values) { + bitField0_ |= 0x20000000; + equipments.addAll(values); + return this; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 12; + * @return whether the regionBossLevels field is set + */ + public boolean hasRegionBossLevels() { + return (bitField0_ & 0x40000000) != 0; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 12; + * @return this + */ + public PlayerInfo clearRegionBossLevels() { + bitField0_ &= ~0x40000000; + regionBossLevels.clear(); + return this; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 12; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRegionBossLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getRegionBossLevels() { + return regionBossLevels; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 12; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableRegionBossLevels() { + bitField0_ |= 0x40000000; + return regionBossLevels; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 12; + * @param value the regionBossLevels to add + * @return this + */ + public PlayerInfo addRegionBossLevels(final Public.RegionBossLevel value) { + bitField0_ |= 0x40000000; + regionBossLevels.add(value); + return this; + } + + /** + * repeated .RegionBossLevel RegionBossLevels = 12; + * @param values the regionBossLevels to add + * @return this + */ + public PlayerInfo addAllRegionBossLevels(final Public.RegionBossLevel... values) { + bitField0_ |= 0x40000000; + regionBossLevels.addAll(values); + return this; + } + + /** + * repeated .HandbookInfo Handbook = 19; + * @return whether the handbook field is set + */ + public boolean hasHandbook() { + return (bitField0_ & 0x80000000) != 0; + } + + /** + * repeated .HandbookInfo Handbook = 19; + * @return this + */ + public PlayerInfo clearHandbook() { + bitField0_ &= ~0x80000000; + handbook.clear(); + return this; + } + + /** + * repeated .HandbookInfo Handbook = 19; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHandbook()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getHandbook() { + return handbook; + } + + /** + * repeated .HandbookInfo Handbook = 19; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableHandbook() { + bitField0_ |= 0x80000000; + return handbook; + } + + /** + * repeated .HandbookInfo Handbook = 19; + * @param value the handbook to add + * @return this + */ + public PlayerInfo addHandbook(final Public.HandbookInfo value) { + bitField0_ |= 0x80000000; + handbook.add(value); + return this; + } + + /** + * repeated .HandbookInfo Handbook = 19; + * @param values the handbook to add + * @return this + */ + public PlayerInfo addAllHandbook(final Public.HandbookInfo... values) { + bitField0_ |= 0x80000000; + handbook.addAll(values); + return this; + } + + /** + * repeated .Title Titles = 21; + * @return whether the titles field is set + */ + public boolean hasTitles() { + return (bitField1_ & 0x00000001) != 0; + } + + /** + * repeated .Title Titles = 21; + * @return this + */ + public PlayerInfo clearTitles() { + bitField1_ &= ~0x00000001; + titles.clear(); + return this; + } + + /** + * repeated .Title Titles = 21; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTitles()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getTitles() { + return titles; + } + + /** + * repeated .Title Titles = 21; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableTitles() { + bitField1_ |= 0x00000001; + return titles; + } + + /** + * repeated .Title Titles = 21; + * @param value the titles to add + * @return this + */ + public PlayerInfo addTitles(final Public.Title value) { + bitField1_ |= 0x00000001; + titles.add(value); + return this; + } + + /** + * repeated .Title Titles = 21; + * @param values the titles to add + * @return this + */ + public PlayerInfo addAllTitles(final Public.Title... values) { + bitField1_ |= 0x00000001; + titles.addAll(values); + return this; + } + + /** + * repeated .DailyInstance DailyInstances = 22; + * @return whether the dailyInstances field is set + */ + public boolean hasDailyInstances() { + return (bitField1_ & 0x00000002) != 0; + } + + /** + * repeated .DailyInstance DailyInstances = 22; + * @return this + */ + public PlayerInfo clearDailyInstances() { + bitField1_ &= ~0x00000002; + dailyInstances.clear(); + return this; + } + + /** + * repeated .DailyInstance DailyInstances = 22; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDailyInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getDailyInstances() { + return dailyInstances; + } + + /** + * repeated .DailyInstance DailyInstances = 22; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableDailyInstances() { + bitField1_ |= 0x00000002; + return dailyInstances; + } + + /** + * repeated .DailyInstance DailyInstances = 22; + * @param value the dailyInstances to add + * @return this + */ + public PlayerInfo addDailyInstances(final Public.DailyInstance value) { + bitField1_ |= 0x00000002; + dailyInstances.add(value); + return this; + } + + /** + * repeated .DailyInstance DailyInstances = 22; + * @param values the dailyInstances to add + * @return this + */ + public PlayerInfo addAllDailyInstances(final Public.DailyInstance... values) { + bitField1_ |= 0x00000002; + dailyInstances.addAll(values); + return this; + } + + /** + * repeated .DictionaryTab Dictionaries = 23; + * @return whether the dictionaries field is set + */ + public boolean hasDictionaries() { + return (bitField1_ & 0x00000004) != 0; + } + + /** + * repeated .DictionaryTab Dictionaries = 23; + * @return this + */ + public PlayerInfo clearDictionaries() { + bitField1_ &= ~0x00000004; + dictionaries.clear(); + return this; + } + + /** + * repeated .DictionaryTab Dictionaries = 23; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDictionaries()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getDictionaries() { + return dictionaries; + } + + /** + * repeated .DictionaryTab Dictionaries = 23; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableDictionaries() { + bitField1_ |= 0x00000004; + return dictionaries; + } + + /** + * repeated .DictionaryTab Dictionaries = 23; + * @param value the dictionaries to add + * @return this + */ + public PlayerInfo addDictionaries(final DictionaryTab value) { + bitField1_ |= 0x00000004; + dictionaries.add(value); + return this; + } + + /** + * repeated .DictionaryTab Dictionaries = 23; + * @param values the dictionaries to add + * @return this + */ + public PlayerInfo addAllDictionaries(final DictionaryTab... values) { + bitField1_ |= 0x00000004; + dictionaries.addAll(values); + return this; + } + + /** + * repeated .Activity Activities = 24; + * @return whether the activities field is set + */ + public boolean hasActivities() { + return (bitField1_ & 0x00000008) != 0; + } + + /** + * repeated .Activity Activities = 24; + * @return this + */ + public PlayerInfo clearActivities() { + bitField1_ &= ~0x00000008; + activities.clear(); + return this; + } + + /** + * repeated .Activity Activities = 24; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableActivities()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getActivities() { + return activities; + } + + /** + * repeated .Activity Activities = 24; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableActivities() { + bitField1_ |= 0x00000008; + return activities; + } + + /** + * repeated .Activity Activities = 24; + * @param value the activities to add + * @return this + */ + public PlayerInfo addActivities(final Public.Activity value) { + bitField1_ |= 0x00000008; + activities.add(value); + return this; + } + + /** + * repeated .Activity Activities = 24; + * @param values the activities to add + * @return this + */ + public PlayerInfo addAllActivities(final Public.Activity... values) { + bitField1_ |= 0x00000008; + activities.addAll(values); + return this; + } + + /** + * repeated .Disc Discs = 28; + * @return whether the discs field is set + */ + public boolean hasDiscs() { + return (bitField1_ & 0x00000010) != 0; + } + + /** + * repeated .Disc Discs = 28; + * @return this + */ + public PlayerInfo clearDiscs() { + bitField1_ &= ~0x00000010; + discs.clear(); + return this; + } + + /** + * repeated .Disc Discs = 28; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDiscs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getDiscs() { + return discs; + } + + /** + * repeated .Disc Discs = 28; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableDiscs() { + bitField1_ |= 0x00000010; + return discs; + } + + /** + * repeated .Disc Discs = 28; + * @param value the discs to add + * @return this + */ + public PlayerInfo addDiscs(final Public.Disc value) { + bitField1_ |= 0x00000010; + discs.add(value); + return this; + } + + /** + * repeated .Disc Discs = 28; + * @param values the discs to add + * @return this + */ + public PlayerInfo addAllDiscs(final Public.Disc... values) { + bitField1_ |= 0x00000010; + discs.addAll(values); + return this; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 29; + * @return whether the equipmentInstances field is set + */ + public boolean hasEquipmentInstances() { + return (bitField1_ & 0x00000020) != 0; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 29; + * @return this + */ + public PlayerInfo clearEquipmentInstances() { + bitField1_ &= ~0x00000020; + equipmentInstances.clear(); + return this; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 29; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEquipmentInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getEquipmentInstances() { + return equipmentInstances; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 29; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableEquipmentInstances() { + bitField1_ |= 0x00000020; + return equipmentInstances; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 29; + * @param value the equipmentInstances to add + * @return this + */ + public PlayerInfo addEquipmentInstances(final Public.EquipmentInstance value) { + bitField1_ |= 0x00000020; + equipmentInstances.add(value); + return this; + } + + /** + * repeated .EquipmentInstance EquipmentInstances = 29; + * @param values the equipmentInstances to add + * @return this + */ + public PlayerInfo addAllEquipmentInstances(final Public.EquipmentInstance... values) { + bitField1_ |= 0x00000020; + equipmentInstances.addAll(values); + return this; + } + + /** + * repeated .SkillInstance SkillInstances = 34; + * @return whether the skillInstances field is set + */ + public boolean hasSkillInstances() { + return (bitField1_ & 0x00000040) != 0; + } + + /** + * repeated .SkillInstance SkillInstances = 34; + * @return this + */ + public PlayerInfo clearSkillInstances() { + bitField1_ &= ~0x00000040; + skillInstances.clear(); + return this; + } + + /** + * repeated .SkillInstance SkillInstances = 34; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSkillInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getSkillInstances() { + return skillInstances; + } + + /** + * repeated .SkillInstance SkillInstances = 34; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableSkillInstances() { + bitField1_ |= 0x00000040; + return skillInstances; + } + + /** + * repeated .SkillInstance SkillInstances = 34; + * @param value the skillInstances to add + * @return this + */ + public PlayerInfo addSkillInstances(final Public.SkillInstance value) { + bitField1_ |= 0x00000040; + skillInstances.add(value); + return this; + } + + /** + * repeated .SkillInstance SkillInstances = 34; + * @param values the skillInstances to add + * @return this + */ + public PlayerInfo addAllSkillInstances(final Public.SkillInstance... values) { + bitField1_ |= 0x00000040; + skillInstances.addAll(values); + return this; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 35; + * @return whether the weekBossLevels field is set + */ + public boolean hasWeekBossLevels() { + return (bitField1_ & 0x00000080) != 0; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 35; + * @return this + */ + public PlayerInfo clearWeekBossLevels() { + bitField1_ &= ~0x00000080; + weekBossLevels.clear(); + return this; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 35; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableWeekBossLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getWeekBossLevels() { + return weekBossLevels; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 35; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableWeekBossLevels() { + bitField1_ |= 0x00000080; + return weekBossLevels; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 35; + * @param value the weekBossLevels to add + * @return this + */ + public PlayerInfo addWeekBossLevels(final Public.WeekBossLevel value) { + bitField1_ |= 0x00000080; + weekBossLevels.add(value); + return this; + } + + /** + * repeated .WeekBossLevel WeekBossLevels = 35; + * @param values the weekBossLevels to add + * @return this + */ + public PlayerInfo addAllWeekBossLevels(final Public.WeekBossLevel... values) { + bitField1_ |= 0x00000080; + weekBossLevels.addAll(values); + return this; + } + + /** + * repeated .CharGemInstance CharGemInstances = 36; + * @return whether the charGemInstances field is set + */ + public boolean hasCharGemInstances() { + return (bitField1_ & 0x00000100) != 0; + } + + /** + * repeated .CharGemInstance CharGemInstances = 36; + * @return this + */ + public PlayerInfo clearCharGemInstances() { + bitField1_ &= ~0x00000100; + charGemInstances.clear(); + return this; + } + + /** + * repeated .CharGemInstance CharGemInstances = 36; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGemInstances()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCharGemInstances() { + return charGemInstances; + } + + /** + * repeated .CharGemInstance CharGemInstances = 36; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCharGemInstances() { + bitField1_ |= 0x00000100; + return charGemInstances; + } + + /** + * repeated .CharGemInstance CharGemInstances = 36; + * @param value the charGemInstances to add + * @return this + */ + public PlayerInfo addCharGemInstances(final Public.CharGemInstance value) { + bitField1_ |= 0x00000100; + charGemInstances.add(value); + return this; + } + + /** + * repeated .CharGemInstance CharGemInstances = 36; + * @param values the charGemInstances to add + * @return this + */ + public PlayerInfo addAllCharGemInstances(final Public.CharGemInstance... values) { + bitField1_ |= 0x00000100; + charGemInstances.addAll(values); + return this; + } + + /** + * repeated .TutorialLevel TutorialLevels = 37; + * @return whether the tutorialLevels field is set + */ + public boolean hasTutorialLevels() { + return (bitField1_ & 0x00000200) != 0; + } + + /** + * repeated .TutorialLevel TutorialLevels = 37; + * @return this + */ + public PlayerInfo clearTutorialLevels() { + bitField1_ &= ~0x00000200; + tutorialLevels.clear(); + return this; + } + + /** + * repeated .TutorialLevel TutorialLevels = 37; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTutorialLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getTutorialLevels() { + return tutorialLevels; + } + + /** + * repeated .TutorialLevel TutorialLevels = 37; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableTutorialLevels() { + bitField1_ |= 0x00000200; + return tutorialLevels; + } + + /** + * repeated .TutorialLevel TutorialLevels = 37; + * @param value the tutorialLevels to add + * @return this + */ + public PlayerInfo addTutorialLevels(final Public.TutorialLevel value) { + bitField1_ |= 0x00000200; + tutorialLevels.add(value); + return this; + } + + /** + * repeated .TutorialLevel TutorialLevels = 37; + * @param values the tutorialLevels to add + * @return this + */ + public PlayerInfo addAllTutorialLevels(final Public.TutorialLevel... values) { + bitField1_ |= 0x00000200; + tutorialLevels.addAll(values); + return this; + } + + /** + * repeated .HonorInfo Honors = 124; + * @return whether the honors field is set + */ + public boolean hasHonors() { + return (bitField1_ & 0x00000400) != 0; + } + + /** + * repeated .HonorInfo Honors = 124; + * @return this + */ + public PlayerInfo clearHonors() { + bitField1_ &= ~0x00000400; + honors.clear(); + return this; + } + + /** + * repeated .HonorInfo Honors = 124; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHonors()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getHonors() { + return honors; + } + + /** + * repeated .HonorInfo Honors = 124; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableHonors() { + bitField1_ |= 0x00000400; + return honors; + } + + /** + * repeated .HonorInfo Honors = 124; + * @param value the honors to add + * @return this + */ + public PlayerInfo addHonors(final Public.HonorInfo value) { + bitField1_ |= 0x00000400; + honors.add(value); + return this; + } + + /** + * repeated .HonorInfo Honors = 124; + * @param values the honors to add + * @return this + */ + public PlayerInfo addAllHonors(final Public.HonorInfo... values) { + bitField1_ |= 0x00000400; + honors.addAll(values); + return this; + } + + @Override + public PlayerInfo copyFrom(final PlayerInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + talentResetTime = other.talentResetTime; + musicInfo = other.musicInfo; + serverTs = other.serverTs; + sendGiftCnt = other.sendGiftCnt; + signinIndex = other.signinIndex; + equipmentDoubleCount = other.equipmentDoubleCount; + tourGuideQuestGroup = other.tourGuideQuestGroup; + towerTicket = other.towerTicket; + dailyShopRewardStatus = other.dailyShopRewardStatus; + acc.copyFrom(other.acc); + formation.copyFrom(other.formation); + energy.copyFrom(other.energy); + worldClass.copyFrom(other.worldClass); + agent.copyFrom(other.agent); + quests.copyFrom(other.quests); + state.copyFrom(other.state); + phone.copyFrom(other.phone); + story.copyFrom(other.story); + vampireSurvivorRecord.copyFrom(other.vampireSurvivorRecord); + achievements.copyFrom(other.achievements); + nextPackage.copyFrom(other.nextPackage); + rglPassedIds.copyFrom(other.rglPassedIds); + board.copyFrom(other.board); + datingCharIds.copyFrom(other.datingCharIds); + dailyActiveIds.copyFrom(other.dailyActiveIds); + honorList.copyFrom(other.honorList); + res.copyFrom(other.res); + items.copyFrom(other.items); + chars.copyFrom(other.chars); + equipments.copyFrom(other.equipments); + regionBossLevels.copyFrom(other.regionBossLevels); + handbook.copyFrom(other.handbook); + } + if ((bitField1_ | other.bitField1_) != 0) { + bitField1_ = other.bitField1_; + titles.copyFrom(other.titles); + dailyInstances.copyFrom(other.dailyInstances); + dictionaries.copyFrom(other.dictionaries); + activities.copyFrom(other.activities); + discs.copyFrom(other.discs); + equipmentInstances.copyFrom(other.equipmentInstances); + skillInstances.copyFrom(other.skillInstances); + weekBossLevels.copyFrom(other.weekBossLevels); + charGemInstances.copyFrom(other.charGemInstances); + tutorialLevels.copyFrom(other.tutorialLevels); + honors.copyFrom(other.honors); + } + return this; + } + + @Override + public PlayerInfo mergeFrom(final PlayerInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTalentResetTime()) { + setTalentResetTime(other.talentResetTime); + } + if (other.hasMusicInfo()) { + setMusicInfo(other.musicInfo); + } + if (other.hasServerTs()) { + setServerTs(other.serverTs); + } + if (other.hasSendGiftCnt()) { + setSendGiftCnt(other.sendGiftCnt); + } + if (other.hasSigninIndex()) { + setSigninIndex(other.signinIndex); + } + if (other.hasEquipmentDoubleCount()) { + setEquipmentDoubleCount(other.equipmentDoubleCount); + } + if (other.hasTourGuideQuestGroup()) { + setTourGuideQuestGroup(other.tourGuideQuestGroup); + } + if (other.hasTowerTicket()) { + setTowerTicket(other.towerTicket); + } + if (other.hasDailyShopRewardStatus()) { + setDailyShopRewardStatus(other.dailyShopRewardStatus); + } + if (other.hasAcc()) { + getMutableAcc().mergeFrom(other.acc); + } + if (other.hasFormation()) { + getMutableFormation().mergeFrom(other.formation); + } + if (other.hasEnergy()) { + getMutableEnergy().mergeFrom(other.energy); + } + if (other.hasWorldClass()) { + getMutableWorldClass().mergeFrom(other.worldClass); + } + if (other.hasAgent()) { + getMutableAgent().mergeFrom(other.agent); + } + if (other.hasQuests()) { + getMutableQuests().mergeFrom(other.quests); + } + if (other.hasState()) { + getMutableState().mergeFrom(other.state); + } + if (other.hasPhone()) { + getMutablePhone().mergeFrom(other.phone); + } + if (other.hasStory()) { + getMutableStory().mergeFrom(other.story); + } + if (other.hasVampireSurvivorRecord()) { + getMutableVampireSurvivorRecord().mergeFrom(other.vampireSurvivorRecord); + } + if (other.hasAchievements()) { + getMutableAchievements().copyFrom(other.achievements); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRglPassedIds()) { + getMutableRglPassedIds().addAll(other.rglPassedIds); + } + if (other.hasBoard()) { + getMutableBoard().addAll(other.board); + } + if (other.hasDatingCharIds()) { + getMutableDatingCharIds().addAll(other.datingCharIds); + } + if (other.hasDailyActiveIds()) { + getMutableDailyActiveIds().addAll(other.dailyActiveIds); + } + if (other.hasHonorList()) { + getMutableHonorList().addAll(other.honorList); + } + if (other.hasRes()) { + getMutableRes().addAll(other.res); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + if (other.hasEquipments()) { + getMutableEquipments().addAll(other.equipments); + } + if (other.hasRegionBossLevels()) { + getMutableRegionBossLevels().addAll(other.regionBossLevels); + } + if (other.hasHandbook()) { + getMutableHandbook().addAll(other.handbook); + } + if (other.hasTitles()) { + getMutableTitles().addAll(other.titles); + } + if (other.hasDailyInstances()) { + getMutableDailyInstances().addAll(other.dailyInstances); + } + if (other.hasDictionaries()) { + getMutableDictionaries().addAll(other.dictionaries); + } + if (other.hasActivities()) { + getMutableActivities().addAll(other.activities); + } + if (other.hasDiscs()) { + getMutableDiscs().addAll(other.discs); + } + if (other.hasEquipmentInstances()) { + getMutableEquipmentInstances().addAll(other.equipmentInstances); + } + if (other.hasSkillInstances()) { + getMutableSkillInstances().addAll(other.skillInstances); + } + if (other.hasWeekBossLevels()) { + getMutableWeekBossLevels().addAll(other.weekBossLevels); + } + if (other.hasCharGemInstances()) { + getMutableCharGemInstances().addAll(other.charGemInstances); + } + if (other.hasTutorialLevels()) { + getMutableTutorialLevels().addAll(other.tutorialLevels); + } + if (other.hasHonors()) { + getMutableHonors().addAll(other.honors); + } + return this; + } + + @Override + public PlayerInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + bitField1_ = 0; + talentResetTime = 0L; + musicInfo = 0L; + serverTs = 0L; + sendGiftCnt = 0; + signinIndex = 0; + equipmentDoubleCount = 0; + tourGuideQuestGroup = 0; + towerTicket = 0; + dailyShopRewardStatus = false; + acc.clear(); + formation.clear(); + energy.clear(); + worldClass.clear(); + agent.clear(); + quests.clear(); + state.clear(); + phone.clear(); + story.clear(); + vampireSurvivorRecord.clear(); + achievements.clear(); + nextPackage.clear(); + rglPassedIds.clear(); + board.clear(); + datingCharIds.clear(); + dailyActiveIds.clear(); + honorList.clear(); + res.clear(); + items.clear(); + chars.clear(); + equipments.clear(); + regionBossLevels.clear(); + handbook.clear(); + titles.clear(); + dailyInstances.clear(); + dictionaries.clear(); + activities.clear(); + discs.clear(); + equipmentInstances.clear(); + skillInstances.clear(); + weekBossLevels.clear(); + charGemInstances.clear(); + tutorialLevels.clear(); + honors.clear(); + return this; + } + + @Override + public PlayerInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + bitField1_ = 0; + acc.clearQuick(); + formation.clearQuick(); + energy.clearQuick(); + worldClass.clearQuick(); + agent.clearQuick(); + quests.clearQuick(); + state.clearQuick(); + phone.clearQuick(); + story.clearQuick(); + vampireSurvivorRecord.clearQuick(); + achievements.clear(); + nextPackage.clear(); + rglPassedIds.clear(); + board.clear(); + datingCharIds.clear(); + dailyActiveIds.clear(); + honorList.clear(); + res.clearQuick(); + items.clearQuick(); + chars.clearQuick(); + equipments.clearQuick(); + regionBossLevels.clearQuick(); + handbook.clearQuick(); + titles.clearQuick(); + dailyInstances.clearQuick(); + dictionaries.clearQuick(); + activities.clearQuick(); + discs.clearQuick(); + equipmentInstances.clearQuick(); + skillInstances.clearQuick(); + weekBossLevels.clearQuick(); + charGemInstances.clearQuick(); + tutorialLevels.clearQuick(); + honors.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerInfo)) { + return false; + } + PlayerInfo other = (PlayerInfo) o; + return bitField0_ == other.bitField0_ + && bitField1_ == other.bitField1_ + && (!hasTalentResetTime() || talentResetTime == other.talentResetTime) + && (!hasMusicInfo() || musicInfo == other.musicInfo) + && (!hasServerTs() || serverTs == other.serverTs) + && (!hasSendGiftCnt() || sendGiftCnt == other.sendGiftCnt) + && (!hasSigninIndex() || signinIndex == other.signinIndex) + && (!hasEquipmentDoubleCount() || equipmentDoubleCount == other.equipmentDoubleCount) + && (!hasTourGuideQuestGroup() || tourGuideQuestGroup == other.tourGuideQuestGroup) + && (!hasTowerTicket() || towerTicket == other.towerTicket) + && (!hasDailyShopRewardStatus() || dailyShopRewardStatus == other.dailyShopRewardStatus) + && (!hasAcc() || acc.equals(other.acc)) + && (!hasFormation() || formation.equals(other.formation)) + && (!hasEnergy() || energy.equals(other.energy)) + && (!hasWorldClass() || worldClass.equals(other.worldClass)) + && (!hasAgent() || agent.equals(other.agent)) + && (!hasQuests() || quests.equals(other.quests)) + && (!hasState() || state.equals(other.state)) + && (!hasPhone() || phone.equals(other.phone)) + && (!hasStory() || story.equals(other.story)) + && (!hasVampireSurvivorRecord() || vampireSurvivorRecord.equals(other.vampireSurvivorRecord)) + && (!hasAchievements() || achievements.equals(other.achievements)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRglPassedIds() || rglPassedIds.equals(other.rglPassedIds)) + && (!hasBoard() || board.equals(other.board)) + && (!hasDatingCharIds() || datingCharIds.equals(other.datingCharIds)) + && (!hasDailyActiveIds() || dailyActiveIds.equals(other.dailyActiveIds)) + && (!hasHonorList() || honorList.equals(other.honorList)) + && (!hasRes() || res.equals(other.res)) + && (!hasItems() || items.equals(other.items)) + && (!hasChars() || chars.equals(other.chars)) + && (!hasEquipments() || equipments.equals(other.equipments)) + && (!hasRegionBossLevels() || regionBossLevels.equals(other.regionBossLevels)) + && (!hasHandbook() || handbook.equals(other.handbook)) + && (!hasTitles() || titles.equals(other.titles)) + && (!hasDailyInstances() || dailyInstances.equals(other.dailyInstances)) + && (!hasDictionaries() || dictionaries.equals(other.dictionaries)) + && (!hasActivities() || activities.equals(other.activities)) + && (!hasDiscs() || discs.equals(other.discs)) + && (!hasEquipmentInstances() || equipmentInstances.equals(other.equipmentInstances)) + && (!hasSkillInstances() || skillInstances.equals(other.skillInstances)) + && (!hasWeekBossLevels() || weekBossLevels.equals(other.weekBossLevels)) + && (!hasCharGemInstances() || charGemInstances.equals(other.charGemInstances)) + && (!hasTutorialLevels() || tutorialLevels.equals(other.tutorialLevels)) + && (!hasHonors() || honors.equals(other.honors)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 464); + output.writeInt64NoTag(talentResetTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 2000); + output.writeInt64NoTag(musicInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 2040); + output.writeInt64NoTag(serverTs); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(sendGiftCnt); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 416); + output.writeUInt32NoTag(signinIndex); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 472); + output.writeUInt32NoTag(equipmentDoubleCount); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawLittleEndian16((short) 648); + output.writeUInt32NoTag(tourGuideQuestGroup); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawLittleEndian16((short) 2032); + output.writeUInt32NoTag(towerTicket); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 2024); + output.writeBoolNoTag(dailyShopRewardStatus); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(acc); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(formation); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(energy); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(worldClass); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(agent); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeRawByte((byte) 106); + output.writeMessageNoTag(quests); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeRawByte((byte) 114); + output.writeMessageNoTag(state); + } + if ((bitField0_ & 0x00010000) != 0) { + output.writeRawLittleEndian16((short) 458); + output.writeMessageNoTag(phone); + } + if ((bitField0_ & 0x00020000) != 0) { + output.writeRawLittleEndian16((short) 498); + output.writeMessageNoTag(story); + } + if ((bitField0_ & 0x00040000) != 0) { + output.writeRawLittleEndian16((short) 506); + output.writeMessageNoTag(vampireSurvivorRecord); + } + if ((bitField0_ & 0x00080000) != 0) { + output.writeRawLittleEndian16((short) 402); + output.writeBytesNoTag(achievements); + } + if ((bitField0_ & 0x00100000) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00200000) != 0) { + for (int i = 0; i < rglPassedIds.length(); i++) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(rglPassedIds.array()[i]); + } + } + if ((bitField0_ & 0x00400000) != 0) { + for (int i = 0; i < board.length(); i++) { + output.writeRawLittleEndian16((short) 384); + output.writeUInt32NoTag(board.array()[i]); + } + } + if ((bitField0_ & 0x00800000) != 0) { + for (int i = 0; i < datingCharIds.length(); i++) { + output.writeRawLittleEndian16((short) 392); + output.writeUInt32NoTag(datingCharIds.array()[i]); + } + } + if ((bitField0_ & 0x01000000) != 0) { + for (int i = 0; i < dailyActiveIds.length(); i++) { + output.writeRawLittleEndian16((short) 640); + output.writeUInt32NoTag(dailyActiveIds.array()[i]); + } + } + if ((bitField0_ & 0x02000000) != 0) { + for (int i = 0; i < honorList.length(); i++) { + output.writeRawLittleEndian16((short) 2008); + output.writeUInt32NoTag(honorList.array()[i]); + } + } + if ((bitField0_ & 0x04000000) != 0) { + for (int i = 0; i < res.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(res.get(i)); + } + } + if ((bitField0_ & 0x08000000) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(items.get(i)); + } + } + if ((bitField0_ & 0x10000000) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(chars.get(i)); + } + } + if ((bitField0_ & 0x20000000) != 0) { + for (int i = 0; i < equipments.length(); i++) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(equipments.get(i)); + } + } + if ((bitField0_ & 0x40000000) != 0) { + for (int i = 0; i < regionBossLevels.length(); i++) { + output.writeRawByte((byte) 98); + output.writeMessageNoTag(regionBossLevels.get(i)); + } + } + if ((bitField0_ & 0x80000000) != 0) { + for (int i = 0; i < handbook.length(); i++) { + output.writeRawLittleEndian16((short) 410); + output.writeMessageNoTag(handbook.get(i)); + } + } + if ((bitField1_ & 0x00000001) != 0) { + for (int i = 0; i < titles.length(); i++) { + output.writeRawLittleEndian16((short) 426); + output.writeMessageNoTag(titles.get(i)); + } + } + if ((bitField1_ & 0x00000002) != 0) { + for (int i = 0; i < dailyInstances.length(); i++) { + output.writeRawLittleEndian16((short) 434); + output.writeMessageNoTag(dailyInstances.get(i)); + } + } + if ((bitField1_ & 0x00000004) != 0) { + for (int i = 0; i < dictionaries.length(); i++) { + output.writeRawLittleEndian16((short) 442); + output.writeMessageNoTag(dictionaries.get(i)); + } + } + if ((bitField1_ & 0x00000008) != 0) { + for (int i = 0; i < activities.length(); i++) { + output.writeRawLittleEndian16((short) 450); + output.writeMessageNoTag(activities.get(i)); + } + } + if ((bitField1_ & 0x00000010) != 0) { + for (int i = 0; i < discs.length(); i++) { + output.writeRawLittleEndian16((short) 482); + output.writeMessageNoTag(discs.get(i)); + } + } + if ((bitField1_ & 0x00000020) != 0) { + for (int i = 0; i < equipmentInstances.length(); i++) { + output.writeRawLittleEndian16((short) 490); + output.writeMessageNoTag(equipmentInstances.get(i)); + } + } + if ((bitField1_ & 0x00000040) != 0) { + for (int i = 0; i < skillInstances.length(); i++) { + output.writeRawLittleEndian16((short) 658); + output.writeMessageNoTag(skillInstances.get(i)); + } + } + if ((bitField1_ & 0x00000080) != 0) { + for (int i = 0; i < weekBossLevels.length(); i++) { + output.writeRawLittleEndian16((short) 666); + output.writeMessageNoTag(weekBossLevels.get(i)); + } + } + if ((bitField1_ & 0x00000100) != 0) { + for (int i = 0; i < charGemInstances.length(); i++) { + output.writeRawLittleEndian16((short) 674); + output.writeMessageNoTag(charGemInstances.get(i)); + } + } + if ((bitField1_ & 0x00000200) != 0) { + for (int i = 0; i < tutorialLevels.length(); i++) { + output.writeRawLittleEndian16((short) 682); + output.writeMessageNoTag(tutorialLevels.get(i)); + } + } + if ((bitField1_ & 0x00000400) != 0) { + for (int i = 0; i < honors.length(); i++) { + output.writeRawLittleEndian16((short) 2018); + output.writeMessageNoTag(honors.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeInt64SizeNoTag(talentResetTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeInt64SizeNoTag(musicInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeInt64SizeNoTag(serverTs); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sendGiftCnt); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeUInt32SizeNoTag(signinIndex); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeUInt32SizeNoTag(equipmentDoubleCount); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2 + ProtoSink.computeUInt32SizeNoTag(tourGuideQuestGroup); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2 + ProtoSink.computeUInt32SizeNoTag(towerTicket); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 3; + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(acc); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(formation); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(energy); + } + if ((bitField0_ & 0x00001000) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(worldClass); + } + if ((bitField0_ & 0x00002000) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(agent); + } + if ((bitField0_ & 0x00004000) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(quests); + } + if ((bitField0_ & 0x00008000) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(state); + } + if ((bitField0_ & 0x00010000) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(phone); + } + if ((bitField0_ & 0x00020000) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(story); + } + if ((bitField0_ & 0x00040000) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(vampireSurvivorRecord); + } + if ((bitField0_ & 0x00080000) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(achievements); + } + if ((bitField0_ & 0x00100000) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00200000) != 0) { + size += (1 * rglPassedIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(rglPassedIds); + } + if ((bitField0_ & 0x00400000) != 0) { + size += (2 * board.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(board); + } + if ((bitField0_ & 0x00800000) != 0) { + size += (2 * datingCharIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(datingCharIds); + } + if ((bitField0_ & 0x01000000) != 0) { + size += (2 * dailyActiveIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(dailyActiveIds); + } + if ((bitField0_ & 0x02000000) != 0) { + size += (2 * honorList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(honorList); + } + if ((bitField0_ & 0x04000000) != 0) { + size += (1 * res.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(res); + } + if ((bitField0_ & 0x08000000) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + if ((bitField0_ & 0x10000000) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + if ((bitField0_ & 0x20000000) != 0) { + size += (1 * equipments.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(equipments); + } + if ((bitField0_ & 0x40000000) != 0) { + size += (1 * regionBossLevels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(regionBossLevels); + } + if ((bitField0_ & 0x80000000) != 0) { + size += (2 * handbook.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(handbook); + } + if ((bitField1_ & 0x00000001) != 0) { + size += (2 * titles.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(titles); + } + if ((bitField1_ & 0x00000002) != 0) { + size += (2 * dailyInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dailyInstances); + } + if ((bitField1_ & 0x00000004) != 0) { + size += (2 * dictionaries.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dictionaries); + } + if ((bitField1_ & 0x00000008) != 0) { + size += (2 * activities.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(activities); + } + if ((bitField1_ & 0x00000010) != 0) { + size += (2 * discs.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(discs); + } + if ((bitField1_ & 0x00000020) != 0) { + size += (2 * equipmentInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(equipmentInstances); + } + if ((bitField1_ & 0x00000040) != 0) { + size += (2 * skillInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(skillInstances); + } + if ((bitField1_ & 0x00000080) != 0) { + size += (2 * weekBossLevels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(weekBossLevels); + } + if ((bitField1_ & 0x00000100) != 0) { + size += (2 * charGemInstances.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charGemInstances); + } + if ((bitField1_ & 0x00000200) != 0) { + size += (2 * tutorialLevels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(tutorialLevels); + } + if ((bitField1_ & 0x00000400) != 0) { + size += (2 * honors.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(honors); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 208: { + // talentResetTime + talentResetTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 976) { + break; + } + } + case 976: { + // musicInfo + musicInfo = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 1016) { + break; + } + } + case 1016: { + // serverTs + serverTs = input.readInt64(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // sendGiftCnt + sendGiftCnt = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 160) { + break; + } + } + case 160: { + // signinIndex + signinIndex = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 216) { + break; + } + } + case 216: { + // equipmentDoubleCount + equipmentDoubleCount = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 264) { + break; + } + } + case 264: { + // tourGuideQuestGroup + tourGuideQuestGroup = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 1008) { + break; + } + } + case 1008: { + // towerTicket + towerTicket = input.readUInt32(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 1000) { + break; + } + } + case 1000: { + // dailyShopRewardStatus + dailyShopRewardStatus = input.readBool(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // acc + input.readMessage(acc); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // formation + input.readMessage(formation); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // energy + input.readMessage(energy); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // worldClass + input.readMessage(worldClass); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // agent + input.readMessage(agent); + bitField0_ |= 0x00002000; + tag = input.readTag(); + if (tag != 106) { + break; + } + } + case 106: { + // quests + input.readMessage(quests); + bitField0_ |= 0x00004000; + tag = input.readTag(); + if (tag != 114) { + break; + } + } + case 114: { + // state + input.readMessage(state); + bitField0_ |= 0x00008000; + tag = input.readTag(); + if (tag != 202) { + break; + } + } + case 202: { + // phone + input.readMessage(phone); + bitField0_ |= 0x00010000; + tag = input.readTag(); + if (tag != 242) { + break; + } + } + case 242: { + // story + input.readMessage(story); + bitField0_ |= 0x00020000; + tag = input.readTag(); + if (tag != 250) { + break; + } + } + case 250: { + // vampireSurvivorRecord + input.readMessage(vampireSurvivorRecord); + bitField0_ |= 0x00040000; + tag = input.readTag(); + if (tag != 146) { + break; + } + } + case 146: { + // achievements + input.readBytes(achievements); + bitField0_ |= 0x00080000; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00100000; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // rglPassedIds [packed=true] + input.readPackedUInt32(rglPassedIds, tag); + bitField0_ |= 0x00200000; + tag = input.readTag(); + if (tag != 130) { + break; + } + } + case 130: { + // board [packed=true] + input.readPackedUInt32(board, tag); + bitField0_ |= 0x00400000; + tag = input.readTag(); + if (tag != 138) { + break; + } + } + case 138: { + // datingCharIds [packed=true] + input.readPackedUInt32(datingCharIds, tag); + bitField0_ |= 0x00800000; + tag = input.readTag(); + if (tag != 258) { + break; + } + } + case 258: { + // dailyActiveIds [packed=true] + input.readPackedUInt32(dailyActiveIds, tag); + bitField0_ |= 0x01000000; + tag = input.readTag(); + if (tag != 986) { + break; + } + } + case 986: { + // honorList [packed=true] + input.readPackedUInt32(honorList, tag); + bitField0_ |= 0x02000000; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // res + tag = input.readRepeatedMessage(res, tag); + bitField0_ |= 0x04000000; + if (tag != 26) { + break; + } + } + case 26: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x08000000; + if (tag != 34) { + break; + } + } + case 34: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x10000000; + if (tag != 90) { + break; + } + } + case 90: { + // equipments + tag = input.readRepeatedMessage(equipments, tag); + bitField0_ |= 0x20000000; + if (tag != 98) { + break; + } + } + case 98: { + // regionBossLevels + tag = input.readRepeatedMessage(regionBossLevels, tag); + bitField0_ |= 0x40000000; + if (tag != 154) { + break; + } + } + case 154: { + // handbook + tag = input.readRepeatedMessage(handbook, tag); + bitField0_ |= 0x80000000; + if (tag != 170) { + break; + } + } + case 170: { + // titles + tag = input.readRepeatedMessage(titles, tag); + bitField1_ |= 0x00000001; + if (tag != 178) { + break; + } + } + case 178: { + // dailyInstances + tag = input.readRepeatedMessage(dailyInstances, tag); + bitField1_ |= 0x00000002; + if (tag != 186) { + break; + } + } + case 186: { + // dictionaries + tag = input.readRepeatedMessage(dictionaries, tag); + bitField1_ |= 0x00000004; + if (tag != 194) { + break; + } + } + case 194: { + // activities + tag = input.readRepeatedMessage(activities, tag); + bitField1_ |= 0x00000008; + if (tag != 226) { + break; + } + } + case 226: { + // discs + tag = input.readRepeatedMessage(discs, tag); + bitField1_ |= 0x00000010; + if (tag != 234) { + break; + } + } + case 234: { + // equipmentInstances + tag = input.readRepeatedMessage(equipmentInstances, tag); + bitField1_ |= 0x00000020; + if (tag != 274) { + break; + } + } + case 274: { + // skillInstances + tag = input.readRepeatedMessage(skillInstances, tag); + bitField1_ |= 0x00000040; + if (tag != 282) { + break; + } + } + case 282: { + // weekBossLevels + tag = input.readRepeatedMessage(weekBossLevels, tag); + bitField1_ |= 0x00000080; + if (tag != 290) { + break; + } + } + case 290: { + // charGemInstances + tag = input.readRepeatedMessage(charGemInstances, tag); + bitField1_ |= 0x00000100; + if (tag != 298) { + break; + } + } + case 298: { + // tutorialLevels + tag = input.readRepeatedMessage(tutorialLevels, tag); + bitField1_ |= 0x00000200; + if (tag != 994) { + break; + } + } + case 994: { + // honors + tag = input.readRepeatedMessage(honors, tag); + bitField1_ |= 0x00000400; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 80: { + // rglPassedIds [packed=false] + tag = input.readRepeatedUInt32(rglPassedIds, tag); + bitField0_ |= 0x00200000; + break; + } + case 128: { + // board [packed=false] + tag = input.readRepeatedUInt32(board, tag); + bitField0_ |= 0x00400000; + break; + } + case 136: { + // datingCharIds [packed=false] + tag = input.readRepeatedUInt32(datingCharIds, tag); + bitField0_ |= 0x00800000; + break; + } + case 256: { + // dailyActiveIds [packed=false] + tag = input.readRepeatedUInt32(dailyActiveIds, tag); + bitField0_ |= 0x01000000; + break; + } + case 984: { + // honorList [packed=false] + tag = input.readRepeatedUInt32(honorList, tag); + bitField0_ |= 0x02000000; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.talentResetTime, talentResetTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.musicInfo, musicInfo); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeInt64(FieldNames.serverTs, serverTs); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.sendGiftCnt, sendGiftCnt); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.signinIndex, signinIndex); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.equipmentDoubleCount, equipmentDoubleCount); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.tourGuideQuestGroup, tourGuideQuestGroup); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeUInt32(FieldNames.towerTicket, towerTicket); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBool(FieldNames.dailyShopRewardStatus, dailyShopRewardStatus); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeMessage(FieldNames.acc, acc); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeMessage(FieldNames.formation, formation); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeMessage(FieldNames.energy, energy); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeMessage(FieldNames.worldClass, worldClass); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeMessage(FieldNames.agent, agent); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeMessage(FieldNames.quests, quests); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeMessage(FieldNames.state, state); + } + if ((bitField0_ & 0x00010000) != 0) { + output.writeMessage(FieldNames.phone, phone); + } + if ((bitField0_ & 0x00020000) != 0) { + output.writeMessage(FieldNames.story, story); + } + if ((bitField0_ & 0x00040000) != 0) { + output.writeMessage(FieldNames.vampireSurvivorRecord, vampireSurvivorRecord); + } + if ((bitField0_ & 0x00080000) != 0) { + output.writeBytes(FieldNames.achievements, achievements); + } + if ((bitField0_ & 0x00100000) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00200000) != 0) { + output.writeRepeatedUInt32(FieldNames.rglPassedIds, rglPassedIds); + } + if ((bitField0_ & 0x00400000) != 0) { + output.writeRepeatedUInt32(FieldNames.board, board); + } + if ((bitField0_ & 0x00800000) != 0) { + output.writeRepeatedUInt32(FieldNames.datingCharIds, datingCharIds); + } + if ((bitField0_ & 0x01000000) != 0) { + output.writeRepeatedUInt32(FieldNames.dailyActiveIds, dailyActiveIds); + } + if ((bitField0_ & 0x02000000) != 0) { + output.writeRepeatedUInt32(FieldNames.honorList, honorList); + } + if ((bitField0_ & 0x04000000) != 0) { + output.writeRepeatedMessage(FieldNames.res, res); + } + if ((bitField0_ & 0x08000000) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + if ((bitField0_ & 0x10000000) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + if ((bitField0_ & 0x20000000) != 0) { + output.writeRepeatedMessage(FieldNames.equipments, equipments); + } + if ((bitField0_ & 0x40000000) != 0) { + output.writeRepeatedMessage(FieldNames.regionBossLevels, regionBossLevels); + } + if ((bitField0_ & 0x80000000) != 0) { + output.writeRepeatedMessage(FieldNames.handbook, handbook); + } + if ((bitField1_ & 0x00000001) != 0) { + output.writeRepeatedMessage(FieldNames.titles, titles); + } + if ((bitField1_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.dailyInstances, dailyInstances); + } + if ((bitField1_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.dictionaries, dictionaries); + } + if ((bitField1_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.activities, activities); + } + if ((bitField1_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.discs, discs); + } + if ((bitField1_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.equipmentInstances, equipmentInstances); + } + if ((bitField1_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.skillInstances, skillInstances); + } + if ((bitField1_ & 0x00000080) != 0) { + output.writeRepeatedMessage(FieldNames.weekBossLevels, weekBossLevels); + } + if ((bitField1_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.charGemInstances, charGemInstances); + } + if ((bitField1_ & 0x00000200) != 0) { + output.writeRepeatedMessage(FieldNames.tutorialLevels, tutorialLevels); + } + if ((bitField1_ & 0x00000400) != 0) { + output.writeRepeatedMessage(FieldNames.honors, honors); + } + output.endObject(); + } + + @Override + public PlayerInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1426330896: { + if (input.isAtField(FieldNames.talentResetTime)) { + if (!input.trySkipNullValue()) { + talentResetTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1901179821: { + if (input.isAtField(FieldNames.musicInfo)) { + if (!input.trySkipNullValue()) { + musicInfo = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1443748162: { + if (input.isAtField(FieldNames.serverTs)) { + if (!input.trySkipNullValue()) { + serverTs = input.readInt64(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1431779665: { + if (input.isAtField(FieldNames.sendGiftCnt)) { + if (!input.trySkipNullValue()) { + sendGiftCnt = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 887809584: { + if (input.isAtField(FieldNames.signinIndex)) { + if (!input.trySkipNullValue()) { + signinIndex = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 740700528: { + if (input.isAtField(FieldNames.equipmentDoubleCount)) { + if (!input.trySkipNullValue()) { + equipmentDoubleCount = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1496043841: { + if (input.isAtField(FieldNames.tourGuideQuestGroup)) { + if (!input.trySkipNullValue()) { + tourGuideQuestGroup = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -765674667: { + if (input.isAtField(FieldNames.towerTicket)) { + if (!input.trySkipNullValue()) { + towerTicket = input.readUInt32(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -483313104: { + if (input.isAtField(FieldNames.dailyShopRewardStatus)) { + if (!input.trySkipNullValue()) { + dailyShopRewardStatus = input.readBool(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65633: { + if (input.isAtField(FieldNames.acc)) { + if (!input.trySkipNullValue()) { + input.readMessage(acc); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -479418223: { + if (input.isAtField(FieldNames.formation)) { + if (!input.trySkipNullValue()) { + input.readMessage(formation); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2080120488: { + if (input.isAtField(FieldNames.energy)) { + if (!input.trySkipNullValue()) { + input.readMessage(energy); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1869617882: { + if (input.isAtField(FieldNames.worldClass)) { + if (!input.trySkipNullValue()) { + input.readMessage(worldClass); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 63197925: { + if (input.isAtField(FieldNames.agent)) { + if (!input.trySkipNullValue()) { + input.readMessage(agent); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readMessage(quests); + bitField0_ |= 0x00004000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80204913: { + if (input.isAtField(FieldNames.state)) { + if (!input.trySkipNullValue()) { + input.readMessage(state); + bitField0_ |= 0x00008000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 77090126: { + if (input.isAtField(FieldNames.phone)) { + if (!input.trySkipNullValue()) { + input.readMessage(phone); + bitField0_ |= 0x00010000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80218325: { + if (input.isAtField(FieldNames.story)) { + if (!input.trySkipNullValue()) { + input.readMessage(story); + bitField0_ |= 0x00020000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1928058763: { + if (input.isAtField(FieldNames.vampireSurvivorRecord)) { + if (!input.trySkipNullValue()) { + input.readMessage(vampireSurvivorRecord); + bitField0_ |= 0x00040000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1494045884: { + if (input.isAtField(FieldNames.achievements)) { + if (!input.trySkipNullValue()) { + input.readBytes(achievements); + bitField0_ |= 0x00080000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00100000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1392306895: { + if (input.isAtField(FieldNames.rglPassedIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(rglPassedIds); + bitField0_ |= 0x00200000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64356038: { + if (input.isAtField(FieldNames.board)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(board); + bitField0_ |= 0x00400000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -14425097: { + if (input.isAtField(FieldNames.datingCharIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(datingCharIds); + bitField0_ |= 0x00800000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1363137497: { + if (input.isAtField(FieldNames.dailyActiveIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(dailyActiveIds); + bitField0_ |= 0x01000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1017359368: { + if (input.isAtField(FieldNames.honorList)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(honorList); + bitField0_ |= 0x02000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82048: { + if (input.isAtField(FieldNames.res)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(res); + bitField0_ |= 0x04000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x08000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x10000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1000777925: { + if (input.isAtField(FieldNames.equipments)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(equipments); + bitField0_ |= 0x20000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -231400080: { + if (input.isAtField(FieldNames.regionBossLevels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(regionBossLevels); + bitField0_ |= 0x40000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66424824: { + if (input.isAtField(FieldNames.handbook)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(handbook); + bitField0_ |= 0x80000000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1789586117: { + if (input.isAtField(FieldNames.titles)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(titles); + bitField1_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1187764357: { + if (input.isAtField(FieldNames.dailyInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(dailyInstances); + bitField1_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 282511316: { + if (input.isAtField(FieldNames.dictionaries)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(dictionaries); + bitField1_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -252897267: { + if (input.isAtField(FieldNames.activities)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(activities); + bitField1_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66041182: { + if (input.isAtField(FieldNames.discs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(discs); + bitField1_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 362304688: { + if (input.isAtField(FieldNames.equipmentInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(equipmentInstances); + bitField1_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1814965069: { + if (input.isAtField(FieldNames.skillInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(skillInstances); + bitField1_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1516494448: { + if (input.isAtField(FieldNames.weekBossLevels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(weekBossLevels); + bitField1_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1297796475: { + if (input.isAtField(FieldNames.charGemInstances)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charGemInstances); + bitField1_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -134202739: { + if (input.isAtField(FieldNames.tutorialLevels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(tutorialLevels); + bitField1_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2127770263: { + if (input.isAtField(FieldNames.honors)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(honors); + bitField1_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerInfo clone() { + return new PlayerInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_ | bitField1_) == 0); + } + + public static PlayerInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerInfo(), data).checkInitialized(); + } + + public static PlayerInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerInfo(), input).checkInitialized(); + } + + public static PlayerInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerInfo messages + */ + public static MessageFactory getFactory() { + return PlayerInfoFactory.INSTANCE; + } + + private enum PlayerInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerInfo create() { + return PlayerInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName talentResetTime = FieldName.forField("TalentResetTime"); + + static final FieldName musicInfo = FieldName.forField("MusicInfo"); + + static final FieldName serverTs = FieldName.forField("ServerTs"); + + static final FieldName sendGiftCnt = FieldName.forField("SendGiftCnt"); + + static final FieldName signinIndex = FieldName.forField("SigninIndex"); + + static final FieldName equipmentDoubleCount = FieldName.forField("EquipmentDoubleCount"); + + static final FieldName tourGuideQuestGroup = FieldName.forField("TourGuideQuestGroup"); + + static final FieldName towerTicket = FieldName.forField("TowerTicket"); + + static final FieldName dailyShopRewardStatus = FieldName.forField("DailyShopRewardStatus"); + + static final FieldName acc = FieldName.forField("Acc"); + + static final FieldName formation = FieldName.forField("Formation"); + + static final FieldName energy = FieldName.forField("Energy"); + + static final FieldName worldClass = FieldName.forField("WorldClass"); + + static final FieldName agent = FieldName.forField("Agent"); + + static final FieldName quests = FieldName.forField("Quests"); + + static final FieldName state = FieldName.forField("State"); + + static final FieldName phone = FieldName.forField("Phone"); + + static final FieldName story = FieldName.forField("Story"); + + static final FieldName vampireSurvivorRecord = FieldName.forField("VampireSurvivorRecord"); + + static final FieldName achievements = FieldName.forField("Achievements"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rglPassedIds = FieldName.forField("RglPassedIds"); + + static final FieldName board = FieldName.forField("Board"); + + static final FieldName datingCharIds = FieldName.forField("DatingCharIds"); + + static final FieldName dailyActiveIds = FieldName.forField("DailyActiveIds"); + + static final FieldName honorList = FieldName.forField("HonorList"); + + static final FieldName res = FieldName.forField("Res"); + + static final FieldName items = FieldName.forField("Items"); + + static final FieldName chars = FieldName.forField("Chars"); + + static final FieldName equipments = FieldName.forField("Equipments"); + + static final FieldName regionBossLevels = FieldName.forField("RegionBossLevels"); + + static final FieldName handbook = FieldName.forField("Handbook"); + + static final FieldName titles = FieldName.forField("Titles"); + + static final FieldName dailyInstances = FieldName.forField("DailyInstances"); + + static final FieldName dictionaries = FieldName.forField("Dictionaries"); + + static final FieldName activities = FieldName.forField("Activities"); + + static final FieldName discs = FieldName.forField("Discs"); + + static final FieldName equipmentInstances = FieldName.forField("EquipmentInstances"); + + static final FieldName skillInstances = FieldName.forField("SkillInstances"); + + static final FieldName weekBossLevels = FieldName.forField("WeekBossLevels"); + + static final FieldName charGemInstances = FieldName.forField("CharGemInstances"); + + static final FieldName tutorialLevels = FieldName.forField("TutorialLevels"); + + static final FieldName honors = FieldName.forField("Honors"); + } + } + + /** + * Protobuf type {@code PhoneInfo} + */ + public static final class PhoneInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 NewMessage = 1; + */ + private int newMessage; + + /** + * optional uint32 ProgressMessage = 2; + */ + private int progressMessage; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PhoneInfo() { + } + + /** + * @return a new empty instance of {@code PhoneInfo} + */ + public static PhoneInfo newInstance() { + return new PhoneInfo(); + } + + /** + * optional uint32 NewMessage = 1; + * @return whether the newMessage field is set + */ + public boolean hasNewMessage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 NewMessage = 1; + * @return this + */ + public PhoneInfo clearNewMessage() { + bitField0_ &= ~0x00000001; + newMessage = 0; + return this; + } + + /** + * optional uint32 NewMessage = 1; + * @return the newMessage + */ + public int getNewMessage() { + return newMessage; + } + + /** + * optional uint32 NewMessage = 1; + * @param value the newMessage to set + * @return this + */ + public PhoneInfo setNewMessage(final int value) { + bitField0_ |= 0x00000001; + newMessage = value; + return this; + } + + /** + * optional uint32 ProgressMessage = 2; + * @return whether the progressMessage field is set + */ + public boolean hasProgressMessage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 ProgressMessage = 2; + * @return this + */ + public PhoneInfo clearProgressMessage() { + bitField0_ &= ~0x00000002; + progressMessage = 0; + return this; + } + + /** + * optional uint32 ProgressMessage = 2; + * @return the progressMessage + */ + public int getProgressMessage() { + return progressMessage; + } + + /** + * optional uint32 ProgressMessage = 2; + * @param value the progressMessage to set + * @return this + */ + public PhoneInfo setProgressMessage(final int value) { + bitField0_ |= 0x00000002; + progressMessage = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PhoneInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PhoneInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PhoneInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PhoneInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PhoneInfo copyFrom(final PhoneInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + newMessage = other.newMessage; + progressMessage = other.progressMessage; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PhoneInfo mergeFrom(final PhoneInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNewMessage()) { + setNewMessage(other.newMessage); + } + if (other.hasProgressMessage()) { + setProgressMessage(other.progressMessage); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PhoneInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + newMessage = 0; + progressMessage = 0; + nextPackage.clear(); + return this; + } + + @Override + public PhoneInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PhoneInfo)) { + return false; + } + PhoneInfo other = (PhoneInfo) o; + return bitField0_ == other.bitField0_ + && (!hasNewMessage() || newMessage == other.newMessage) + && (!hasProgressMessage() || progressMessage == other.progressMessage) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(newMessage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(progressMessage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(newMessage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(progressMessage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PhoneInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // newMessage + newMessage = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // progressMessage + progressMessage = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.newMessage, newMessage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.progressMessage, progressMessage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PhoneInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -751847833: { + if (input.isAtField(FieldNames.newMessage)) { + if (!input.trySkipNullValue()) { + newMessage = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1132973830: { + if (input.isAtField(FieldNames.progressMessage)) { + if (!input.trySkipNullValue()) { + progressMessage = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PhoneInfo clone() { + return new PhoneInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PhoneInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PhoneInfo(), data).checkInitialized(); + } + + public static PhoneInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PhoneInfo(), input).checkInitialized(); + } + + public static PhoneInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PhoneInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating PhoneInfo messages + */ + public static MessageFactory getFactory() { + return PhoneInfoFactory.INSTANCE; + } + + private enum PhoneInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public PhoneInfo create() { + return PhoneInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName newMessage = FieldName.forField("NewMessage"); + + static final FieldName progressMessage = FieldName.forField("ProgressMessage"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DictionaryEntry} + */ + public static final class DictionaryEntry extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Index = 1; + */ + private int index; + + /** + * optional uint32 Status = 2; + */ + private int status; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DictionaryEntry() { + } + + /** + * @return a new empty instance of {@code DictionaryEntry} + */ + public static DictionaryEntry newInstance() { + return new DictionaryEntry(); + } + + /** + * optional uint32 Index = 1; + * @return whether the index field is set + */ + public boolean hasIndex() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Index = 1; + * @return this + */ + public DictionaryEntry clearIndex() { + bitField0_ &= ~0x00000001; + index = 0; + return this; + } + + /** + * optional uint32 Index = 1; + * @return the index + */ + public int getIndex() { + return index; + } + + /** + * optional uint32 Index = 1; + * @param value the index to set + * @return this + */ + public DictionaryEntry setIndex(final int value) { + bitField0_ |= 0x00000001; + index = value; + return this; + } + + /** + * optional uint32 Status = 2; + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Status = 2; + * @return this + */ + public DictionaryEntry clearStatus() { + bitField0_ &= ~0x00000002; + status = 0; + return this; + } + + /** + * optional uint32 Status = 2; + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * optional uint32 Status = 2; + * @param value the status to set + * @return this + */ + public DictionaryEntry setStatus(final int value) { + bitField0_ |= 0x00000002; + status = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DictionaryEntry clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DictionaryEntry addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DictionaryEntry addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DictionaryEntry setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DictionaryEntry copyFrom(final DictionaryEntry other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + index = other.index; + status = other.status; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DictionaryEntry mergeFrom(final DictionaryEntry other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasIndex()) { + setIndex(other.index); + } + if (other.hasStatus()) { + setStatus(other.status); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DictionaryEntry clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + index = 0; + status = 0; + nextPackage.clear(); + return this; + } + + @Override + public DictionaryEntry clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DictionaryEntry)) { + return false; + } + DictionaryEntry other = (DictionaryEntry) o; + return bitField0_ == other.bitField0_ + && (!hasIndex() || index == other.index) + && (!hasStatus() || status == other.status) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DictionaryEntry mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // index + index = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // status + status = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.index, index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.status, status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DictionaryEntry mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70793394: { + if (input.isAtField(FieldNames.index)) { + if (!input.trySkipNullValue()) { + index = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1808614382: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + status = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DictionaryEntry clone() { + return new DictionaryEntry().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DictionaryEntry parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DictionaryEntry(), data).checkInitialized(); + } + + public static DictionaryEntry parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DictionaryEntry(), input).checkInitialized(); + } + + public static DictionaryEntry parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DictionaryEntry(), input).checkInitialized(); + } + + /** + * @return factory for creating DictionaryEntry messages + */ + public static MessageFactory getFactory() { + return DictionaryEntryFactory.INSTANCE; + } + + private enum DictionaryEntryFactory implements MessageFactory { + INSTANCE; + + @Override + public DictionaryEntry create() { + return DictionaryEntry.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName index = FieldName.forField("Index"); + + static final FieldName status = FieldName.forField("Status"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DictionaryTab} + */ + public static final class DictionaryTab extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 TabId = 1; + */ + private int tabId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .DictionaryEntry Entries = 2; + */ + private final RepeatedMessage entries = RepeatedMessage.newEmptyInstance(DictionaryEntry.getFactory()); + + private DictionaryTab() { + } + + /** + * @return a new empty instance of {@code DictionaryTab} + */ + public static DictionaryTab newInstance() { + return new DictionaryTab(); + } + + /** + * optional uint32 TabId = 1; + * @return whether the tabId field is set + */ + public boolean hasTabId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 TabId = 1; + * @return this + */ + public DictionaryTab clearTabId() { + bitField0_ &= ~0x00000001; + tabId = 0; + return this; + } + + /** + * optional uint32 TabId = 1; + * @return the tabId + */ + public int getTabId() { + return tabId; + } + + /** + * optional uint32 TabId = 1; + * @param value the tabId to set + * @return this + */ + public DictionaryTab setTabId(final int value) { + bitField0_ |= 0x00000001; + tabId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public DictionaryTab clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public DictionaryTab addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public DictionaryTab addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public DictionaryTab setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .DictionaryEntry Entries = 2; + * @return whether the entries field is set + */ + public boolean hasEntries() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated .DictionaryEntry Entries = 2; + * @return this + */ + public DictionaryTab clearEntries() { + bitField0_ &= ~0x00000004; + entries.clear(); + return this; + } + + /** + * repeated .DictionaryEntry Entries = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEntries()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getEntries() { + return entries; + } + + /** + * repeated .DictionaryEntry Entries = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableEntries() { + bitField0_ |= 0x00000004; + return entries; + } + + /** + * repeated .DictionaryEntry Entries = 2; + * @param value the entries to add + * @return this + */ + public DictionaryTab addEntries(final DictionaryEntry value) { + bitField0_ |= 0x00000004; + entries.add(value); + return this; + } + + /** + * repeated .DictionaryEntry Entries = 2; + * @param values the entries to add + * @return this + */ + public DictionaryTab addAllEntries(final DictionaryEntry... values) { + bitField0_ |= 0x00000004; + entries.addAll(values); + return this; + } + + @Override + public DictionaryTab copyFrom(final DictionaryTab other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + tabId = other.tabId; + nextPackage.copyFrom(other.nextPackage); + entries.copyFrom(other.entries); + } + return this; + } + + @Override + public DictionaryTab mergeFrom(final DictionaryTab other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTabId()) { + setTabId(other.tabId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEntries()) { + getMutableEntries().addAll(other.entries); + } + return this; + } + + @Override + public DictionaryTab clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + tabId = 0; + nextPackage.clear(); + entries.clear(); + return this; + } + + @Override + public DictionaryTab clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + entries.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DictionaryTab)) { + return false; + } + DictionaryTab other = (DictionaryTab) o; + return bitField0_ == other.bitField0_ + && (!hasTabId() || tabId == other.tabId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEntries() || entries.equals(other.entries)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < entries.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(entries.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * entries.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(entries); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DictionaryTab mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // tabId + tabId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // entries + tag = input.readRepeatedMessage(entries, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.tabId, tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.entries, entries); + } + output.endObject(); + } + + @Override + public DictionaryTab mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 80562032: { + if (input.isAtField(FieldNames.tabId)) { + if (!input.trySkipNullValue()) { + tabId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73079920: { + if (input.isAtField(FieldNames.entries)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(entries); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DictionaryTab clone() { + return new DictionaryTab().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DictionaryTab parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DictionaryTab(), data).checkInitialized(); + } + + public static DictionaryTab parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DictionaryTab(), input).checkInitialized(); + } + + public static DictionaryTab parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DictionaryTab(), input).checkInitialized(); + } + + /** + * @return factory for creating DictionaryTab messages + */ + public static MessageFactory getFactory() { + return DictionaryTabFactory.INSTANCE; + } + + private enum DictionaryTabFactory implements MessageFactory { + INSTANCE; + + @Override + public DictionaryTab create() { + return DictionaryTab.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName tabId = FieldName.forField("TabId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName entries = FieldName.forField("Entries"); + } + } + + /** + * Protobuf type {@code EnergyInfo} + */ + public static final class EnergyInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Count = 2; + */ + private int count; + + /** + * optional .Energy Energy = 1; + */ + private final Public.Energy energy = Public.Energy.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private EnergyInfo() { + } + + /** + * @return a new empty instance of {@code EnergyInfo} + */ + public static EnergyInfo newInstance() { + return new EnergyInfo(); + } + + /** + * optional uint32 Count = 2; + * @return whether the count field is set + */ + public boolean hasCount() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Count = 2; + * @return this + */ + public EnergyInfo clearCount() { + bitField0_ &= ~0x00000001; + count = 0; + return this; + } + + /** + * optional uint32 Count = 2; + * @return the count + */ + public int getCount() { + return count; + } + + /** + * optional uint32 Count = 2; + * @param value the count to set + * @return this + */ + public EnergyInfo setCount(final int value) { + bitField0_ |= 0x00000001; + count = value; + return this; + } + + /** + * optional .Energy Energy = 1; + * @return whether the energy field is set + */ + public boolean hasEnergy() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .Energy Energy = 1; + * @return this + */ + public EnergyInfo clearEnergy() { + bitField0_ &= ~0x00000002; + energy.clear(); + return this; + } + + /** + * optional .Energy Energy = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEnergy()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Energy getEnergy() { + return energy; + } + + /** + * optional .Energy Energy = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Energy getMutableEnergy() { + bitField0_ |= 0x00000002; + return energy; + } + + /** + * optional .Energy Energy = 1; + * @param value the energy to set + * @return this + */ + public EnergyInfo setEnergy(final Public.Energy value) { + bitField0_ |= 0x00000002; + energy.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public EnergyInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public EnergyInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public EnergyInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public EnergyInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public EnergyInfo copyFrom(final EnergyInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + count = other.count; + energy.copyFrom(other.energy); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EnergyInfo mergeFrom(final EnergyInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCount()) { + setCount(other.count); + } + if (other.hasEnergy()) { + getMutableEnergy().mergeFrom(other.energy); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EnergyInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + count = 0; + energy.clear(); + nextPackage.clear(); + return this; + } + + @Override + public EnergyInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + energy.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof EnergyInfo)) { + return false; + } + EnergyInfo other = (EnergyInfo) o; + return bitField0_ == other.bitField0_ + && (!hasCount() || count == other.count) + && (!hasEnergy() || energy.equals(other.energy)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(count); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(energy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(count); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(energy); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public EnergyInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // count + count = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // energy + input.readMessage(energy); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.count, count); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.energy, energy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public EnergyInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 65298671: { + if (input.isAtField(FieldNames.count)) { + if (!input.trySkipNullValue()) { + count = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2080120488: { + if (input.isAtField(FieldNames.energy)) { + if (!input.trySkipNullValue()) { + input.readMessage(energy); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public EnergyInfo clone() { + return new EnergyInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static EnergyInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new EnergyInfo(), data).checkInitialized(); + } + + public static EnergyInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new EnergyInfo(), input).checkInitialized(); + } + + public static EnergyInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new EnergyInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating EnergyInfo messages + */ + public static MessageFactory getFactory() { + return EnergyInfoFactory.INSTANCE; + } + + private enum EnergyInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public EnergyInfo create() { + return EnergyInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName count = FieldName.forField("Count"); + + static final FieldName energy = FieldName.forField("Energy"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code WorldClassInfo} + */ + public static final class WorldClassInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 LastExp = 2; + */ + private int lastExp; + + /** + * optional uint32 Cur = 1; + */ + private int cur; + + /** + * optional uint32 Stage = 3; + */ + private int stage; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private WorldClassInfo() { + } + + /** + * @return a new empty instance of {@code WorldClassInfo} + */ + public static WorldClassInfo newInstance() { + return new WorldClassInfo(); + } + + /** + * optional int32 LastExp = 2; + * @return whether the lastExp field is set + */ + public boolean hasLastExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 LastExp = 2; + * @return this + */ + public WorldClassInfo clearLastExp() { + bitField0_ &= ~0x00000001; + lastExp = 0; + return this; + } + + /** + * optional int32 LastExp = 2; + * @return the lastExp + */ + public int getLastExp() { + return lastExp; + } + + /** + * optional int32 LastExp = 2; + * @param value the lastExp to set + * @return this + */ + public WorldClassInfo setLastExp(final int value) { + bitField0_ |= 0x00000001; + lastExp = value; + return this; + } + + /** + * optional uint32 Cur = 1; + * @return whether the cur field is set + */ + public boolean hasCur() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Cur = 1; + * @return this + */ + public WorldClassInfo clearCur() { + bitField0_ &= ~0x00000002; + cur = 0; + return this; + } + + /** + * optional uint32 Cur = 1; + * @return the cur + */ + public int getCur() { + return cur; + } + + /** + * optional uint32 Cur = 1; + * @param value the cur to set + * @return this + */ + public WorldClassInfo setCur(final int value) { + bitField0_ |= 0x00000002; + cur = value; + return this; + } + + /** + * optional uint32 Stage = 3; + * @return whether the stage field is set + */ + public boolean hasStage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Stage = 3; + * @return this + */ + public WorldClassInfo clearStage() { + bitField0_ &= ~0x00000004; + stage = 0; + return this; + } + + /** + * optional uint32 Stage = 3; + * @return the stage + */ + public int getStage() { + return stage; + } + + /** + * optional uint32 Stage = 3; + * @param value the stage to set + * @return this + */ + public WorldClassInfo setStage(final int value) { + bitField0_ |= 0x00000004; + stage = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public WorldClassInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public WorldClassInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public WorldClassInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public WorldClassInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public WorldClassInfo copyFrom(final WorldClassInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lastExp = other.lastExp; + cur = other.cur; + stage = other.stage; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClassInfo mergeFrom(final WorldClassInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLastExp()) { + setLastExp(other.lastExp); + } + if (other.hasCur()) { + setCur(other.cur); + } + if (other.hasStage()) { + setStage(other.stage); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClassInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lastExp = 0; + cur = 0; + stage = 0; + nextPackage.clear(); + return this; + } + + @Override + public WorldClassInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WorldClassInfo)) { + return false; + } + WorldClassInfo other = (WorldClassInfo) o; + return bitField0_ == other.bitField0_ + && (!hasLastExp() || lastExp == other.lastExp) + && (!hasCur() || cur == other.cur) + && (!hasStage() || stage == other.stage) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(lastExp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(cur); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(stage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(lastExp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(cur); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(stage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WorldClassInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // lastExp + lastExp = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // cur + cur = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // stage + stage = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.lastExp, lastExp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.cur, cur); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.stage, stage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public WorldClassInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1617561479: { + if (input.isAtField(FieldNames.lastExp)) { + if (!input.trySkipNullValue()) { + lastExp = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 68128: { + if (input.isAtField(FieldNames.cur)) { + if (!input.trySkipNullValue()) { + cur = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80204510: { + if (input.isAtField(FieldNames.stage)) { + if (!input.trySkipNullValue()) { + stage = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WorldClassInfo clone() { + return new WorldClassInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WorldClassInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WorldClassInfo(), data).checkInitialized(); + } + + public static WorldClassInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClassInfo(), input).checkInitialized(); + } + + public static WorldClassInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClassInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating WorldClassInfo messages + */ + public static MessageFactory getFactory() { + return WorldClassInfoFactory.INSTANCE; + } + + private enum WorldClassInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public WorldClassInfo create() { + return WorldClassInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lastExp = FieldName.forField("LastExp"); + + static final FieldName cur = FieldName.forField("Cur"); + + static final FieldName stage = FieldName.forField("Stage"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerDestroyOuterClass.java b/src/generated/main/emu/nebula/proto/PlayerDestroyOuterClass.java new file mode 100644 index 0000000..88f271a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerDestroyOuterClass.java @@ -0,0 +1,412 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class PlayerDestroyOuterClass { + /** + * Protobuf type {@code PlayerDestroy} + */ + public static final class PlayerDestroy extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string NotifyUrl = 1; + */ + private final Utf8String notifyUrl = Utf8String.newEmptyInstance(); + + private PlayerDestroy() { + } + + /** + * @return a new empty instance of {@code PlayerDestroy} + */ + public static PlayerDestroy newInstance() { + return new PlayerDestroy(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerDestroy clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerDestroy addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerDestroy addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerDestroy setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string NotifyUrl = 1; + * @return whether the notifyUrl field is set + */ + public boolean hasNotifyUrl() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string NotifyUrl = 1; + * @return this + */ + public PlayerDestroy clearNotifyUrl() { + bitField0_ &= ~0x00000002; + notifyUrl.clear(); + return this; + } + + /** + * optional string NotifyUrl = 1; + * @return the notifyUrl + */ + public String getNotifyUrl() { + return notifyUrl.getString(); + } + + /** + * optional string NotifyUrl = 1; + * @return internal {@code Utf8String} representation of notifyUrl for reading + */ + public Utf8String getNotifyUrlBytes() { + return this.notifyUrl; + } + + /** + * optional string NotifyUrl = 1; + * @return internal {@code Utf8String} representation of notifyUrl for modifications + */ + public Utf8String getMutableNotifyUrlBytes() { + bitField0_ |= 0x00000002; + return this.notifyUrl; + } + + /** + * optional string NotifyUrl = 1; + * @param value the notifyUrl to set + * @return this + */ + public PlayerDestroy setNotifyUrl(final CharSequence value) { + bitField0_ |= 0x00000002; + notifyUrl.copyFrom(value); + return this; + } + + /** + * optional string NotifyUrl = 1; + * @param value the notifyUrl to set + * @return this + */ + public PlayerDestroy setNotifyUrl(final Utf8String value) { + bitField0_ |= 0x00000002; + notifyUrl.copyFrom(value); + return this; + } + + @Override + public PlayerDestroy copyFrom(final PlayerDestroy other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + notifyUrl.copyFrom(other.notifyUrl); + } + return this; + } + + @Override + public PlayerDestroy mergeFrom(final PlayerDestroy other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNotifyUrl()) { + getMutableNotifyUrlBytes().copyFrom(other.notifyUrl); + } + return this; + } + + @Override + public PlayerDestroy clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + notifyUrl.clear(); + return this; + } + + @Override + public PlayerDestroy clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + notifyUrl.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerDestroy)) { + return false; + } + PlayerDestroy other = (PlayerDestroy) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNotifyUrl() || notifyUrl.equals(other.notifyUrl)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(notifyUrl); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(notifyUrl); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerDestroy mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // notifyUrl + input.readString(notifyUrl); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.notifyUrl, notifyUrl); + } + output.endObject(); + } + + @Override + public PlayerDestroy mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -388913850: { + if (input.isAtField(FieldNames.notifyUrl)) { + if (!input.trySkipNullValue()) { + input.readString(notifyUrl); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerDestroy clone() { + return new PlayerDestroy().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerDestroy parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerDestroy(), data).checkInitialized(); + } + + public static PlayerDestroy parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerDestroy(), input).checkInitialized(); + } + + public static PlayerDestroy parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerDestroy(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerDestroy messages + */ + public static MessageFactory getFactory() { + return PlayerDestroyFactory.INSTANCE; + } + + private enum PlayerDestroyFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerDestroy create() { + return PlayerDestroy.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName notifyUrl = FieldName.forField("NotifyUrl"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerExit.java b/src/generated/main/emu/nebula/proto/PlayerExit.java new file mode 100644 index 0000000..33f3013 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerExit.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class PlayerExit { +} diff --git a/src/generated/main/emu/nebula/proto/PlayerFormation.java b/src/generated/main/emu/nebula/proto/PlayerFormation.java new file mode 100644 index 0000000..1b308ab --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerFormation.java @@ -0,0 +1,404 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class PlayerFormation { + /** + * Protobuf type {@code PlayerFormationReq} + */ + public static final class PlayerFormationReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .FormationInfo Formation = 1; + */ + private final Public.FormationInfo formation = Public.FormationInfo.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerFormationReq() { + } + + /** + * @return a new empty instance of {@code PlayerFormationReq} + */ + public static PlayerFormationReq newInstance() { + return new PlayerFormationReq(); + } + + /** + * optional .FormationInfo Formation = 1; + * @return whether the formation field is set + */ + public boolean hasFormation() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .FormationInfo Formation = 1; + * @return this + */ + public PlayerFormationReq clearFormation() { + bitField0_ &= ~0x00000001; + formation.clear(); + return this; + } + + /** + * optional .FormationInfo Formation = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFormation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.FormationInfo getFormation() { + return formation; + } + + /** + * optional .FormationInfo Formation = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.FormationInfo getMutableFormation() { + bitField0_ |= 0x00000001; + return formation; + } + + /** + * optional .FormationInfo Formation = 1; + * @param value the formation to set + * @return this + */ + public PlayerFormationReq setFormation(final Public.FormationInfo value) { + bitField0_ |= 0x00000001; + formation.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerFormationReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerFormationReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerFormationReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerFormationReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerFormationReq copyFrom(final PlayerFormationReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + formation.copyFrom(other.formation); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerFormationReq mergeFrom(final PlayerFormationReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFormation()) { + getMutableFormation().mergeFrom(other.formation); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerFormationReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + formation.clear(); + nextPackage.clear(); + return this; + } + + @Override + public PlayerFormationReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + formation.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerFormationReq)) { + return false; + } + PlayerFormationReq other = (PlayerFormationReq) o; + return bitField0_ == other.bitField0_ + && (!hasFormation() || formation.equals(other.formation)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(formation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(formation); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerFormationReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // formation + input.readMessage(formation); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.formation, formation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerFormationReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -479418223: { + if (input.isAtField(FieldNames.formation)) { + if (!input.trySkipNullValue()) { + input.readMessage(formation); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerFormationReq clone() { + return new PlayerFormationReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerFormationReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerFormationReq(), data).checkInitialized(); + } + + public static PlayerFormationReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerFormationReq(), input).checkInitialized(); + } + + public static PlayerFormationReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerFormationReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerFormationReq messages + */ + public static MessageFactory getFactory() { + return PlayerFormationReqFactory.INSTANCE; + } + + private enum PlayerFormationReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerFormationReq create() { + return PlayerFormationReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName formation = FieldName.forField("Formation"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerGenderEdit.java b/src/generated/main/emu/nebula/proto/PlayerGenderEdit.java new file mode 100644 index 0000000..ace5915 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerGenderEdit.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class PlayerGenderEdit { +} diff --git a/src/generated/main/emu/nebula/proto/PlayerHeadInfo.java b/src/generated/main/emu/nebula/proto/PlayerHeadInfo.java new file mode 100644 index 0000000..8ae7cbb --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerHeadInfo.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class PlayerHeadInfo { + /** + * Protobuf type {@code PlayerHeadIconInfoResp} + */ + public static final class PlayerHeadIconInfoResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 List = 1; + */ + private final RepeatedInt list = RepeatedInt.newEmptyInstance(); + + private PlayerHeadIconInfoResp() { + } + + /** + * @return a new empty instance of {@code PlayerHeadIconInfoResp} + */ + public static PlayerHeadIconInfoResp newInstance() { + return new PlayerHeadIconInfoResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerHeadIconInfoResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerHeadIconInfoResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerHeadIconInfoResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerHeadIconInfoResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 List = 1; + * @return this + */ + public PlayerHeadIconInfoResp clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getList() { + return list; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated uint32 List = 1; + * @param value the list to add + * @return this + */ + public PlayerHeadIconInfoResp addList(final int value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated uint32 List = 1; + * @param values the list to add + * @return this + */ + public PlayerHeadIconInfoResp addAllList(final int... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public PlayerHeadIconInfoResp copyFrom(final PlayerHeadIconInfoResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public PlayerHeadIconInfoResp mergeFrom(final PlayerHeadIconInfoResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public PlayerHeadIconInfoResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public PlayerHeadIconInfoResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerHeadIconInfoResp)) { + return false; + } + PlayerHeadIconInfoResp other = (PlayerHeadIconInfoResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(list.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerHeadIconInfoResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list [packed=true] + input.readPackedUInt32(list, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // list [packed=false] + tag = input.readRepeatedUInt32(list, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public PlayerHeadIconInfoResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerHeadIconInfoResp clone() { + return new PlayerHeadIconInfoResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerHeadIconInfoResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerHeadIconInfoResp(), data).checkInitialized(); + } + + public static PlayerHeadIconInfoResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHeadIconInfoResp(), input).checkInitialized(); + } + + public static PlayerHeadIconInfoResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHeadIconInfoResp(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerHeadIconInfoResp messages + */ + public static MessageFactory getFactory() { + return PlayerHeadIconInfoRespFactory.INSTANCE; + } + + private enum PlayerHeadIconInfoRespFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerHeadIconInfoResp create() { + return PlayerHeadIconInfoResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerHeadiconSet.java b/src/generated/main/emu/nebula/proto/PlayerHeadiconSet.java new file mode 100644 index 0000000..46752d8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerHeadiconSet.java @@ -0,0 +1,383 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class PlayerHeadiconSet { + /** + * Protobuf type {@code PlayerHeadIconSetReq} + */ + public static final class PlayerHeadIconSetReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 HeadIcon = 1; + */ + private int headIcon; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerHeadIconSetReq() { + } + + /** + * @return a new empty instance of {@code PlayerHeadIconSetReq} + */ + public static PlayerHeadIconSetReq newInstance() { + return new PlayerHeadIconSetReq(); + } + + /** + * optional uint32 HeadIcon = 1; + * @return whether the headIcon field is set + */ + public boolean hasHeadIcon() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 HeadIcon = 1; + * @return this + */ + public PlayerHeadIconSetReq clearHeadIcon() { + bitField0_ &= ~0x00000001; + headIcon = 0; + return this; + } + + /** + * optional uint32 HeadIcon = 1; + * @return the headIcon + */ + public int getHeadIcon() { + return headIcon; + } + + /** + * optional uint32 HeadIcon = 1; + * @param value the headIcon to set + * @return this + */ + public PlayerHeadIconSetReq setHeadIcon(final int value) { + bitField0_ |= 0x00000001; + headIcon = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerHeadIconSetReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerHeadIconSetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerHeadIconSetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerHeadIconSetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerHeadIconSetReq copyFrom(final PlayerHeadIconSetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + headIcon = other.headIcon; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerHeadIconSetReq mergeFrom(final PlayerHeadIconSetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasHeadIcon()) { + setHeadIcon(other.headIcon); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerHeadIconSetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + headIcon = 0; + nextPackage.clear(); + return this; + } + + @Override + public PlayerHeadIconSetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerHeadIconSetReq)) { + return false; + } + PlayerHeadIconSetReq other = (PlayerHeadIconSetReq) o; + return bitField0_ == other.bitField0_ + && (!hasHeadIcon() || headIcon == other.headIcon) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(headIcon); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerHeadIconSetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // headIcon + headIcon = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.headIcon, headIcon); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerHeadIconSetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1051463015: { + if (input.isAtField(FieldNames.headIcon)) { + if (!input.trySkipNullValue()) { + headIcon = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerHeadIconSetReq clone() { + return new PlayerHeadIconSetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerHeadIconSetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerHeadIconSetReq(), data).checkInitialized(); + } + + public static PlayerHeadIconSetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHeadIconSetReq(), input).checkInitialized(); + } + + public static PlayerHeadIconSetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHeadIconSetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerHeadIconSetReq messages + */ + public static MessageFactory getFactory() { + return PlayerHeadIconSetReqFactory.INSTANCE; + } + + private enum PlayerHeadIconSetReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerHeadIconSetReq create() { + return PlayerHeadIconSetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName headIcon = FieldName.forField("HeadIcon"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerHonorEdit.java b/src/generated/main/emu/nebula/proto/PlayerHonorEdit.java new file mode 100644 index 0000000..0ab6827 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerHonorEdit.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class PlayerHonorEdit { + /** + * Protobuf type {@code PlayerHonorEditReq} + */ + public static final class PlayerHonorEditReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 List = 1; + */ + private final RepeatedInt list = RepeatedInt.newEmptyInstance(); + + private PlayerHonorEditReq() { + } + + /** + * @return a new empty instance of {@code PlayerHonorEditReq} + */ + public static PlayerHonorEditReq newInstance() { + return new PlayerHonorEditReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerHonorEditReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerHonorEditReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerHonorEditReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerHonorEditReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 List = 1; + * @return this + */ + public PlayerHonorEditReq clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getList() { + return list; + } + + /** + * repeated uint32 List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated uint32 List = 1; + * @param value the list to add + * @return this + */ + public PlayerHonorEditReq addList(final int value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated uint32 List = 1; + * @param values the list to add + * @return this + */ + public PlayerHonorEditReq addAllList(final int... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public PlayerHonorEditReq copyFrom(final PlayerHonorEditReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public PlayerHonorEditReq mergeFrom(final PlayerHonorEditReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public PlayerHonorEditReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public PlayerHonorEditReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerHonorEditReq)) { + return false; + } + PlayerHonorEditReq other = (PlayerHonorEditReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(list.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerHonorEditReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list [packed=true] + input.readPackedUInt32(list, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // list [packed=false] + tag = input.readRepeatedUInt32(list, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public PlayerHonorEditReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerHonorEditReq clone() { + return new PlayerHonorEditReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerHonorEditReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerHonorEditReq(), data).checkInitialized(); + } + + public static PlayerHonorEditReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHonorEditReq(), input).checkInitialized(); + } + + public static PlayerHonorEditReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerHonorEditReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerHonorEditReq messages + */ + public static MessageFactory getFactory() { + return PlayerHonorEditReqFactory.INSTANCE; + } + + private enum PlayerHonorEditReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerHonorEditReq create() { + return PlayerHonorEditReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerLearn.java b/src/generated/main/emu/nebula/proto/PlayerLearn.java new file mode 100644 index 0000000..bf9b578 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerLearn.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class PlayerLearn { +} diff --git a/src/generated/main/emu/nebula/proto/PlayerLogin.java b/src/generated/main/emu/nebula/proto/PlayerLogin.java new file mode 100644 index 0000000..ef4e5c8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerLogin.java @@ -0,0 +1,3310 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoEnum; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class PlayerLogin { + /** + * Protobuf enum {@code Platform} + */ + public enum Platform implements ProtoEnum { + /** + * Unknown = 0; + */ + Unknown("Unknown", 0), + + /** + * Ios = 1; + */ + Ios("Ios", 1), + + /** + * Android = 2; + */ + Android("Android", 2), + + /** + * PC = 3; + */ + PC("PC", 3), + + /** + * Harmonyos = 4; + */ + Harmonyos("Harmonyos", 4); + + /** + * Unknown = 0; + */ + public static final int Unknown_VALUE = 0; + + /** + * Ios = 1; + */ + public static final int Ios_VALUE = 1; + + /** + * Android = 2; + */ + public static final int Android_VALUE = 2; + + /** + * PC = 3; + */ + public static final int PC_VALUE = 3; + + /** + * Harmonyos = 4; + */ + public static final int Harmonyos_VALUE = 4; + + private final String name; + + private final int number; + + private Platform(String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter converter() { + return PlatformConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static Platform forNumber(int value) { + return PlatformConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static Platform forNumberOr(int number, Platform other) { + Platform value = forNumber(number); + return value == null ? other : value; + } + + enum PlatformConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final Platform[] lookup = new Platform[5]; + + static { + lookup[0] = Unknown; + lookup[1] = Ios; + lookup[2] = Android; + lookup[3] = PC; + lookup[4] = Harmonyos; + } + + @Override + public final Platform forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final Platform forName(final CharSequence value) { + switch (value.length()) { + case 2: { + if (ProtoUtil.isEqual("PC", value)) { + return PC; + } + break; + } + case 3: { + if (ProtoUtil.isEqual("Ios", value)) { + return Ios; + } + break; + } + case 7: { + if (ProtoUtil.isEqual("Unknown", value)) { + return Unknown; + } + if (ProtoUtil.isEqual("Android", value)) { + return Android; + } + break; + } + case 9: { + if (ProtoUtil.isEqual("Harmonyos", value)) { + return Harmonyos; + } + break; + } + } + return null; + } + } + } + + /** + * Protobuf type {@code LoginReq} + */ + public static final class LoginReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .Platform Platform = 11; + */ + private int platform; + + /** + * optional .Regular Account = 1; + */ + private final Regular account = Regular.newInstance(); + + /** + * optional .Official Official = 2; + */ + private final Official official = Official.newInstance(); + + /** + * optional .OfficialOverseas OfficialOverseas = 3; + */ + private final OfficialOverseas officialOverseas = OfficialOverseas.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Token = 4; + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + /** + * optional string Language = 12; + */ + private final Utf8String language = Utf8String.newEmptyInstance(); + + /** + * optional string Channel = 13; + */ + private final Utf8String channel = Utf8String.newEmptyInstance(); + + /** + * optional string Device = 14; + */ + private final Utf8String device = Utf8String.newEmptyInstance(); + + /** + * optional string Version = 15; + */ + private final Utf8String version = Utf8String.newEmptyInstance(); + + private LoginReq() { + } + + /** + * @return a new empty instance of {@code LoginReq} + */ + public static LoginReq newInstance() { + return new LoginReq(); + } + + /** + * optional .Platform Platform = 11; + * @return whether the platform field is set + */ + public boolean hasPlatform() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .Platform Platform = 11; + * @return this + */ + public LoginReq clearPlatform() { + bitField0_ &= ~0x00000001; + platform = 0; + return this; + } + + /** + * optional .Platform Platform = 11; + * @return the platform + */ + public Platform getPlatform() { + return Platform.forNumber(platform); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link LoginReq#getPlatform()}.getNumber(). + * + * @return numeric wire representation + */ + public int getPlatformValue() { + return platform; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link Platform}. Setting an invalid value + * can cause {@link LoginReq#getPlatform()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public LoginReq setPlatformValue(final int value) { + bitField0_ |= 0x00000001; + platform = value; + return this; + } + + /** + * optional .Platform Platform = 11; + * @param value the platform to set + * @return this + */ + public LoginReq setPlatform(final Platform value) { + bitField0_ |= 0x00000001; + platform = value.getNumber(); + return this; + } + + /** + * optional .Regular Account = 1; + * @return whether the account field is set + */ + public boolean hasAccount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .Regular Account = 1; + * @return this + */ + public LoginReq clearAccount() { + bitField0_ &= ~0x00000002; + account.clear(); + return this; + } + + /** + * optional .Regular Account = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAccount()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Regular getAccount() { + return account; + } + + /** + * optional .Regular Account = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Regular getMutableAccount() { + bitField0_ |= 0x00000002; + return account; + } + + /** + * optional .Regular Account = 1; + * @param value the account to set + * @return this + */ + public LoginReq setAccount(final Regular value) { + bitField0_ |= 0x00000002; + account.copyFrom(value); + return this; + } + + /** + * optional .Official Official = 2; + * @return whether the official field is set + */ + public boolean hasOfficial() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .Official Official = 2; + * @return this + */ + public LoginReq clearOfficial() { + bitField0_ &= ~0x00000004; + official.clear(); + return this; + } + + /** + * optional .Official Official = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableOfficial()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Official getOfficial() { + return official; + } + + /** + * optional .Official Official = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Official getMutableOfficial() { + bitField0_ |= 0x00000004; + return official; + } + + /** + * optional .Official Official = 2; + * @param value the official to set + * @return this + */ + public LoginReq setOfficial(final Official value) { + bitField0_ |= 0x00000004; + official.copyFrom(value); + return this; + } + + /** + * optional .OfficialOverseas OfficialOverseas = 3; + * @return whether the officialOverseas field is set + */ + public boolean hasOfficialOverseas() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .OfficialOverseas OfficialOverseas = 3; + * @return this + */ + public LoginReq clearOfficialOverseas() { + bitField0_ &= ~0x00000008; + officialOverseas.clear(); + return this; + } + + /** + * optional .OfficialOverseas OfficialOverseas = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableOfficialOverseas()} if you want to modify it. + * + * @return internal storage object for reading + */ + public OfficialOverseas getOfficialOverseas() { + return officialOverseas; + } + + /** + * optional .OfficialOverseas OfficialOverseas = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public OfficialOverseas getMutableOfficialOverseas() { + bitField0_ |= 0x00000008; + return officialOverseas; + } + + /** + * optional .OfficialOverseas OfficialOverseas = 3; + * @param value the officialOverseas to set + * @return this + */ + public LoginReq setOfficialOverseas(final OfficialOverseas value) { + bitField0_ |= 0x00000008; + officialOverseas.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public LoginReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public LoginReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public LoginReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public LoginReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Token = 4; + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional string Token = 4; + * @return this + */ + public LoginReq clearToken() { + bitField0_ &= ~0x00000020; + token.clear(); + return this; + } + + /** + * optional string Token = 4; + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * optional string Token = 4; + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * optional string Token = 4; + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000020; + return this.token; + } + + /** + * optional string Token = 4; + * @param value the token to set + * @return this + */ + public LoginReq setToken(final CharSequence value) { + bitField0_ |= 0x00000020; + token.copyFrom(value); + return this; + } + + /** + * optional string Token = 4; + * @param value the token to set + * @return this + */ + public LoginReq setToken(final Utf8String value) { + bitField0_ |= 0x00000020; + token.copyFrom(value); + return this; + } + + /** + * optional string Language = 12; + * @return whether the language field is set + */ + public boolean hasLanguage() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional string Language = 12; + * @return this + */ + public LoginReq clearLanguage() { + bitField0_ &= ~0x00000040; + language.clear(); + return this; + } + + /** + * optional string Language = 12; + * @return the language + */ + public String getLanguage() { + return language.getString(); + } + + /** + * optional string Language = 12; + * @return internal {@code Utf8String} representation of language for reading + */ + public Utf8String getLanguageBytes() { + return this.language; + } + + /** + * optional string Language = 12; + * @return internal {@code Utf8String} representation of language for modifications + */ + public Utf8String getMutableLanguageBytes() { + bitField0_ |= 0x00000040; + return this.language; + } + + /** + * optional string Language = 12; + * @param value the language to set + * @return this + */ + public LoginReq setLanguage(final CharSequence value) { + bitField0_ |= 0x00000040; + language.copyFrom(value); + return this; + } + + /** + * optional string Language = 12; + * @param value the language to set + * @return this + */ + public LoginReq setLanguage(final Utf8String value) { + bitField0_ |= 0x00000040; + language.copyFrom(value); + return this; + } + + /** + * optional string Channel = 13; + * @return whether the channel field is set + */ + public boolean hasChannel() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional string Channel = 13; + * @return this + */ + public LoginReq clearChannel() { + bitField0_ &= ~0x00000080; + channel.clear(); + return this; + } + + /** + * optional string Channel = 13; + * @return the channel + */ + public String getChannel() { + return channel.getString(); + } + + /** + * optional string Channel = 13; + * @return internal {@code Utf8String} representation of channel for reading + */ + public Utf8String getChannelBytes() { + return this.channel; + } + + /** + * optional string Channel = 13; + * @return internal {@code Utf8String} representation of channel for modifications + */ + public Utf8String getMutableChannelBytes() { + bitField0_ |= 0x00000080; + return this.channel; + } + + /** + * optional string Channel = 13; + * @param value the channel to set + * @return this + */ + public LoginReq setChannel(final CharSequence value) { + bitField0_ |= 0x00000080; + channel.copyFrom(value); + return this; + } + + /** + * optional string Channel = 13; + * @param value the channel to set + * @return this + */ + public LoginReq setChannel(final Utf8String value) { + bitField0_ |= 0x00000080; + channel.copyFrom(value); + return this; + } + + /** + * optional string Device = 14; + * @return whether the device field is set + */ + public boolean hasDevice() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional string Device = 14; + * @return this + */ + public LoginReq clearDevice() { + bitField0_ &= ~0x00000100; + device.clear(); + return this; + } + + /** + * optional string Device = 14; + * @return the device + */ + public String getDevice() { + return device.getString(); + } + + /** + * optional string Device = 14; + * @return internal {@code Utf8String} representation of device for reading + */ + public Utf8String getDeviceBytes() { + return this.device; + } + + /** + * optional string Device = 14; + * @return internal {@code Utf8String} representation of device for modifications + */ + public Utf8String getMutableDeviceBytes() { + bitField0_ |= 0x00000100; + return this.device; + } + + /** + * optional string Device = 14; + * @param value the device to set + * @return this + */ + public LoginReq setDevice(final CharSequence value) { + bitField0_ |= 0x00000100; + device.copyFrom(value); + return this; + } + + /** + * optional string Device = 14; + * @param value the device to set + * @return this + */ + public LoginReq setDevice(final Utf8String value) { + bitField0_ |= 0x00000100; + device.copyFrom(value); + return this; + } + + /** + * optional string Version = 15; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional string Version = 15; + * @return this + */ + public LoginReq clearVersion() { + bitField0_ &= ~0x00000200; + version.clear(); + return this; + } + + /** + * optional string Version = 15; + * @return the version + */ + public String getVersion() { + return version.getString(); + } + + /** + * optional string Version = 15; + * @return internal {@code Utf8String} representation of version for reading + */ + public Utf8String getVersionBytes() { + return this.version; + } + + /** + * optional string Version = 15; + * @return internal {@code Utf8String} representation of version for modifications + */ + public Utf8String getMutableVersionBytes() { + bitField0_ |= 0x00000200; + return this.version; + } + + /** + * optional string Version = 15; + * @param value the version to set + * @return this + */ + public LoginReq setVersion(final CharSequence value) { + bitField0_ |= 0x00000200; + version.copyFrom(value); + return this; + } + + /** + * optional string Version = 15; + * @param value the version to set + * @return this + */ + public LoginReq setVersion(final Utf8String value) { + bitField0_ |= 0x00000200; + version.copyFrom(value); + return this; + } + + @Override + public LoginReq copyFrom(final LoginReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + platform = other.platform; + account.copyFrom(other.account); + official.copyFrom(other.official); + officialOverseas.copyFrom(other.officialOverseas); + nextPackage.copyFrom(other.nextPackage); + token.copyFrom(other.token); + language.copyFrom(other.language); + channel.copyFrom(other.channel); + device.copyFrom(other.device); + version.copyFrom(other.version); + } + return this; + } + + @Override + public LoginReq mergeFrom(final LoginReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPlatform()) { + setPlatformValue(other.platform); + } + if (other.hasAccount()) { + getMutableAccount().mergeFrom(other.account); + } + if (other.hasOfficial()) { + getMutableOfficial().mergeFrom(other.official); + } + if (other.hasOfficialOverseas()) { + getMutableOfficialOverseas().mergeFrom(other.officialOverseas); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + if (other.hasLanguage()) { + getMutableLanguageBytes().copyFrom(other.language); + } + if (other.hasChannel()) { + getMutableChannelBytes().copyFrom(other.channel); + } + if (other.hasDevice()) { + getMutableDeviceBytes().copyFrom(other.device); + } + if (other.hasVersion()) { + getMutableVersionBytes().copyFrom(other.version); + } + return this; + } + + @Override + public LoginReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + platform = 0; + account.clear(); + official.clear(); + officialOverseas.clear(); + nextPackage.clear(); + token.clear(); + language.clear(); + channel.clear(); + device.clear(); + version.clear(); + return this; + } + + @Override + public LoginReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + account.clearQuick(); + official.clearQuick(); + officialOverseas.clearQuick(); + nextPackage.clear(); + token.clear(); + language.clear(); + channel.clear(); + device.clear(); + version.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof LoginReq)) { + return false; + } + LoginReq other = (LoginReq) o; + return bitField0_ == other.bitField0_ + && (!hasPlatform() || platform == other.platform) + && (!hasAccount() || account.equals(other.account)) + && (!hasOfficial() || official.equals(other.official)) + && (!hasOfficialOverseas() || officialOverseas.equals(other.officialOverseas)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasToken() || token.equals(other.token)) + && (!hasLanguage() || language.equals(other.language)) + && (!hasChannel() || channel.equals(other.channel)) + && (!hasDevice() || device.equals(other.device)) + && (!hasVersion() || version.equals(other.version)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 88); + output.writeEnumNoTag(platform); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(account); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(official); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(officialOverseas); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 34); + output.writeStringNoTag(token); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 98); + output.writeStringNoTag(language); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 106); + output.writeStringNoTag(channel); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 114); + output.writeStringNoTag(device); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 122); + output.writeStringNoTag(version); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(platform); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(account); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(official); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(officialOverseas); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(language); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(channel); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(device); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(version); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public LoginReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 88: { + // platform + final int value = input.readInt32(); + if (Platform.forNumber(value) != null) { + platform = value; + bitField0_ |= 0x00000001; + } + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // account + input.readMessage(account); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // official + input.readMessage(official); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // officialOverseas + input.readMessage(officialOverseas); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // token + input.readString(token); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 98) { + break; + } + } + case 98: { + // language + input.readString(language); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 106) { + break; + } + } + case 106: { + // channel + input.readString(channel); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 114) { + break; + } + } + case 114: { + // device + input.readString(device); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // version + input.readString(version); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeEnum(FieldNames.platform, platform, Platform.converter()); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.account, account); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.official, official); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.officialOverseas, officialOverseas); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeString(FieldNames.token, token); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeString(FieldNames.language, language); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeString(FieldNames.channel, channel); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeString(FieldNames.device, device); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeString(FieldNames.version, version); + } + output.endObject(); + } + + @Override + public LoginReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1939328147: { + if (input.isAtField(FieldNames.platform)) { + if (!input.trySkipNullValue()) { + final Platform value = input.readEnum(Platform.converter()); + if (value != null) { + platform = value.getNumber(); + bitField0_ |= 0x00000001; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case 487334413: { + if (input.isAtField(FieldNames.account)) { + if (!input.trySkipNullValue()) { + input.readMessage(account); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -700645621: { + if (input.isAtField(FieldNames.official)) { + if (!input.trySkipNullValue()) { + input.readMessage(official); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2026854141: { + if (input.isAtField(FieldNames.officialOverseas)) { + if (!input.trySkipNullValue()) { + input.readMessage(officialOverseas); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80988633: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1548945544: { + if (input.isAtField(FieldNames.language)) { + if (!input.trySkipNullValue()) { + input.readString(language); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891363613: { + if (input.isAtField(FieldNames.channel)) { + if (!input.trySkipNullValue()) { + input.readString(channel); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2043677302: { + if (input.isAtField(FieldNames.device)) { + if (!input.trySkipNullValue()) { + input.readString(device); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + input.readString(version); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public LoginReq clone() { + return new LoginReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static LoginReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new LoginReq(), data).checkInitialized(); + } + + public static LoginReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new LoginReq(), input).checkInitialized(); + } + + public static LoginReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new LoginReq(), input).checkInitialized(); + } + + /** + * @return factory for creating LoginReq messages + */ + public static MessageFactory getFactory() { + return LoginReqFactory.INSTANCE; + } + + private enum LoginReqFactory implements MessageFactory { + INSTANCE; + + @Override + public LoginReq create() { + return LoginReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName platform = FieldName.forField("Platform"); + + static final FieldName account = FieldName.forField("Account"); + + static final FieldName official = FieldName.forField("Official"); + + static final FieldName officialOverseas = FieldName.forField("OfficialOverseas"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName token = FieldName.forField("Token"); + + static final FieldName language = FieldName.forField("Language"); + + static final FieldName channel = FieldName.forField("Channel"); + + static final FieldName device = FieldName.forField("Device"); + + static final FieldName version = FieldName.forField("Version"); + } + } + + /** + * Protobuf type {@code Official} + */ + public static final class Official extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Uid = 1; + */ + private long uid; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Token = 2; + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + private Official() { + } + + /** + * @return a new empty instance of {@code Official} + */ + public static Official newInstance() { + return new Official(); + } + + /** + * optional uint64 Uid = 1; + * @return whether the uid field is set + */ + public boolean hasUid() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Uid = 1; + * @return this + */ + public Official clearUid() { + bitField0_ &= ~0x00000001; + uid = 0L; + return this; + } + + /** + * optional uint64 Uid = 1; + * @return the uid + */ + public long getUid() { + return uid; + } + + /** + * optional uint64 Uid = 1; + * @param value the uid to set + * @return this + */ + public Official setUid(final long value) { + bitField0_ |= 0x00000001; + uid = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Official clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Official addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Official addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Official setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Token = 2; + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Token = 2; + * @return this + */ + public Official clearToken() { + bitField0_ &= ~0x00000004; + token.clear(); + return this; + } + + /** + * optional string Token = 2; + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * optional string Token = 2; + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * optional string Token = 2; + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000004; + return this.token; + } + + /** + * optional string Token = 2; + * @param value the token to set + * @return this + */ + public Official setToken(final CharSequence value) { + bitField0_ |= 0x00000004; + token.copyFrom(value); + return this; + } + + /** + * optional string Token = 2; + * @param value the token to set + * @return this + */ + public Official setToken(final Utf8String value) { + bitField0_ |= 0x00000004; + token.copyFrom(value); + return this; + } + + @Override + public Official copyFrom(final Official other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + uid = other.uid; + nextPackage.copyFrom(other.nextPackage); + token.copyFrom(other.token); + } + return this; + } + + @Override + public Official mergeFrom(final Official other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasUid()) { + setUid(other.uid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + return this; + } + + @Override + public Official clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + uid = 0L; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public Official clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Official)) { + return false; + } + Official other = (Official) o; + return bitField0_ == other.bitField0_ + && (!hasUid() || uid == other.uid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasToken() || token.equals(other.token)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(uid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(token); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(uid); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Official mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // uid + uid = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // token + input.readString(token); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.uid, uid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.token, token); + } + output.endObject(); + } + + @Override + public Official mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 85040: { + if (input.isAtField(FieldNames.uid)) { + if (!input.trySkipNullValue()) { + uid = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80988633: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Official clone() { + return new Official().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Official parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Official(), data).checkInitialized(); + } + + public static Official parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Official(), input).checkInitialized(); + } + + public static Official parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Official(), input).checkInitialized(); + } + + /** + * @return factory for creating Official messages + */ + public static MessageFactory getFactory() { + return OfficialFactory.INSTANCE; + } + + private enum OfficialFactory implements MessageFactory { + INSTANCE; + + @Override + public Official create() { + return Official.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName uid = FieldName.forField("Uid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName token = FieldName.forField("Token"); + } + } + + /** + * Protobuf type {@code OfficialOverseas} + */ + public static final class OfficialOverseas extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Uid = 1; + */ + private final Utf8String uid = Utf8String.newEmptyInstance(); + + /** + * optional string Token = 2; + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + private OfficialOverseas() { + } + + /** + * @return a new empty instance of {@code OfficialOverseas} + */ + public static OfficialOverseas newInstance() { + return new OfficialOverseas(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public OfficialOverseas clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public OfficialOverseas addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public OfficialOverseas addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public OfficialOverseas setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Uid = 1; + * @return whether the uid field is set + */ + public boolean hasUid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Uid = 1; + * @return this + */ + public OfficialOverseas clearUid() { + bitField0_ &= ~0x00000002; + uid.clear(); + return this; + } + + /** + * optional string Uid = 1; + * @return the uid + */ + public String getUid() { + return uid.getString(); + } + + /** + * optional string Uid = 1; + * @return internal {@code Utf8String} representation of uid for reading + */ + public Utf8String getUidBytes() { + return this.uid; + } + + /** + * optional string Uid = 1; + * @return internal {@code Utf8String} representation of uid for modifications + */ + public Utf8String getMutableUidBytes() { + bitField0_ |= 0x00000002; + return this.uid; + } + + /** + * optional string Uid = 1; + * @param value the uid to set + * @return this + */ + public OfficialOverseas setUid(final CharSequence value) { + bitField0_ |= 0x00000002; + uid.copyFrom(value); + return this; + } + + /** + * optional string Uid = 1; + * @param value the uid to set + * @return this + */ + public OfficialOverseas setUid(final Utf8String value) { + bitField0_ |= 0x00000002; + uid.copyFrom(value); + return this; + } + + /** + * optional string Token = 2; + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Token = 2; + * @return this + */ + public OfficialOverseas clearToken() { + bitField0_ &= ~0x00000004; + token.clear(); + return this; + } + + /** + * optional string Token = 2; + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * optional string Token = 2; + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * optional string Token = 2; + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000004; + return this.token; + } + + /** + * optional string Token = 2; + * @param value the token to set + * @return this + */ + public OfficialOverseas setToken(final CharSequence value) { + bitField0_ |= 0x00000004; + token.copyFrom(value); + return this; + } + + /** + * optional string Token = 2; + * @param value the token to set + * @return this + */ + public OfficialOverseas setToken(final Utf8String value) { + bitField0_ |= 0x00000004; + token.copyFrom(value); + return this; + } + + @Override + public OfficialOverseas copyFrom(final OfficialOverseas other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + uid.copyFrom(other.uid); + token.copyFrom(other.token); + } + return this; + } + + @Override + public OfficialOverseas mergeFrom(final OfficialOverseas other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasUid()) { + getMutableUidBytes().copyFrom(other.uid); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + return this; + } + + @Override + public OfficialOverseas clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uid.clear(); + token.clear(); + return this; + } + + @Override + public OfficialOverseas clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + uid.clear(); + token.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof OfficialOverseas)) { + return false; + } + OfficialOverseas other = (OfficialOverseas) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasUid() || uid.equals(other.uid)) + && (!hasToken() || token.equals(other.token)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(uid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(token); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(uid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public OfficialOverseas mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // uid + input.readString(uid); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // token + input.readString(token); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.uid, uid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.token, token); + } + output.endObject(); + } + + @Override + public OfficialOverseas mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 85040: { + if (input.isAtField(FieldNames.uid)) { + if (!input.trySkipNullValue()) { + input.readString(uid); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80988633: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public OfficialOverseas clone() { + return new OfficialOverseas().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static OfficialOverseas parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new OfficialOverseas(), data).checkInitialized(); + } + + public static OfficialOverseas parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new OfficialOverseas(), input).checkInitialized(); + } + + public static OfficialOverseas parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new OfficialOverseas(), input).checkInitialized(); + } + + /** + * @return factory for creating OfficialOverseas messages + */ + public static MessageFactory getFactory() { + return OfficialOverseasFactory.INSTANCE; + } + + private enum OfficialOverseasFactory implements MessageFactory { + INSTANCE; + + @Override + public OfficialOverseas create() { + return OfficialOverseas.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName uid = FieldName.forField("Uid"); + + static final FieldName token = FieldName.forField("Token"); + } + } + + /** + * Protobuf type {@code Regular} + */ + public static final class Regular extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Name = 1; + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + /** + * optional string Pass = 2; + */ + private final Utf8String pass = Utf8String.newEmptyInstance(); + + private Regular() { + } + + /** + * @return a new empty instance of {@code Regular} + */ + public static Regular newInstance() { + return new Regular(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Regular clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Regular addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Regular addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Regular setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Name = 1; + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Name = 1; + * @return this + */ + public Regular clearName() { + bitField0_ &= ~0x00000002; + name.clear(); + return this; + } + + /** + * optional string Name = 1; + * @return the name + */ + public String getName() { + return name.getString(); + } + + /** + * optional string Name = 1; + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * optional string Name = 1; + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000002; + return this.name; + } + + /** + * optional string Name = 1; + * @param value the name to set + * @return this + */ + public Regular setName(final CharSequence value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + /** + * optional string Name = 1; + * @param value the name to set + * @return this + */ + public Regular setName(final Utf8String value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + /** + * optional string Pass = 2; + * @return whether the pass field is set + */ + public boolean hasPass() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Pass = 2; + * @return this + */ + public Regular clearPass() { + bitField0_ &= ~0x00000004; + pass.clear(); + return this; + } + + /** + * optional string Pass = 2; + * @return the pass + */ + public String getPass() { + return pass.getString(); + } + + /** + * optional string Pass = 2; + * @return internal {@code Utf8String} representation of pass for reading + */ + public Utf8String getPassBytes() { + return this.pass; + } + + /** + * optional string Pass = 2; + * @return internal {@code Utf8String} representation of pass for modifications + */ + public Utf8String getMutablePassBytes() { + bitField0_ |= 0x00000004; + return this.pass; + } + + /** + * optional string Pass = 2; + * @param value the pass to set + * @return this + */ + public Regular setPass(final CharSequence value) { + bitField0_ |= 0x00000004; + pass.copyFrom(value); + return this; + } + + /** + * optional string Pass = 2; + * @param value the pass to set + * @return this + */ + public Regular setPass(final Utf8String value) { + bitField0_ |= 0x00000004; + pass.copyFrom(value); + return this; + } + + @Override + public Regular copyFrom(final Regular other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + name.copyFrom(other.name); + pass.copyFrom(other.pass); + } + return this; + } + + @Override + public Regular mergeFrom(final Regular other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + if (other.hasPass()) { + getMutablePassBytes().copyFrom(other.pass); + } + return this; + } + + @Override + public Regular clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + pass.clear(); + return this; + } + + @Override + public Regular clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + pass.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Regular)) { + return false; + } + Regular other = (Regular) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasName() || name.equals(other.name)) + && (!hasPass() || pass.equals(other.pass)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(name); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(pass); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(pass); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Regular mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // name + input.readString(name); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // pass + input.readString(pass); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.name, name); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.pass, pass); + } + output.endObject(); + } + + @Override + public Regular mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2420395: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2480177: { + if (input.isAtField(FieldNames.pass)) { + if (!input.trySkipNullValue()) { + input.readString(pass); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Regular clone() { + return new Regular().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Regular parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Regular(), data).checkInitialized(); + } + + public static Regular parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Regular(), input).checkInitialized(); + } + + public static Regular parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Regular(), input).checkInitialized(); + } + + /** + * @return factory for creating Regular messages + */ + public static MessageFactory getFactory() { + return RegularFactory.INSTANCE; + } + + private enum RegularFactory implements MessageFactory { + INSTANCE; + + @Override + public Regular create() { + return Regular.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName name = FieldName.forField("Name"); + + static final FieldName pass = FieldName.forField("Pass"); + } + } + + /** + * Protobuf type {@code LoginResp} + */ + public static final class LoginResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Token = 1; + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + private LoginResp() { + } + + /** + * @return a new empty instance of {@code LoginResp} + */ + public static LoginResp newInstance() { + return new LoginResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public LoginResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public LoginResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public LoginResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public LoginResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Token = 1; + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Token = 1; + * @return this + */ + public LoginResp clearToken() { + bitField0_ &= ~0x00000002; + token.clear(); + return this; + } + + /** + * optional string Token = 1; + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * optional string Token = 1; + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * optional string Token = 1; + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000002; + return this.token; + } + + /** + * optional string Token = 1; + * @param value the token to set + * @return this + */ + public LoginResp setToken(final CharSequence value) { + bitField0_ |= 0x00000002; + token.copyFrom(value); + return this; + } + + /** + * optional string Token = 1; + * @param value the token to set + * @return this + */ + public LoginResp setToken(final Utf8String value) { + bitField0_ |= 0x00000002; + token.copyFrom(value); + return this; + } + + @Override + public LoginResp copyFrom(final LoginResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + token.copyFrom(other.token); + } + return this; + } + + @Override + public LoginResp mergeFrom(final LoginResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + return this; + } + + @Override + public LoginResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public LoginResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof LoginResp)) { + return false; + } + LoginResp other = (LoginResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasToken() || token.equals(other.token)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(token); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public LoginResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // token + input.readString(token); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.token, token); + } + output.endObject(); + } + + @Override + public LoginResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80988633: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public LoginResp clone() { + return new LoginResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static LoginResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new LoginResp(), data).checkInitialized(); + } + + public static LoginResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new LoginResp(), input).checkInitialized(); + } + + public static LoginResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new LoginResp(), input).checkInitialized(); + } + + /** + * @return factory for creating LoginResp messages + */ + public static MessageFactory getFactory() { + return LoginRespFactory.INSTANCE; + } + + private enum LoginRespFactory implements MessageFactory { + INSTANCE; + + @Override + public LoginResp create() { + return LoginResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName token = FieldName.forField("Token"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerMusicSet.java b/src/generated/main/emu/nebula/proto/PlayerMusicSet.java new file mode 100644 index 0000000..a49b227 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerMusicSet.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class PlayerMusicSet { +} diff --git a/src/generated/main/emu/nebula/proto/PlayerNameEdit.java b/src/generated/main/emu/nebula/proto/PlayerNameEdit.java new file mode 100644 index 0000000..6d0d131 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerNameEdit.java @@ -0,0 +1,781 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class PlayerNameEdit { + /** + * Protobuf type {@code PlayerNameEditReq} + */ + public static final class PlayerNameEditReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Name = 1; + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + private PlayerNameEditReq() { + } + + /** + * @return a new empty instance of {@code PlayerNameEditReq} + */ + public static PlayerNameEditReq newInstance() { + return new PlayerNameEditReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerNameEditReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerNameEditReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerNameEditReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerNameEditReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Name = 1; + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Name = 1; + * @return this + */ + public PlayerNameEditReq clearName() { + bitField0_ &= ~0x00000002; + name.clear(); + return this; + } + + /** + * optional string Name = 1; + * @return the name + */ + public String getName() { + return name.getString(); + } + + /** + * optional string Name = 1; + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * optional string Name = 1; + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000002; + return this.name; + } + + /** + * optional string Name = 1; + * @param value the name to set + * @return this + */ + public PlayerNameEditReq setName(final CharSequence value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + /** + * optional string Name = 1; + * @param value the name to set + * @return this + */ + public PlayerNameEditReq setName(final Utf8String value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + @Override + public PlayerNameEditReq copyFrom(final PlayerNameEditReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + name.copyFrom(other.name); + } + return this; + } + + @Override + public PlayerNameEditReq mergeFrom(final PlayerNameEditReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + return this; + } + + @Override + public PlayerNameEditReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + return this; + } + + @Override + public PlayerNameEditReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerNameEditReq)) { + return false; + } + PlayerNameEditReq other = (PlayerNameEditReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasName() || name.equals(other.name)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(name); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerNameEditReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // name + input.readString(name); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.name, name); + } + output.endObject(); + } + + @Override + public PlayerNameEditReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2420395: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerNameEditReq clone() { + return new PlayerNameEditReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerNameEditReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerNameEditReq(), data).checkInitialized(); + } + + public static PlayerNameEditReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerNameEditReq(), input).checkInitialized(); + } + + public static PlayerNameEditReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerNameEditReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerNameEditReq messages + */ + public static MessageFactory getFactory() { + return PlayerNameEditReqFactory.INSTANCE; + } + + private enum PlayerNameEditReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerNameEditReq create() { + return PlayerNameEditReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName name = FieldName.forField("Name"); + } + } + + /** + * Protobuf type {@code PlayerNameEditResp} + */ + public static final class PlayerNameEditResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Hashtag = 1; + */ + private int hashtag; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerNameEditResp() { + } + + /** + * @return a new empty instance of {@code PlayerNameEditResp} + */ + public static PlayerNameEditResp newInstance() { + return new PlayerNameEditResp(); + } + + /** + * optional uint32 Hashtag = 1; + * @return whether the hashtag field is set + */ + public boolean hasHashtag() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Hashtag = 1; + * @return this + */ + public PlayerNameEditResp clearHashtag() { + bitField0_ &= ~0x00000001; + hashtag = 0; + return this; + } + + /** + * optional uint32 Hashtag = 1; + * @return the hashtag + */ + public int getHashtag() { + return hashtag; + } + + /** + * optional uint32 Hashtag = 1; + * @param value the hashtag to set + * @return this + */ + public PlayerNameEditResp setHashtag(final int value) { + bitField0_ |= 0x00000001; + hashtag = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerNameEditResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerNameEditResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerNameEditResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerNameEditResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerNameEditResp copyFrom(final PlayerNameEditResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + hashtag = other.hashtag; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerNameEditResp mergeFrom(final PlayerNameEditResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasHashtag()) { + setHashtag(other.hashtag); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerNameEditResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + hashtag = 0; + nextPackage.clear(); + return this; + } + + @Override + public PlayerNameEditResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerNameEditResp)) { + return false; + } + PlayerNameEditResp other = (PlayerNameEditResp) o; + return bitField0_ == other.bitField0_ + && (!hasHashtag() || hashtag == other.hashtag) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(hashtag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(hashtag); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerNameEditResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // hashtag + hashtag = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.hashtag, hashtag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerNameEditResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1932766292: { + if (input.isAtField(FieldNames.hashtag)) { + if (!input.trySkipNullValue()) { + hashtag = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerNameEditResp clone() { + return new PlayerNameEditResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerNameEditResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerNameEditResp(), data).checkInitialized(); + } + + public static PlayerNameEditResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerNameEditResp(), input).checkInitialized(); + } + + public static PlayerNameEditResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerNameEditResp(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerNameEditResp messages + */ + public static MessageFactory getFactory() { + return PlayerNameEditRespFactory.INSTANCE; + } + + private enum PlayerNameEditRespFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerNameEditResp create() { + return PlayerNameEditResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName hashtag = FieldName.forField("Hashtag"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerPing.java b/src/generated/main/emu/nebula/proto/PlayerPing.java new file mode 100644 index 0000000..1c8cb92 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerPing.java @@ -0,0 +1,669 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class PlayerPing { + /** + * Protobuf type {@code Ping} + */ + public static final class Ping extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Ping() { + } + + /** + * @return a new empty instance of {@code Ping} + */ + public static Ping newInstance() { + return new Ping(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Ping clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Ping addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Ping addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Ping setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Ping copyFrom(final Ping other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Ping mergeFrom(final Ping other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Ping clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public Ping clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Ping)) { + return false; + } + Ping other = (Ping) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Ping mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Ping mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Ping clone() { + return new Ping().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Ping parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Ping(), data).checkInitialized(); + } + + public static Ping parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Ping(), input).checkInitialized(); + } + + public static Ping parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Ping(), input).checkInitialized(); + } + + /** + * @return factory for creating Ping messages + */ + public static MessageFactory getFactory() { + return PingFactory.INSTANCE; + } + + private enum PingFactory implements MessageFactory { + INSTANCE; + + @Override + public Ping create() { + return Ping.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Pong} + */ + public static final class Pong extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 ServerTs = 1; + */ + private long serverTs; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Pong() { + } + + /** + * @return a new empty instance of {@code Pong} + */ + public static Pong newInstance() { + return new Pong(); + } + + /** + * optional int64 ServerTs = 1; + * @return whether the serverTs field is set + */ + public boolean hasServerTs() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 ServerTs = 1; + * @return this + */ + public Pong clearServerTs() { + bitField0_ &= ~0x00000001; + serverTs = 0L; + return this; + } + + /** + * optional int64 ServerTs = 1; + * @return the serverTs + */ + public long getServerTs() { + return serverTs; + } + + /** + * optional int64 ServerTs = 1; + * @param value the serverTs to set + * @return this + */ + public Pong setServerTs(final long value) { + bitField0_ |= 0x00000001; + serverTs = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Pong clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Pong addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Pong addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Pong setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Pong copyFrom(final Pong other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + serverTs = other.serverTs; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Pong mergeFrom(final Pong other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasServerTs()) { + setServerTs(other.serverTs); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Pong clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + serverTs = 0L; + nextPackage.clear(); + return this; + } + + @Override + public Pong clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Pong)) { + return false; + } + Pong other = (Pong) o; + return bitField0_ == other.bitField0_ + && (!hasServerTs() || serverTs == other.serverTs) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt64NoTag(serverTs); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(serverTs); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Pong mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // serverTs + serverTs = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.serverTs, serverTs); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Pong mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1443748162: { + if (input.isAtField(FieldNames.serverTs)) { + if (!input.trySkipNullValue()) { + serverTs = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Pong clone() { + return new Pong().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Pong parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Pong(), data).checkInitialized(); + } + + public static Pong parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Pong(), input).checkInitialized(); + } + + public static Pong parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Pong(), input).checkInitialized(); + } + + /** + * @return factory for creating Pong messages + */ + public static MessageFactory getFactory() { + return PongFactory.INSTANCE; + } + + private enum PongFactory implements MessageFactory { + INSTANCE; + + @Override + public Pong create() { + return Pong.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName serverTs = FieldName.forField("ServerTs"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerRegOuterClass.java b/src/generated/main/emu/nebula/proto/PlayerRegOuterClass.java new file mode 100644 index 0000000..b2afdf0 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerRegOuterClass.java @@ -0,0 +1,492 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class PlayerRegOuterClass { + /** + * Protobuf type {@code PlayerReg} + */ + public static final class PlayerReg extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool Gender = 2; + */ + private boolean gender; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Nickname = 1; + */ + private final Utf8String nickname = Utf8String.newEmptyInstance(); + + private PlayerReg() { + } + + /** + * @return a new empty instance of {@code PlayerReg} + */ + public static PlayerReg newInstance() { + return new PlayerReg(); + } + + /** + * optional bool Gender = 2; + * @return whether the gender field is set + */ + public boolean hasGender() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool Gender = 2; + * @return this + */ + public PlayerReg clearGender() { + bitField0_ &= ~0x00000001; + gender = false; + return this; + } + + /** + * optional bool Gender = 2; + * @return the gender + */ + public boolean getGender() { + return gender; + } + + /** + * optional bool Gender = 2; + * @param value the gender to set + * @return this + */ + public PlayerReg setGender(final boolean value) { + bitField0_ |= 0x00000001; + gender = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerReg clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerReg addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerReg addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerReg setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Nickname = 1; + * @return whether the nickname field is set + */ + public boolean hasNickname() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Nickname = 1; + * @return this + */ + public PlayerReg clearNickname() { + bitField0_ &= ~0x00000004; + nickname.clear(); + return this; + } + + /** + * optional string Nickname = 1; + * @return the nickname + */ + public String getNickname() { + return nickname.getString(); + } + + /** + * optional string Nickname = 1; + * @return internal {@code Utf8String} representation of nickname for reading + */ + public Utf8String getNicknameBytes() { + return this.nickname; + } + + /** + * optional string Nickname = 1; + * @return internal {@code Utf8String} representation of nickname for modifications + */ + public Utf8String getMutableNicknameBytes() { + bitField0_ |= 0x00000004; + return this.nickname; + } + + /** + * optional string Nickname = 1; + * @param value the nickname to set + * @return this + */ + public PlayerReg setNickname(final CharSequence value) { + bitField0_ |= 0x00000004; + nickname.copyFrom(value); + return this; + } + + /** + * optional string Nickname = 1; + * @param value the nickname to set + * @return this + */ + public PlayerReg setNickname(final Utf8String value) { + bitField0_ |= 0x00000004; + nickname.copyFrom(value); + return this; + } + + @Override + public PlayerReg copyFrom(final PlayerReg other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + gender = other.gender; + nextPackage.copyFrom(other.nextPackage); + nickname.copyFrom(other.nickname); + } + return this; + } + + @Override + public PlayerReg mergeFrom(final PlayerReg other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGender()) { + setGender(other.gender); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNickname()) { + getMutableNicknameBytes().copyFrom(other.nickname); + } + return this; + } + + @Override + public PlayerReg clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + gender = false; + nextPackage.clear(); + nickname.clear(); + return this; + } + + @Override + public PlayerReg clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + nickname.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerReg)) { + return false; + } + PlayerReg other = (PlayerReg) o; + return bitField0_ == other.bitField0_ + && (!hasGender() || gender == other.gender) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNickname() || nickname.equals(other.nickname)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(gender); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(nickname); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(nickname); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerReg mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // gender + gender = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // nickname + input.readString(nickname); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.gender, gender); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.nickname, nickname); + } + output.endObject(); + } + + @Override + public PlayerReg mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2129321697: { + if (input.isAtField(FieldNames.gender)) { + if (!input.trySkipNullValue()) { + gender = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 135335054: { + if (input.isAtField(FieldNames.nickname)) { + if (!input.trySkipNullValue()) { + input.readString(nickname); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerReg clone() { + return new PlayerReg().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerReg parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerReg(), data).checkInitialized(); + } + + public static PlayerReg parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerReg(), input).checkInitialized(); + } + + public static PlayerReg parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerReg(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerReg messages + */ + public static MessageFactory getFactory() { + return PlayerRegFactory.INSTANCE; + } + + private enum PlayerRegFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerReg create() { + return PlayerReg.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName gender = FieldName.forField("Gender"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nickname = FieldName.forField("Nickname"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerSignatureEdit.java b/src/generated/main/emu/nebula/proto/PlayerSignatureEdit.java new file mode 100644 index 0000000..95a375f --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerSignatureEdit.java @@ -0,0 +1,413 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class PlayerSignatureEdit { + /** + * Protobuf type {@code PlayerSignatureEditReq} + */ + public static final class PlayerSignatureEditReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Signature = 1; + */ + private final Utf8String signature = Utf8String.newEmptyInstance(); + + private PlayerSignatureEditReq() { + } + + /** + * @return a new empty instance of {@code PlayerSignatureEditReq} + */ + public static PlayerSignatureEditReq newInstance() { + return new PlayerSignatureEditReq(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerSignatureEditReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerSignatureEditReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerSignatureEditReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerSignatureEditReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Signature = 1; + * @return whether the signature field is set + */ + public boolean hasSignature() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Signature = 1; + * @return this + */ + public PlayerSignatureEditReq clearSignature() { + bitField0_ &= ~0x00000002; + signature.clear(); + return this; + } + + /** + * optional string Signature = 1; + * @return the signature + */ + public String getSignature() { + return signature.getString(); + } + + /** + * optional string Signature = 1; + * @return internal {@code Utf8String} representation of signature for reading + */ + public Utf8String getSignatureBytes() { + return this.signature; + } + + /** + * optional string Signature = 1; + * @return internal {@code Utf8String} representation of signature for modifications + */ + public Utf8String getMutableSignatureBytes() { + bitField0_ |= 0x00000002; + return this.signature; + } + + /** + * optional string Signature = 1; + * @param value the signature to set + * @return this + */ + public PlayerSignatureEditReq setSignature(final CharSequence value) { + bitField0_ |= 0x00000002; + signature.copyFrom(value); + return this; + } + + /** + * optional string Signature = 1; + * @param value the signature to set + * @return this + */ + public PlayerSignatureEditReq setSignature(final Utf8String value) { + bitField0_ |= 0x00000002; + signature.copyFrom(value); + return this; + } + + @Override + public PlayerSignatureEditReq copyFrom(final PlayerSignatureEditReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + signature.copyFrom(other.signature); + } + return this; + } + + @Override + public PlayerSignatureEditReq mergeFrom(final PlayerSignatureEditReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSignature()) { + getMutableSignatureBytes().copyFrom(other.signature); + } + return this; + } + + @Override + public PlayerSignatureEditReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + signature.clear(); + return this; + } + + @Override + public PlayerSignatureEditReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + signature.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerSignatureEditReq)) { + return false; + } + PlayerSignatureEditReq other = (PlayerSignatureEditReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSignature() || signature.equals(other.signature)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(signature); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(signature); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerSignatureEditReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // signature + input.readString(signature); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.signature, signature); + } + output.endObject(); + } + + @Override + public PlayerSignatureEditReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1217415016: { + if (input.isAtField(FieldNames.signature)) { + if (!input.trySkipNullValue()) { + input.readString(signature); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerSignatureEditReq clone() { + return new PlayerSignatureEditReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerSignatureEditReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerSignatureEditReq(), data).checkInitialized(); + } + + public static PlayerSignatureEditReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSignatureEditReq(), input).checkInitialized(); + } + + public static PlayerSignatureEditReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSignatureEditReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerSignatureEditReq messages + */ + public static MessageFactory getFactory() { + return PlayerSignatureEditReqFactory.INSTANCE; + } + + private enum PlayerSignatureEditReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerSignatureEditReq create() { + return PlayerSignatureEditReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName signature = FieldName.forField("Signature"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerSkinShow.java b/src/generated/main/emu/nebula/proto/PlayerSkinShow.java new file mode 100644 index 0000000..13752aa --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerSkinShow.java @@ -0,0 +1,383 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class PlayerSkinShow { + /** + * Protobuf type {@code PlayerSkinShowReq} + */ + public static final class PlayerSkinShowReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 SkinId = 1; + */ + private int skinId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerSkinShowReq() { + } + + /** + * @return a new empty instance of {@code PlayerSkinShowReq} + */ + public static PlayerSkinShowReq newInstance() { + return new PlayerSkinShowReq(); + } + + /** + * optional uint32 SkinId = 1; + * @return whether the skinId field is set + */ + public boolean hasSkinId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 SkinId = 1; + * @return this + */ + public PlayerSkinShowReq clearSkinId() { + bitField0_ &= ~0x00000001; + skinId = 0; + return this; + } + + /** + * optional uint32 SkinId = 1; + * @return the skinId + */ + public int getSkinId() { + return skinId; + } + + /** + * optional uint32 SkinId = 1; + * @param value the skinId to set + * @return this + */ + public PlayerSkinShowReq setSkinId(final int value) { + bitField0_ |= 0x00000001; + skinId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerSkinShowReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerSkinShowReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerSkinShowReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerSkinShowReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerSkinShowReq copyFrom(final PlayerSkinShowReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + skinId = other.skinId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerSkinShowReq mergeFrom(final PlayerSkinShowReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSkinId()) { + setSkinId(other.skinId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerSkinShowReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + skinId = 0; + nextPackage.clear(); + return this; + } + + @Override + public PlayerSkinShowReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerSkinShowReq)) { + return false; + } + PlayerSkinShowReq other = (PlayerSkinShowReq) o; + return bitField0_ == other.bitField0_ + && (!hasSkinId() || skinId == other.skinId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(skinId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skinId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerSkinShowReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // skinId + skinId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.skinId, skinId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerSkinShowReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1816694888: { + if (input.isAtField(FieldNames.skinId)) { + if (!input.trySkipNullValue()) { + skinId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerSkinShowReq clone() { + return new PlayerSkinShowReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerSkinShowReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerSkinShowReq(), data).checkInitialized(); + } + + public static PlayerSkinShowReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSkinShowReq(), input).checkInitialized(); + } + + public static PlayerSkinShowReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSkinShowReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerSkinShowReq messages + */ + public static MessageFactory getFactory() { + return PlayerSkinShowReqFactory.INSTANCE; + } + + private enum PlayerSkinShowReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerSkinShowReq create() { + return PlayerSkinShowReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName skinId = FieldName.forField("SkinId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerSurvey.java b/src/generated/main/emu/nebula/proto/PlayerSurvey.java new file mode 100644 index 0000000..4e5a398 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerSurvey.java @@ -0,0 +1,890 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class PlayerSurvey { + /** + * Protobuf type {@code PlayerSurveyReq} + */ + public static final class PlayerSurveyReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 SurveyId = 1; + */ + private long surveyId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerSurveyReq() { + } + + /** + * @return a new empty instance of {@code PlayerSurveyReq} + */ + public static PlayerSurveyReq newInstance() { + return new PlayerSurveyReq(); + } + + /** + * optional int64 SurveyId = 1; + * @return whether the surveyId field is set + */ + public boolean hasSurveyId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 SurveyId = 1; + * @return this + */ + public PlayerSurveyReq clearSurveyId() { + bitField0_ &= ~0x00000001; + surveyId = 0L; + return this; + } + + /** + * optional int64 SurveyId = 1; + * @return the surveyId + */ + public long getSurveyId() { + return surveyId; + } + + /** + * optional int64 SurveyId = 1; + * @param value the surveyId to set + * @return this + */ + public PlayerSurveyReq setSurveyId(final long value) { + bitField0_ |= 0x00000001; + surveyId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerSurveyReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerSurveyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerSurveyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerSurveyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerSurveyReq copyFrom(final PlayerSurveyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + surveyId = other.surveyId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerSurveyReq mergeFrom(final PlayerSurveyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSurveyId()) { + setSurveyId(other.surveyId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerSurveyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + surveyId = 0L; + nextPackage.clear(); + return this; + } + + @Override + public PlayerSurveyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerSurveyReq)) { + return false; + } + PlayerSurveyReq other = (PlayerSurveyReq) o; + return bitField0_ == other.bitField0_ + && (!hasSurveyId() || surveyId == other.surveyId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt64NoTag(surveyId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(surveyId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerSurveyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // surveyId + surveyId = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.surveyId, surveyId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerSurveyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1536055755: { + if (input.isAtField(FieldNames.surveyId)) { + if (!input.trySkipNullValue()) { + surveyId = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerSurveyReq clone() { + return new PlayerSurveyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerSurveyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerSurveyReq(), data).checkInitialized(); + } + + public static PlayerSurveyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSurveyReq(), input).checkInitialized(); + } + + public static PlayerSurveyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSurveyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerSurveyReq messages + */ + public static MessageFactory getFactory() { + return PlayerSurveyReqFactory.INSTANCE; + } + + private enum PlayerSurveyReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerSurveyReq create() { + return PlayerSurveyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName surveyId = FieldName.forField("SurveyId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code PlayerSurveyResp} + */ + public static final class PlayerSurveyResp extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string ActivityID = 1; + */ + private final Utf8String activityID = Utf8String.newEmptyInstance(); + + /** + * optional string NotifyUrl = 2; + */ + private final Utf8String notifyUrl = Utf8String.newEmptyInstance(); + + private PlayerSurveyResp() { + } + + /** + * @return a new empty instance of {@code PlayerSurveyResp} + */ + public static PlayerSurveyResp newInstance() { + return new PlayerSurveyResp(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerSurveyResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerSurveyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerSurveyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerSurveyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string ActivityID = 1; + * @return whether the activityID field is set + */ + public boolean hasActivityID() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string ActivityID = 1; + * @return this + */ + public PlayerSurveyResp clearActivityID() { + bitField0_ &= ~0x00000002; + activityID.clear(); + return this; + } + + /** + * optional string ActivityID = 1; + * @return the activityID + */ + public String getActivityID() { + return activityID.getString(); + } + + /** + * optional string ActivityID = 1; + * @return internal {@code Utf8String} representation of activityID for reading + */ + public Utf8String getActivityIDBytes() { + return this.activityID; + } + + /** + * optional string ActivityID = 1; + * @return internal {@code Utf8String} representation of activityID for modifications + */ + public Utf8String getMutableActivityIDBytes() { + bitField0_ |= 0x00000002; + return this.activityID; + } + + /** + * optional string ActivityID = 1; + * @param value the activityID to set + * @return this + */ + public PlayerSurveyResp setActivityID(final CharSequence value) { + bitField0_ |= 0x00000002; + activityID.copyFrom(value); + return this; + } + + /** + * optional string ActivityID = 1; + * @param value the activityID to set + * @return this + */ + public PlayerSurveyResp setActivityID(final Utf8String value) { + bitField0_ |= 0x00000002; + activityID.copyFrom(value); + return this; + } + + /** + * optional string NotifyUrl = 2; + * @return whether the notifyUrl field is set + */ + public boolean hasNotifyUrl() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string NotifyUrl = 2; + * @return this + */ + public PlayerSurveyResp clearNotifyUrl() { + bitField0_ &= ~0x00000004; + notifyUrl.clear(); + return this; + } + + /** + * optional string NotifyUrl = 2; + * @return the notifyUrl + */ + public String getNotifyUrl() { + return notifyUrl.getString(); + } + + /** + * optional string NotifyUrl = 2; + * @return internal {@code Utf8String} representation of notifyUrl for reading + */ + public Utf8String getNotifyUrlBytes() { + return this.notifyUrl; + } + + /** + * optional string NotifyUrl = 2; + * @return internal {@code Utf8String} representation of notifyUrl for modifications + */ + public Utf8String getMutableNotifyUrlBytes() { + bitField0_ |= 0x00000004; + return this.notifyUrl; + } + + /** + * optional string NotifyUrl = 2; + * @param value the notifyUrl to set + * @return this + */ + public PlayerSurveyResp setNotifyUrl(final CharSequence value) { + bitField0_ |= 0x00000004; + notifyUrl.copyFrom(value); + return this; + } + + /** + * optional string NotifyUrl = 2; + * @param value the notifyUrl to set + * @return this + */ + public PlayerSurveyResp setNotifyUrl(final Utf8String value) { + bitField0_ |= 0x00000004; + notifyUrl.copyFrom(value); + return this; + } + + @Override + public PlayerSurveyResp copyFrom(final PlayerSurveyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + activityID.copyFrom(other.activityID); + notifyUrl.copyFrom(other.notifyUrl); + } + return this; + } + + @Override + public PlayerSurveyResp mergeFrom(final PlayerSurveyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasActivityID()) { + getMutableActivityIDBytes().copyFrom(other.activityID); + } + if (other.hasNotifyUrl()) { + getMutableNotifyUrlBytes().copyFrom(other.notifyUrl); + } + return this; + } + + @Override + public PlayerSurveyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + activityID.clear(); + notifyUrl.clear(); + return this; + } + + @Override + public PlayerSurveyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + activityID.clear(); + notifyUrl.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerSurveyResp)) { + return false; + } + PlayerSurveyResp other = (PlayerSurveyResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasActivityID() || activityID.equals(other.activityID)) + && (!hasNotifyUrl() || notifyUrl.equals(other.notifyUrl)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(activityID); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(notifyUrl); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(activityID); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(notifyUrl); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerSurveyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // activityID + input.readString(activityID); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // notifyUrl + input.readString(notifyUrl); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.activityID, activityID); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.notifyUrl, notifyUrl); + } + output.endObject(); + } + + @Override + public PlayerSurveyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -252882806: { + if (input.isAtField(FieldNames.activityID)) { + if (!input.trySkipNullValue()) { + input.readString(activityID); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -388913850: { + if (input.isAtField(FieldNames.notifyUrl)) { + if (!input.trySkipNullValue()) { + input.readString(notifyUrl); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerSurveyResp clone() { + return new PlayerSurveyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerSurveyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerSurveyResp(), data).checkInitialized(); + } + + public static PlayerSurveyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSurveyResp(), input).checkInitialized(); + } + + public static PlayerSurveyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerSurveyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerSurveyResp messages + */ + public static MessageFactory getFactory() { + return PlayerSurveyRespFactory.INSTANCE; + } + + private enum PlayerSurveyRespFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerSurveyResp create() { + return PlayerSurveyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName activityID = FieldName.forField("ActivityID"); + + static final FieldName notifyUrl = FieldName.forField("NotifyUrl"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerTitleEdit.java b/src/generated/main/emu/nebula/proto/PlayerTitleEdit.java new file mode 100644 index 0000000..ae927f2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerTitleEdit.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class PlayerTitleEdit { + /** + * Protobuf type {@code PlayerTitleEditReq} + */ + public static final class PlayerTitleEditReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 TitlePrefix = 1; + */ + private int titlePrefix; + + /** + * optional uint32 TitleSuffix = 2; + */ + private int titleSuffix; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerTitleEditReq() { + } + + /** + * @return a new empty instance of {@code PlayerTitleEditReq} + */ + public static PlayerTitleEditReq newInstance() { + return new PlayerTitleEditReq(); + } + + /** + * optional uint32 TitlePrefix = 1; + * @return whether the titlePrefix field is set + */ + public boolean hasTitlePrefix() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 TitlePrefix = 1; + * @return this + */ + public PlayerTitleEditReq clearTitlePrefix() { + bitField0_ &= ~0x00000001; + titlePrefix = 0; + return this; + } + + /** + * optional uint32 TitlePrefix = 1; + * @return the titlePrefix + */ + public int getTitlePrefix() { + return titlePrefix; + } + + /** + * optional uint32 TitlePrefix = 1; + * @param value the titlePrefix to set + * @return this + */ + public PlayerTitleEditReq setTitlePrefix(final int value) { + bitField0_ |= 0x00000001; + titlePrefix = value; + return this; + } + + /** + * optional uint32 TitleSuffix = 2; + * @return whether the titleSuffix field is set + */ + public boolean hasTitleSuffix() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 TitleSuffix = 2; + * @return this + */ + public PlayerTitleEditReq clearTitleSuffix() { + bitField0_ &= ~0x00000002; + titleSuffix = 0; + return this; + } + + /** + * optional uint32 TitleSuffix = 2; + * @return the titleSuffix + */ + public int getTitleSuffix() { + return titleSuffix; + } + + /** + * optional uint32 TitleSuffix = 2; + * @param value the titleSuffix to set + * @return this + */ + public PlayerTitleEditReq setTitleSuffix(final int value) { + bitField0_ |= 0x00000002; + titleSuffix = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerTitleEditReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerTitleEditReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerTitleEditReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerTitleEditReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerTitleEditReq copyFrom(final PlayerTitleEditReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + titlePrefix = other.titlePrefix; + titleSuffix = other.titleSuffix; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerTitleEditReq mergeFrom(final PlayerTitleEditReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTitlePrefix()) { + setTitlePrefix(other.titlePrefix); + } + if (other.hasTitleSuffix()) { + setTitleSuffix(other.titleSuffix); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerTitleEditReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + titlePrefix = 0; + titleSuffix = 0; + nextPackage.clear(); + return this; + } + + @Override + public PlayerTitleEditReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerTitleEditReq)) { + return false; + } + PlayerTitleEditReq other = (PlayerTitleEditReq) o; + return bitField0_ == other.bitField0_ + && (!hasTitlePrefix() || titlePrefix == other.titlePrefix) + && (!hasTitleSuffix() || titleSuffix == other.titleSuffix) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(titlePrefix); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(titleSuffix); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titlePrefix); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titleSuffix); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerTitleEditReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // titlePrefix + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // titleSuffix + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.titlePrefix, titlePrefix); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.titleSuffix, titleSuffix); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerTitleEditReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2096776938: { + if (input.isAtField(FieldNames.titlePrefix)) { + if (!input.trySkipNullValue()) { + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2109502551: { + if (input.isAtField(FieldNames.titleSuffix)) { + if (!input.trySkipNullValue()) { + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerTitleEditReq clone() { + return new PlayerTitleEditReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerTitleEditReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerTitleEditReq(), data).checkInitialized(); + } + + public static PlayerTitleEditReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerTitleEditReq(), input).checkInitialized(); + } + + public static PlayerTitleEditReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerTitleEditReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerTitleEditReq messages + */ + public static MessageFactory getFactory() { + return PlayerTitleEditReqFactory.INSTANCE; + } + + private enum PlayerTitleEditReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerTitleEditReq create() { + return PlayerTitleEditReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName titlePrefix = FieldName.forField("TitlePrefix"); + + static final FieldName titleSuffix = FieldName.forField("TitleSuffix"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlayerWorldCalssAdvance.java b/src/generated/main/emu/nebula/proto/PlayerWorldCalssAdvance.java new file mode 100644 index 0000000..4051822 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerWorldCalssAdvance.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class PlayerWorldCalssAdvance { +} diff --git a/src/generated/main/emu/nebula/proto/PlayerWorldClassRewardReceive.java b/src/generated/main/emu/nebula/proto/PlayerWorldClassRewardReceive.java new file mode 100644 index 0000000..382cf43 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlayerWorldClassRewardReceive.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class PlayerWorldClassRewardReceive { + /** + * Protobuf type {@code PlayerWorldClassRewardReq} + */ + public static final class PlayerWorldClassRewardReq extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 ClassX = 1; + */ + private int classX; + + /** + * optional uint32 Stage = 2; + */ + private int stage; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PlayerWorldClassRewardReq() { + } + + /** + * @return a new empty instance of {@code PlayerWorldClassRewardReq} + */ + public static PlayerWorldClassRewardReq newInstance() { + return new PlayerWorldClassRewardReq(); + } + + /** + * optional uint32 ClassX = 1; + * @return whether the classX field is set + */ + public boolean hasClassX() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 ClassX = 1; + * @return this + */ + public PlayerWorldClassRewardReq clearClassX() { + bitField0_ &= ~0x00000001; + classX = 0; + return this; + } + + /** + * optional uint32 ClassX = 1; + * @return the classX + */ + public int getClassX() { + return classX; + } + + /** + * optional uint32 ClassX = 1; + * @param value the classX to set + * @return this + */ + public PlayerWorldClassRewardReq setClassX(final int value) { + bitField0_ |= 0x00000001; + classX = value; + return this; + } + + /** + * optional uint32 Stage = 2; + * @return whether the stage field is set + */ + public boolean hasStage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Stage = 2; + * @return this + */ + public PlayerWorldClassRewardReq clearStage() { + bitField0_ &= ~0x00000002; + stage = 0; + return this; + } + + /** + * optional uint32 Stage = 2; + * @return the stage + */ + public int getStage() { + return stage; + } + + /** + * optional uint32 Stage = 2; + * @param value the stage to set + * @return this + */ + public PlayerWorldClassRewardReq setStage(final int value) { + bitField0_ |= 0x00000002; + stage = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public PlayerWorldClassRewardReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public PlayerWorldClassRewardReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public PlayerWorldClassRewardReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public PlayerWorldClassRewardReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PlayerWorldClassRewardReq copyFrom(final PlayerWorldClassRewardReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + classX = other.classX; + stage = other.stage; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerWorldClassRewardReq mergeFrom(final PlayerWorldClassRewardReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasClassX()) { + setClassX(other.classX); + } + if (other.hasStage()) { + setStage(other.stage); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PlayerWorldClassRewardReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + classX = 0; + stage = 0; + nextPackage.clear(); + return this; + } + + @Override + public PlayerWorldClassRewardReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PlayerWorldClassRewardReq)) { + return false; + } + PlayerWorldClassRewardReq other = (PlayerWorldClassRewardReq) o; + return bitField0_ == other.bitField0_ + && (!hasClassX() || classX == other.classX) + && (!hasStage() || stage == other.stage) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(classX); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(stage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(classX); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(stage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PlayerWorldClassRewardReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // classX + classX = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // stage + stage = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.classX, classX); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.stage, stage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PlayerWorldClassRewardReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2020897280: { + if (input.isAtField(FieldNames.classX)) { + if (!input.trySkipNullValue()) { + classX = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80204510: { + if (input.isAtField(FieldNames.stage)) { + if (!input.trySkipNullValue()) { + stage = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PlayerWorldClassRewardReq clone() { + return new PlayerWorldClassRewardReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PlayerWorldClassRewardReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PlayerWorldClassRewardReq(), data).checkInitialized(); + } + + public static PlayerWorldClassRewardReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerWorldClassRewardReq(), input).checkInitialized(); + } + + public static PlayerWorldClassRewardReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PlayerWorldClassRewardReq(), input).checkInitialized(); + } + + /** + * @return factory for creating PlayerWorldClassRewardReq messages + */ + public static MessageFactory getFactory() { + return PlayerWorldClassRewardReqFactory.INSTANCE; + } + + private enum PlayerWorldClassRewardReqFactory implements MessageFactory { + INSTANCE; + + @Override + public PlayerWorldClassRewardReq create() { + return PlayerWorldClassRewardReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName classX = FieldName.forField("ClassX"); + + static final FieldName stage = FieldName.forField("Stage"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PlotRewardReceive.java b/src/generated/main/emu/nebula/proto/PlotRewardReceive.java new file mode 100644 index 0000000..acd6cf4 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PlotRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class PlotRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/PubilcGm.java b/src/generated/main/emu/nebula/proto/PubilcGm.java new file mode 100644 index 0000000..8883de0 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PubilcGm.java @@ -0,0 +1,416 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class PubilcGm { + /** + * Protobuf type {@code Chars} + */ + public static final class Chars extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Char List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Public.Char.getFactory()); + + private Chars() { + } + + /** + * @return a new empty instance of {@code Chars} + */ + public static Chars newInstance() { + return new Chars(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Chars clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Chars addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Chars addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Chars setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Char List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Char List = 1; + * @return this + */ + public Chars clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .Char List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .Char List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .Char List = 1; + * @param value the list to add + * @return this + */ + public Chars addList(final Public.Char value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .Char List = 1; + * @param values the list to add + * @return this + */ + public Chars addAllList(final Public.Char... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public Chars copyFrom(final Chars other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public Chars mergeFrom(final Chars other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public Chars clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public Chars clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Chars)) { + return false; + } + Chars other = (Chars) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Chars mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public Chars mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Chars clone() { + return new Chars().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Chars parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Chars(), data).checkInitialized(); + } + + public static Chars parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Chars(), input).checkInitialized(); + } + + public static Chars parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Chars(), input).checkInitialized(); + } + + /** + * @return factory for creating Chars messages + */ + public static MessageFactory getFactory() { + return CharsFactory.INSTANCE; + } + + private enum CharsFactory implements MessageFactory { + INSTANCE; + + @Override + public Chars create() { + return Chars.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/Public.java b/src/generated/main/emu/nebula/proto/Public.java new file mode 100644 index 0000000..a322e77 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/Public.java @@ -0,0 +1,69327 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoEnum; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedLong; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.RepeatedString; +import us.hebi.quickbuf.Utf8String; + +public final class Public { + /** + * Protobuf enum {@code QuestType} + */ + public enum QuestType implements ProtoEnum { + /** + * UnknownQuest = 0; + */ + UnknownQuest("UnknownQuest", 0), + + /** + * TourGuide = 1; + */ + TourGuide("TourGuide", 1), + + /** + * Daily = 2; + */ + Daily("Daily", 2), + + /** + * TravelerDuel = 3; + */ + TravelerDuel("TravelerDuel", 3), + + /** + * TravelerDuelChallenge = 4; + */ + TravelerDuelChallenge("TravelerDuelChallenge", 4), + + /** + * Affinity = 5; + */ + Affinity("Affinity", 5), + + /** + * BattlePassDaily = 6; + */ + BattlePassDaily("BattlePassDaily", 6), + + /** + * BattlePassWeekly = 7; + */ + BattlePassWeekly("BattlePassWeekly", 7), + + /** + * VampireSurvivorNormal = 8; + */ + VampireSurvivorNormal("VampireSurvivorNormal", 8), + + /** + * VampireSurvivorSeason = 9; + */ + VampireSurvivorSeason("VampireSurvivorSeason", 9), + + /** + * Tower = 10; + */ + Tower("Tower", 10), + + /** + * Demon = 11; + */ + Demon("Demon", 11), + + /** + * TowerEvent = 12; + */ + TowerEvent("TowerEvent", 12); + + /** + * UnknownQuest = 0; + */ + public static final int UnknownQuest_VALUE = 0; + + /** + * TourGuide = 1; + */ + public static final int TourGuide_VALUE = 1; + + /** + * Daily = 2; + */ + public static final int Daily_VALUE = 2; + + /** + * TravelerDuel = 3; + */ + public static final int TravelerDuel_VALUE = 3; + + /** + * TravelerDuelChallenge = 4; + */ + public static final int TravelerDuelChallenge_VALUE = 4; + + /** + * Affinity = 5; + */ + public static final int Affinity_VALUE = 5; + + /** + * BattlePassDaily = 6; + */ + public static final int BattlePassDaily_VALUE = 6; + + /** + * BattlePassWeekly = 7; + */ + public static final int BattlePassWeekly_VALUE = 7; + + /** + * VampireSurvivorNormal = 8; + */ + public static final int VampireSurvivorNormal_VALUE = 8; + + /** + * VampireSurvivorSeason = 9; + */ + public static final int VampireSurvivorSeason_VALUE = 9; + + /** + * Tower = 10; + */ + public static final int Tower_VALUE = 10; + + /** + * Demon = 11; + */ + public static final int Demon_VALUE = 11; + + /** + * TowerEvent = 12; + */ + public static final int TowerEvent_VALUE = 12; + + private final java.lang.String name; + + private final int number; + + private QuestType(java.lang.String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public java.lang.String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter converter() { + return QuestTypeConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static QuestType forNumber(int value) { + return QuestTypeConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static QuestType forNumberOr(int number, QuestType other) { + QuestType value = forNumber(number); + return value == null ? other : value; + } + + enum QuestTypeConverter implements ProtoEnum.EnumConverter { + INSTANCE; + + private static final QuestType[] lookup = new QuestType[13]; + + static { + lookup[0] = UnknownQuest; + lookup[1] = TourGuide; + lookup[2] = Daily; + lookup[3] = TravelerDuel; + lookup[4] = TravelerDuelChallenge; + lookup[5] = Affinity; + lookup[6] = BattlePassDaily; + lookup[7] = BattlePassWeekly; + lookup[8] = VampireSurvivorNormal; + lookup[9] = VampireSurvivorSeason; + lookup[10] = Tower; + lookup[11] = Demon; + lookup[12] = TowerEvent; + } + + @Override + public final QuestType forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final QuestType forName(final CharSequence value) { + switch (value.length()) { + case 5: { + if (ProtoUtil.isEqual("Daily", value)) { + return Daily; + } + if (ProtoUtil.isEqual("Tower", value)) { + return Tower; + } + if (ProtoUtil.isEqual("Demon", value)) { + return Demon; + } + break; + } + case 8: { + if (ProtoUtil.isEqual("Affinity", value)) { + return Affinity; + } + break; + } + case 9: { + if (ProtoUtil.isEqual("TourGuide", value)) { + return TourGuide; + } + break; + } + case 10: { + if (ProtoUtil.isEqual("TowerEvent", value)) { + return TowerEvent; + } + break; + } + case 12: { + if (ProtoUtil.isEqual("UnknownQuest", value)) { + return UnknownQuest; + } + if (ProtoUtil.isEqual("TravelerDuel", value)) { + return TravelerDuel; + } + break; + } + case 15: { + if (ProtoUtil.isEqual("BattlePassDaily", value)) { + return BattlePassDaily; + } + break; + } + case 16: { + if (ProtoUtil.isEqual("BattlePassWeekly", value)) { + return BattlePassWeekly; + } + break; + } + case 21: { + if (ProtoUtil.isEqual("TravelerDuelChallenge", value)) { + return TravelerDuelChallenge; + } + if (ProtoUtil.isEqual("VampireSurvivorNormal", value)) { + return VampireSurvivorNormal; + } + if (ProtoUtil.isEqual("VampireSurvivorSeason", value)) { + return VampireSurvivorSeason; + } + break; + } + } + return null; + } + } + } + + /** + * Protobuf type {@code Nil} + */ + public static final class Nil extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Nil() { + } + + /** + * @return a new empty instance of {@code Nil} + */ + public static Nil newInstance() { + return new Nil(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Nil clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Nil addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Nil addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Nil setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Nil copyFrom(final Nil other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Nil mergeFrom(final Nil other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Nil clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public Nil clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Nil)) { + return false; + } + Nil other = (Nil) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Nil mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Nil mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Nil clone() { + return new Nil().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Nil parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Nil(), data).checkInitialized(); + } + + public static Nil parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Nil(), input).checkInitialized(); + } + + public static Nil parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Nil(), input).checkInitialized(); + } + + /** + * @return factory for creating Nil messages + */ + public static MessageFactory getFactory() { + return NilFactory.INSTANCE; + } + + private enum NilFactory implements MessageFactory { + INSTANCE; + + @Override + public Nil create() { + return Nil.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code I32} + */ + public static final class I32 extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 Value = 1; + */ + private int value_; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private I32() { + } + + /** + * @return a new empty instance of {@code I32} + */ + public static I32 newInstance() { + return new I32(); + } + + /** + * optional int32 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 Value = 1; + * @return this + */ + public I32 clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0; + return this; + } + + /** + * optional int32 Value = 1; + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * optional int32 Value = 1; + * @param value the value_ to set + * @return this + */ + public I32 setValue(final int value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public I32 clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public I32 addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public I32 addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public I32 setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public I32 copyFrom(final I32 other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public I32 mergeFrom(final I32 other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public I32 clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public I32 clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof I32)) { + return false; + } + I32 other = (I32) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt32NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public I32 mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public I32 mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public I32 clone() { + return new I32().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static I32 parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new I32(), data).checkInitialized(); + } + + public static I32 parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new I32(), input).checkInitialized(); + } + + public static I32 parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new I32(), input).checkInitialized(); + } + + /** + * @return factory for creating I32 messages + */ + public static MessageFactory getFactory() { + return I32Factory.INSTANCE; + } + + private enum I32Factory implements MessageFactory { + INSTANCE; + + @Override + public I32 create() { + return I32.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code I64} + */ + public static final class I64 extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Value = 1; + */ + private long value_; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private I64() { + } + + /** + * @return a new empty instance of {@code I64} + */ + public static I64 newInstance() { + return new I64(); + } + + /** + * optional int64 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Value = 1; + * @return this + */ + public I64 clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0L; + return this; + } + + /** + * optional int64 Value = 1; + * @return the value_ + */ + public long getValue() { + return value_; + } + + /** + * optional int64 Value = 1; + * @param value the value_ to set + * @return this + */ + public I64 setValue(final long value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public I64 clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public I64 addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public I64 addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public I64 setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public I64 copyFrom(final I64 other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public I64 mergeFrom(final I64 other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public I64 clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0L; + nextPackage.clear(); + return this; + } + + @Override + public I64 clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof I64)) { + return false; + } + I64 other = (I64) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt64NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public I64 mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public I64 mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public I64 clone() { + return new I64().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static I64 parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new I64(), data).checkInitialized(); + } + + public static I64 parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new I64(), input).checkInitialized(); + } + + public static I64 parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new I64(), input).checkInitialized(); + } + + /** + * @return factory for creating I64 messages + */ + public static MessageFactory getFactory() { + return I64Factory.INSTANCE; + } + + private enum I64Factory implements MessageFactory { + INSTANCE; + + @Override + public I64 create() { + return I64.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code UI32} + */ + public static final class UI32 extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Value = 1; + */ + private int value_; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private UI32() { + } + + /** + * @return a new empty instance of {@code UI32} + */ + public static UI32 newInstance() { + return new UI32(); + } + + /** + * optional uint32 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Value = 1; + * @return this + */ + public UI32 clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0; + return this; + } + + /** + * optional uint32 Value = 1; + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * optional uint32 Value = 1; + * @param value the value_ to set + * @return this + */ + public UI32 setValue(final int value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public UI32 clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public UI32 addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public UI32 addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public UI32 setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public UI32 copyFrom(final UI32 other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI32 mergeFrom(final UI32 other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI32 clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public UI32 clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UI32)) { + return false; + } + UI32 other = (UI32) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public UI32 mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public UI32 mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public UI32 clone() { + return new UI32().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static UI32 parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new UI32(), data).checkInitialized(); + } + + public static UI32 parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI32(), input).checkInitialized(); + } + + public static UI32 parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI32(), input).checkInitialized(); + } + + /** + * @return factory for creating UI32 messages + */ + public static MessageFactory getFactory() { + return UI32Factory.INSTANCE; + } + + private enum UI32Factory implements MessageFactory { + INSTANCE; + + @Override + public UI32 create() { + return UI32.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code UI64} + */ + public static final class UI64 extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Value = 1; + */ + private long value_; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private UI64() { + } + + /** + * @return a new empty instance of {@code UI64} + */ + public static UI64 newInstance() { + return new UI64(); + } + + /** + * optional uint64 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Value = 1; + * @return this + */ + public UI64 clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0L; + return this; + } + + /** + * optional uint64 Value = 1; + * @return the value_ + */ + public long getValue() { + return value_; + } + + /** + * optional uint64 Value = 1; + * @param value the value_ to set + * @return this + */ + public UI64 setValue(final long value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public UI64 clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public UI64 addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public UI64 addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public UI64 setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public UI64 copyFrom(final UI64 other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI64 mergeFrom(final UI64 other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI64 clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0L; + nextPackage.clear(); + return this; + } + + @Override + public UI64 clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UI64)) { + return false; + } + UI64 other = (UI64) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public UI64 mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public UI64 mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public UI64 clone() { + return new UI64().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static UI64 parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new UI64(), data).checkInitialized(); + } + + public static UI64 parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI64(), input).checkInitialized(); + } + + public static UI64 parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI64(), input).checkInitialized(); + } + + /** + * @return factory for creating UI64 messages + */ + public static MessageFactory getFactory() { + return UI64Factory.INSTANCE; + } + + private enum UI64Factory implements MessageFactory { + INSTANCE; + + @Override + public UI64 create() { + return UI64.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code String} + */ + public static final class String extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Value = 1; + */ + private final Utf8String value_ = Utf8String.newEmptyInstance(); + + private String() { + } + + /** + * @return a new empty instance of {@code String} + */ + public static String newInstance() { + return new String(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public String clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public String addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public String addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public String setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional string Value = 1; + * @return this + */ + public String clearValue() { + bitField0_ &= ~0x00000002; + value_.clear(); + return this; + } + + /** + * optional string Value = 1; + * @return the value_ + */ + public java.lang.String getValue() { + return value_.getString(); + } + + /** + * optional string Value = 1; + * @return internal {@code Utf8String} representation of value_ for reading + */ + public Utf8String getValueBytes() { + return this.value_; + } + + /** + * optional string Value = 1; + * @return internal {@code Utf8String} representation of value_ for modifications + */ + public Utf8String getMutableValueBytes() { + bitField0_ |= 0x00000002; + return this.value_; + } + + /** + * optional string Value = 1; + * @param value the value_ to set + * @return this + */ + public String setValue(final CharSequence value) { + bitField0_ |= 0x00000002; + value_.copyFrom(value); + return this; + } + + /** + * optional string Value = 1; + * @param value the value_ to set + * @return this + */ + public String setValue(final Utf8String value) { + bitField0_ |= 0x00000002; + value_.copyFrom(value); + return this; + } + + @Override + public String copyFrom(final String other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + value_.copyFrom(other.value_); + } + return this; + } + + @Override + public String mergeFrom(final String other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasValue()) { + getMutableValueBytes().copyFrom(other.value_); + } + return this; + } + + @Override + public String clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + value_.clear(); + return this; + } + + @Override + public String clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + value_.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof String)) { + return false; + } + String other = (String) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasValue() || value_.equals(other.value_)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(value_); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(value_); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public String mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // value_ + input.readString(value_); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.value_, value_); + } + output.endObject(); + } + + @Override + public String mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + input.readString(value_); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public String clone() { + return new String().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static String parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new String(), data).checkInitialized(); + } + + public static String parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new String(), input).checkInitialized(); + } + + public static String parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new String(), input).checkInitialized(); + } + + /** + * @return factory for creating String messages + */ + public static MessageFactory getFactory() { + return StringFactory.INSTANCE; + } + + private enum StringFactory implements MessageFactory { + INSTANCE; + + @Override + public String create() { + return String.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName value_ = FieldName.forField("Value"); + } + } + + /** + * Protobuf type {@code I32V} + */ + public static final class I32V extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 Value = 1; + */ + private int value_; + + /** + * optional uint32 Version = 2; + */ + private int version; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private I32V() { + } + + /** + * @return a new empty instance of {@code I32V} + */ + public static I32V newInstance() { + return new I32V(); + } + + /** + * optional int32 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 Value = 1; + * @return this + */ + public I32V clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0; + return this; + } + + /** + * optional int32 Value = 1; + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * optional int32 Value = 1; + * @param value the value_ to set + * @return this + */ + public I32V setValue(final int value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional uint32 Version = 2; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Version = 2; + * @return this + */ + public I32V clearVersion() { + bitField0_ &= ~0x00000002; + version = 0; + return this; + } + + /** + * optional uint32 Version = 2; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 2; + * @param value the version to set + * @return this + */ + public I32V setVersion(final int value) { + bitField0_ |= 0x00000002; + version = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public I32V clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public I32V addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public I32V addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public I32V setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public I32V copyFrom(final I32V other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + version = other.version; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public I32V mergeFrom(final I32V other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public I32V clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0; + version = 0; + nextPackage.clear(); + return this; + } + + @Override + public I32V clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof I32V)) { + return false; + } + I32V other = (I32V) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasVersion() || version == other.version) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt32NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public I32V mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public I32V mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public I32V clone() { + return new I32V().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static I32V parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new I32V(), data).checkInitialized(); + } + + public static I32V parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new I32V(), input).checkInitialized(); + } + + public static I32V parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new I32V(), input).checkInitialized(); + } + + /** + * @return factory for creating I32V messages + */ + public static MessageFactory getFactory() { + return I32VFactory.INSTANCE; + } + + private enum I32VFactory implements MessageFactory { + INSTANCE; + + @Override + public I32V create() { + return I32V.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code UI32V} + */ + public static final class UI32V extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Value = 1; + */ + private int value_; + + /** + * optional uint32 Version = 2; + */ + private int version; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private UI32V() { + } + + /** + * @return a new empty instance of {@code UI32V} + */ + public static UI32V newInstance() { + return new UI32V(); + } + + /** + * optional uint32 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Value = 1; + * @return this + */ + public UI32V clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0; + return this; + } + + /** + * optional uint32 Value = 1; + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * optional uint32 Value = 1; + * @param value the value_ to set + * @return this + */ + public UI32V setValue(final int value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional uint32 Version = 2; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Version = 2; + * @return this + */ + public UI32V clearVersion() { + bitField0_ &= ~0x00000002; + version = 0; + return this; + } + + /** + * optional uint32 Version = 2; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 2; + * @param value the version to set + * @return this + */ + public UI32V setVersion(final int value) { + bitField0_ |= 0x00000002; + version = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public UI32V clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public UI32V addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public UI32V addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public UI32V setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public UI32V copyFrom(final UI32V other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + version = other.version; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI32V mergeFrom(final UI32V other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI32V clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0; + version = 0; + nextPackage.clear(); + return this; + } + + @Override + public UI32V clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UI32V)) { + return false; + } + UI32V other = (UI32V) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasVersion() || version == other.version) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public UI32V mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public UI32V mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public UI32V clone() { + return new UI32V().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static UI32V parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new UI32V(), data).checkInitialized(); + } + + public static UI32V parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI32V(), input).checkInitialized(); + } + + public static UI32V parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI32V(), input).checkInitialized(); + } + + /** + * @return factory for creating UI32V messages + */ + public static MessageFactory getFactory() { + return UI32VFactory.INSTANCE; + } + + private enum UI32VFactory implements MessageFactory { + INSTANCE; + + @Override + public UI32V create() { + return UI32V.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code UI64V} + */ + public static final class UI64V extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Value = 1; + */ + private long value_; + + /** + * optional uint32 Version = 2; + */ + private int version; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private UI64V() { + } + + /** + * @return a new empty instance of {@code UI64V} + */ + public static UI64V newInstance() { + return new UI64V(); + } + + /** + * optional uint64 Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Value = 1; + * @return this + */ + public UI64V clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0L; + return this; + } + + /** + * optional uint64 Value = 1; + * @return the value_ + */ + public long getValue() { + return value_; + } + + /** + * optional uint64 Value = 1; + * @param value the value_ to set + * @return this + */ + public UI64V setValue(final long value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * optional uint32 Version = 2; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Version = 2; + * @return this + */ + public UI64V clearVersion() { + bitField0_ &= ~0x00000002; + version = 0; + return this; + } + + /** + * optional uint32 Version = 2; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 2; + * @param value the version to set + * @return this + */ + public UI64V setVersion(final int value) { + bitField0_ |= 0x00000002; + version = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public UI64V clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public UI64V addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public UI64V addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public UI64V setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public UI64V copyFrom(final UI64V other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + version = other.version; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI64V mergeFrom(final UI64V other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public UI64V clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0L; + version = 0; + nextPackage.clear(); + return this; + } + + @Override + public UI64V clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UI64V)) { + return false; + } + UI64V other = (UI64V) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasVersion() || version == other.version) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public UI64V mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // value_ + value_ = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public UI64V mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public UI64V clone() { + return new UI64V().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static UI64V parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new UI64V(), data).checkInitialized(); + } + + public static UI64V parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI64V(), input).checkInitialized(); + } + + public static UI64V parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new UI64V(), input).checkInitialized(); + } + + /** + * @return factory for creating UI64V messages + */ + public static MessageFactory getFactory() { + return UI64VFactory.INSTANCE; + } + + private enum UI64VFactory implements MessageFactory { + INSTANCE; + + @Override + public UI64V create() { + return UI64V.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StringV} + */ + public static final class StringV extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Version = 2; + */ + private int version; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Value = 1; + */ + private final Utf8String value_ = Utf8String.newEmptyInstance(); + + private StringV() { + } + + /** + * @return a new empty instance of {@code StringV} + */ + public static StringV newInstance() { + return new StringV(); + } + + /** + * optional uint32 Version = 2; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Version = 2; + * @return this + */ + public StringV clearVersion() { + bitField0_ &= ~0x00000001; + version = 0; + return this; + } + + /** + * optional uint32 Version = 2; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 2; + * @param value the version to set + * @return this + */ + public StringV setVersion(final int value) { + bitField0_ |= 0x00000001; + version = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public StringV clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public StringV addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public StringV addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public StringV setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional string Value = 1; + * @return this + */ + public StringV clearValue() { + bitField0_ &= ~0x00000004; + value_.clear(); + return this; + } + + /** + * optional string Value = 1; + * @return the value_ + */ + public java.lang.String getValue() { + return value_.getString(); + } + + /** + * optional string Value = 1; + * @return internal {@code Utf8String} representation of value_ for reading + */ + public Utf8String getValueBytes() { + return this.value_; + } + + /** + * optional string Value = 1; + * @return internal {@code Utf8String} representation of value_ for modifications + */ + public Utf8String getMutableValueBytes() { + bitField0_ |= 0x00000004; + return this.value_; + } + + /** + * optional string Value = 1; + * @param value the value_ to set + * @return this + */ + public StringV setValue(final CharSequence value) { + bitField0_ |= 0x00000004; + value_.copyFrom(value); + return this; + } + + /** + * optional string Value = 1; + * @param value the value_ to set + * @return this + */ + public StringV setValue(final Utf8String value) { + bitField0_ |= 0x00000004; + value_.copyFrom(value); + return this; + } + + @Override + public StringV copyFrom(final StringV other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + version = other.version; + nextPackage.copyFrom(other.nextPackage); + value_.copyFrom(other.value_); + } + return this; + } + + @Override + public StringV mergeFrom(final StringV other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasValue()) { + getMutableValueBytes().copyFrom(other.value_); + } + return this; + } + + @Override + public StringV clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + version = 0; + nextPackage.clear(); + value_.clear(); + return this; + } + + @Override + public StringV clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + value_.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StringV)) { + return false; + } + StringV other = (StringV) o; + return bitField0_ == other.bitField0_ + && (!hasVersion() || version == other.version) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasValue() || value_.equals(other.value_)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(value_); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(value_); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StringV mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // value_ + input.readString(value_); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.value_, value_); + } + output.endObject(); + } + + @Override + public StringV mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + input.readString(value_); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StringV clone() { + return new StringV().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StringV parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StringV(), data).checkInitialized(); + } + + public static StringV parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StringV(), input).checkInitialized(); + } + + public static StringV parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StringV(), input).checkInitialized(); + } + + /** + * @return factory for creating StringV messages + */ + public static MessageFactory getFactory() { + return StringVFactory.INSTANCE; + } + + private enum StringVFactory implements MessageFactory { + INSTANCE; + + @Override + public StringV create() { + return StringV.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName version = FieldName.forField("Version"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName value_ = FieldName.forField("Value"); + } + } + + /** + * Protobuf type {@code Bytes} + */ + public static final class Bytes extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes Value = 1; + */ + private final RepeatedByte value_ = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Bytes() { + } + + /** + * @return a new empty instance of {@code Bytes} + */ + public static Bytes newInstance() { + return new Bytes(); + } + + /** + * optional bytes Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes Value = 1; + * @return this + */ + public Bytes clearValue() { + bitField0_ &= ~0x00000001; + value_.clear(); + return this; + } + + /** + * optional bytes Value = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableValue()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getValue() { + return value_; + } + + /** + * optional bytes Value = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableValue() { + bitField0_ |= 0x00000001; + return value_; + } + + /** + * optional bytes Value = 1; + * @param value the value_ to add + * @return this + */ + public Bytes addValue(final byte value) { + bitField0_ |= 0x00000001; + value_.add(value); + return this; + } + + /** + * optional bytes Value = 1; + * @param values the value_ to add + * @return this + */ + public Bytes addAllValue(final byte... values) { + bitField0_ |= 0x00000001; + value_.addAll(values); + return this; + } + + /** + * optional bytes Value = 1; + * @param values the value_ to set + * @return this + */ + public Bytes setValue(final byte... values) { + bitField0_ |= 0x00000001; + value_.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Bytes clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Bytes addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Bytes addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Bytes setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Bytes copyFrom(final Bytes other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_.copyFrom(other.value_); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Bytes mergeFrom(final Bytes other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + getMutableValue().copyFrom(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Bytes clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_.clear(); + nextPackage.clear(); + return this; + } + + @Override + public Bytes clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Bytes)) { + return false; + } + Bytes other = (Bytes) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_.equals(other.value_)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeBytesNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Bytes mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // value_ + input.readBytes(value_); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Bytes mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + input.readBytes(value_); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Bytes clone() { + return new Bytes().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Bytes parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Bytes(), data).checkInitialized(); + } + + public static Bytes parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Bytes(), input).checkInitialized(); + } + + public static Bytes parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Bytes(), input).checkInitialized(); + } + + /** + * @return factory for creating Bytes messages + */ + public static MessageFactory getFactory() { + return BytesFactory.INSTANCE; + } + + private enum BytesFactory implements MessageFactory { + INSTANCE; + + @Override + public Bytes create() { + return Bytes.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code BytesV} + */ + public static final class BytesV extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Version = 2; + */ + private int version; + + /** + * optional bytes Value = 1; + */ + private final RepeatedByte value_ = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BytesV() { + } + + /** + * @return a new empty instance of {@code BytesV} + */ + public static BytesV newInstance() { + return new BytesV(); + } + + /** + * optional uint32 Version = 2; + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Version = 2; + * @return this + */ + public BytesV clearVersion() { + bitField0_ &= ~0x00000001; + version = 0; + return this; + } + + /** + * optional uint32 Version = 2; + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * optional uint32 Version = 2; + * @param value the version to set + * @return this + */ + public BytesV setVersion(final int value) { + bitField0_ |= 0x00000001; + version = value; + return this; + } + + /** + * optional bytes Value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes Value = 1; + * @return this + */ + public BytesV clearValue() { + bitField0_ &= ~0x00000002; + value_.clear(); + return this; + } + + /** + * optional bytes Value = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableValue()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getValue() { + return value_; + } + + /** + * optional bytes Value = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableValue() { + bitField0_ |= 0x00000002; + return value_; + } + + /** + * optional bytes Value = 1; + * @param value the value_ to add + * @return this + */ + public BytesV addValue(final byte value) { + bitField0_ |= 0x00000002; + value_.add(value); + return this; + } + + /** + * optional bytes Value = 1; + * @param values the value_ to add + * @return this + */ + public BytesV addAllValue(final byte... values) { + bitField0_ |= 0x00000002; + value_.addAll(values); + return this; + } + + /** + * optional bytes Value = 1; + * @param values the value_ to set + * @return this + */ + public BytesV setValue(final byte... values) { + bitField0_ |= 0x00000002; + value_.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BytesV clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BytesV addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BytesV addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BytesV setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BytesV copyFrom(final BytesV other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + version = other.version; + value_.copyFrom(other.value_); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BytesV mergeFrom(final BytesV other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasValue()) { + getMutableValue().copyFrom(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BytesV clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + version = 0; + value_.clear(); + nextPackage.clear(); + return this; + } + + @Override + public BytesV clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BytesV)) { + return false; + } + BytesV other = (BytesV) o; + return bitField0_ == other.bitField0_ + && (!hasVersion() || version == other.version) + && (!hasValue() || value_.equals(other.value_)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeBytesNoTag(value_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(value_); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BytesV mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // value_ + input.readBytes(value_); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BytesV mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + input.readBytes(value_); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BytesV clone() { + return new BytesV().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BytesV parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BytesV(), data).checkInitialized(); + } + + public static BytesV parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BytesV(), input).checkInitialized(); + } + + public static BytesV parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BytesV(), input).checkInitialized(); + } + + /** + * @return factory for creating BytesV messages + */ + public static MessageFactory getFactory() { + return BytesVFactory.INSTANCE; + } + + private enum BytesVFactory implements MessageFactory { + INSTANCE; + + @Override + public BytesV create() { + return BytesV.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName version = FieldName.forField("Version"); + + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Boolean} + */ + public static final class Boolean extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool Ok = 1; + */ + private boolean ok; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Boolean() { + } + + /** + * @return a new empty instance of {@code Boolean} + */ + public static Boolean newInstance() { + return new Boolean(); + } + + /** + * optional bool Ok = 1; + * @return whether the ok field is set + */ + public boolean hasOk() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool Ok = 1; + * @return this + */ + public Boolean clearOk() { + bitField0_ &= ~0x00000001; + ok = false; + return this; + } + + /** + * optional bool Ok = 1; + * @return the ok + */ + public boolean getOk() { + return ok; + } + + /** + * optional bool Ok = 1; + * @param value the ok to set + * @return this + */ + public Boolean setOk(final boolean value) { + bitField0_ |= 0x00000001; + ok = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Boolean clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Boolean addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Boolean addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Boolean setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Boolean copyFrom(final Boolean other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + ok = other.ok; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Boolean mergeFrom(final Boolean other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOk()) { + setOk(other.ok); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Boolean clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + ok = false; + nextPackage.clear(); + return this; + } + + @Override + public Boolean clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Boolean)) { + return false; + } + Boolean other = (Boolean) o; + return bitField0_ == other.bitField0_ + && (!hasOk() || ok == other.ok) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(ok); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Boolean mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // ok + ok = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.ok, ok); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Boolean mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2556: { + if (input.isAtField(FieldNames.ok)) { + if (!input.trySkipNullValue()) { + ok = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Boolean clone() { + return new Boolean().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Boolean parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Boolean(), data).checkInitialized(); + } + + public static Boolean parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Boolean(), input).checkInitialized(); + } + + public static Boolean parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Boolean(), input).checkInitialized(); + } + + /** + * @return factory for creating Boolean messages + */ + public static MessageFactory getFactory() { + return BooleanFactory.INSTANCE; + } + + private enum BooleanFactory implements MessageFactory { + INSTANCE; + + @Override + public Boolean create() { + return Boolean.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName ok = FieldName.forField("Ok"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Error} + */ + public static final class Error extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 TraceId = 3; + */ + private long traceId; + + /** + * optional int32 Action = 4; + */ + private int action; + + /** + * optional uint32 Code = 1; + */ + private int code; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated string Arguments = 2; + */ + private final RepeatedString arguments = RepeatedString.newEmptyInstance(); + + private Error() { + } + + /** + * @return a new empty instance of {@code Error} + */ + public static Error newInstance() { + return new Error(); + } + + /** + * optional uint64 TraceId = 3; + * @return whether the traceId field is set + */ + public boolean hasTraceId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 TraceId = 3; + * @return this + */ + public Error clearTraceId() { + bitField0_ &= ~0x00000001; + traceId = 0L; + return this; + } + + /** + * optional uint64 TraceId = 3; + * @return the traceId + */ + public long getTraceId() { + return traceId; + } + + /** + * optional uint64 TraceId = 3; + * @param value the traceId to set + * @return this + */ + public Error setTraceId(final long value) { + bitField0_ |= 0x00000001; + traceId = value; + return this; + } + + /** + * optional int32 Action = 4; + * @return whether the action field is set + */ + public boolean hasAction() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int32 Action = 4; + * @return this + */ + public Error clearAction() { + bitField0_ &= ~0x00000002; + action = 0; + return this; + } + + /** + * optional int32 Action = 4; + * @return the action + */ + public int getAction() { + return action; + } + + /** + * optional int32 Action = 4; + * @param value the action to set + * @return this + */ + public Error setAction(final int value) { + bitField0_ |= 0x00000002; + action = value; + return this; + } + + /** + * optional uint32 Code = 1; + * @return whether the code field is set + */ + public boolean hasCode() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Code = 1; + * @return this + */ + public Error clearCode() { + bitField0_ &= ~0x00000004; + code = 0; + return this; + } + + /** + * optional uint32 Code = 1; + * @return the code + */ + public int getCode() { + return code; + } + + /** + * optional uint32 Code = 1; + * @param value the code to set + * @return this + */ + public Error setCode(final int value) { + bitField0_ |= 0x00000004; + code = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Error clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Error addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Error addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Error setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated string Arguments = 2; + * @return whether the arguments field is set + */ + public boolean hasArguments() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated string Arguments = 2; + * @return this + */ + public Error clearArguments() { + bitField0_ &= ~0x00000010; + arguments.clear(); + return this; + } + + /** + * repeated string Arguments = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableArguments()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedString getArguments() { + return arguments; + } + + /** + * repeated string Arguments = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedString getMutableArguments() { + bitField0_ |= 0x00000010; + return arguments; + } + + /** + * repeated string Arguments = 2; + * @param value the arguments to add + * @return this + */ + public Error addArguments(final CharSequence value) { + bitField0_ |= 0x00000010; + arguments.add(value); + return this; + } + + /** + * repeated string Arguments = 2; + * @param values the arguments to add + * @return this + */ + public Error addAllArguments(final CharSequence... values) { + bitField0_ |= 0x00000010; + arguments.addAll(values); + return this; + } + + @Override + public Error copyFrom(final Error other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + traceId = other.traceId; + action = other.action; + code = other.code; + nextPackage.copyFrom(other.nextPackage); + arguments.copyFrom(other.arguments); + } + return this; + } + + @Override + public Error mergeFrom(final Error other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTraceId()) { + setTraceId(other.traceId); + } + if (other.hasAction()) { + setAction(other.action); + } + if (other.hasCode()) { + setCode(other.code); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasArguments()) { + getMutableArguments().addAll(other.arguments); + } + return this; + } + + @Override + public Error clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + traceId = 0L; + action = 0; + code = 0; + nextPackage.clear(); + arguments.clear(); + return this; + } + + @Override + public Error clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + arguments.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Error)) { + return false; + } + Error other = (Error) o; + return bitField0_ == other.bitField0_ + && (!hasTraceId() || traceId == other.traceId) + && (!hasAction() || action == other.action) + && (!hasCode() || code == other.code) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasArguments() || arguments.equals(other.arguments)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(traceId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeInt32NoTag(action); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(code); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < arguments.length(); i++) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(arguments.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(traceId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(action); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(code); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * arguments.length()) + ProtoSink.computeRepeatedStringSizeNoTag(arguments); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Error mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // traceId + traceId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // action + action = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // code + code = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // arguments + tag = input.readRepeatedString(arguments, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.traceId, traceId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.action, action); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.code, code); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedString(FieldNames.arguments, arguments); + } + output.endObject(); + } + + @Override + public Error mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 597251360: { + if (input.isAtField(FieldNames.traceId)) { + if (!input.trySkipNullValue()) { + traceId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1955883606: { + if (input.isAtField(FieldNames.action)) { + if (!input.trySkipNullValue()) { + action = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2105869: { + if (input.isAtField(FieldNames.code)) { + if (!input.trySkipNullValue()) { + code = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -31549130: { + if (input.isAtField(FieldNames.arguments)) { + if (!input.trySkipNullValue()) { + input.readRepeatedString(arguments); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Error clone() { + return new Error().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Error parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Error(), data).checkInitialized(); + } + + public static Error parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Error(), input).checkInitialized(); + } + + public static Error parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Error(), input).checkInitialized(); + } + + /** + * @return factory for creating Error messages + */ + public static MessageFactory getFactory() { + return ErrorFactory.INSTANCE; + } + + private enum ErrorFactory implements MessageFactory { + INSTANCE; + + @Override + public Error create() { + return Error.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName traceId = FieldName.forField("TraceId"); + + static final FieldName action = FieldName.forField("Action"); + + static final FieldName code = FieldName.forField("Code"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName arguments = FieldName.forField("Arguments"); + } + } + + /** + * Protobuf type {@code AccInfo} + */ + public static final class AccInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 CreateTime = 15; + */ + private long createTime; + + /** + * optional uint64 Id = 1; + */ + private long id; + + /** + * optional uint32 Hashtag = 3; + */ + private int hashtag; + + /** + * optional uint32 HeadIcon = 4; + */ + private int headIcon; + + /** + * optional uint32 TitlePrefix = 7; + */ + private int titlePrefix; + + /** + * optional uint32 TitleSuffix = 8; + */ + private int titleSuffix; + + /** + * optional uint32 SkinId = 10; + */ + private int skinId; + + /** + * optional bool Gender = 5; + */ + private boolean gender; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string NickName = 2; + */ + private final Utf8String nickName = Utf8String.newEmptyInstance(); + + /** + * optional string Signature = 6; + */ + private final Utf8String signature = Utf8String.newEmptyInstance(); + + /** + * repeated .CharShow Chars = 9; + */ + private final RepeatedMessage chars = RepeatedMessage.newEmptyInstance(CharShow.getFactory()); + + /** + * repeated .NewbieInfo Newbies = 14; + */ + private final RepeatedMessage newbies = RepeatedMessage.newEmptyInstance(NewbieInfo.getFactory()); + + private AccInfo() { + } + + /** + * @return a new empty instance of {@code AccInfo} + */ + public static AccInfo newInstance() { + return new AccInfo(); + } + + /** + * optional int64 CreateTime = 15; + * @return whether the createTime field is set + */ + public boolean hasCreateTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 CreateTime = 15; + * @return this + */ + public AccInfo clearCreateTime() { + bitField0_ &= ~0x00000001; + createTime = 0L; + return this; + } + + /** + * optional int64 CreateTime = 15; + * @return the createTime + */ + public long getCreateTime() { + return createTime; + } + + /** + * optional int64 CreateTime = 15; + * @param value the createTime to set + * @return this + */ + public AccInfo setCreateTime(final long value) { + bitField0_ |= 0x00000001; + createTime = value; + return this; + } + + /** + * optional uint64 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint64 Id = 1; + * @return this + */ + public AccInfo clearId() { + bitField0_ &= ~0x00000002; + id = 0L; + return this; + } + + /** + * optional uint64 Id = 1; + * @return the id + */ + public long getId() { + return id; + } + + /** + * optional uint64 Id = 1; + * @param value the id to set + * @return this + */ + public AccInfo setId(final long value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 Hashtag = 3; + * @return whether the hashtag field is set + */ + public boolean hasHashtag() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Hashtag = 3; + * @return this + */ + public AccInfo clearHashtag() { + bitField0_ &= ~0x00000004; + hashtag = 0; + return this; + } + + /** + * optional uint32 Hashtag = 3; + * @return the hashtag + */ + public int getHashtag() { + return hashtag; + } + + /** + * optional uint32 Hashtag = 3; + * @param value the hashtag to set + * @return this + */ + public AccInfo setHashtag(final int value) { + bitField0_ |= 0x00000004; + hashtag = value; + return this; + } + + /** + * optional uint32 HeadIcon = 4; + * @return whether the headIcon field is set + */ + public boolean hasHeadIcon() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 HeadIcon = 4; + * @return this + */ + public AccInfo clearHeadIcon() { + bitField0_ &= ~0x00000008; + headIcon = 0; + return this; + } + + /** + * optional uint32 HeadIcon = 4; + * @return the headIcon + */ + public int getHeadIcon() { + return headIcon; + } + + /** + * optional uint32 HeadIcon = 4; + * @param value the headIcon to set + * @return this + */ + public AccInfo setHeadIcon(final int value) { + bitField0_ |= 0x00000008; + headIcon = value; + return this; + } + + /** + * optional uint32 TitlePrefix = 7; + * @return whether the titlePrefix field is set + */ + public boolean hasTitlePrefix() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 TitlePrefix = 7; + * @return this + */ + public AccInfo clearTitlePrefix() { + bitField0_ &= ~0x00000010; + titlePrefix = 0; + return this; + } + + /** + * optional uint32 TitlePrefix = 7; + * @return the titlePrefix + */ + public int getTitlePrefix() { + return titlePrefix; + } + + /** + * optional uint32 TitlePrefix = 7; + * @param value the titlePrefix to set + * @return this + */ + public AccInfo setTitlePrefix(final int value) { + bitField0_ |= 0x00000010; + titlePrefix = value; + return this; + } + + /** + * optional uint32 TitleSuffix = 8; + * @return whether the titleSuffix field is set + */ + public boolean hasTitleSuffix() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 TitleSuffix = 8; + * @return this + */ + public AccInfo clearTitleSuffix() { + bitField0_ &= ~0x00000020; + titleSuffix = 0; + return this; + } + + /** + * optional uint32 TitleSuffix = 8; + * @return the titleSuffix + */ + public int getTitleSuffix() { + return titleSuffix; + } + + /** + * optional uint32 TitleSuffix = 8; + * @param value the titleSuffix to set + * @return this + */ + public AccInfo setTitleSuffix(final int value) { + bitField0_ |= 0x00000020; + titleSuffix = value; + return this; + } + + /** + * optional uint32 SkinId = 10; + * @return whether the skinId field is set + */ + public boolean hasSkinId() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional uint32 SkinId = 10; + * @return this + */ + public AccInfo clearSkinId() { + bitField0_ &= ~0x00000040; + skinId = 0; + return this; + } + + /** + * optional uint32 SkinId = 10; + * @return the skinId + */ + public int getSkinId() { + return skinId; + } + + /** + * optional uint32 SkinId = 10; + * @param value the skinId to set + * @return this + */ + public AccInfo setSkinId(final int value) { + bitField0_ |= 0x00000040; + skinId = value; + return this; + } + + /** + * optional bool Gender = 5; + * @return whether the gender field is set + */ + public boolean hasGender() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional bool Gender = 5; + * @return this + */ + public AccInfo clearGender() { + bitField0_ &= ~0x00000080; + gender = false; + return this; + } + + /** + * optional bool Gender = 5; + * @return the gender + */ + public boolean getGender() { + return gender; + } + + /** + * optional bool Gender = 5; + * @param value the gender to set + * @return this + */ + public AccInfo setGender(final boolean value) { + bitField0_ |= 0x00000080; + gender = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AccInfo clearNextPackage() { + bitField0_ &= ~0x00000100; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000100; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AccInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000100; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AccInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AccInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string NickName = 2; + * @return whether the nickName field is set + */ + public boolean hasNickName() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional string NickName = 2; + * @return this + */ + public AccInfo clearNickName() { + bitField0_ &= ~0x00000200; + nickName.clear(); + return this; + } + + /** + * optional string NickName = 2; + * @return the nickName + */ + public java.lang.String getNickName() { + return nickName.getString(); + } + + /** + * optional string NickName = 2; + * @return internal {@code Utf8String} representation of nickName for reading + */ + public Utf8String getNickNameBytes() { + return this.nickName; + } + + /** + * optional string NickName = 2; + * @return internal {@code Utf8String} representation of nickName for modifications + */ + public Utf8String getMutableNickNameBytes() { + bitField0_ |= 0x00000200; + return this.nickName; + } + + /** + * optional string NickName = 2; + * @param value the nickName to set + * @return this + */ + public AccInfo setNickName(final CharSequence value) { + bitField0_ |= 0x00000200; + nickName.copyFrom(value); + return this; + } + + /** + * optional string NickName = 2; + * @param value the nickName to set + * @return this + */ + public AccInfo setNickName(final Utf8String value) { + bitField0_ |= 0x00000200; + nickName.copyFrom(value); + return this; + } + + /** + * optional string Signature = 6; + * @return whether the signature field is set + */ + public boolean hasSignature() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * optional string Signature = 6; + * @return this + */ + public AccInfo clearSignature() { + bitField0_ &= ~0x00000400; + signature.clear(); + return this; + } + + /** + * optional string Signature = 6; + * @return the signature + */ + public java.lang.String getSignature() { + return signature.getString(); + } + + /** + * optional string Signature = 6; + * @return internal {@code Utf8String} representation of signature for reading + */ + public Utf8String getSignatureBytes() { + return this.signature; + } + + /** + * optional string Signature = 6; + * @return internal {@code Utf8String} representation of signature for modifications + */ + public Utf8String getMutableSignatureBytes() { + bitField0_ |= 0x00000400; + return this.signature; + } + + /** + * optional string Signature = 6; + * @param value the signature to set + * @return this + */ + public AccInfo setSignature(final CharSequence value) { + bitField0_ |= 0x00000400; + signature.copyFrom(value); + return this; + } + + /** + * optional string Signature = 6; + * @param value the signature to set + * @return this + */ + public AccInfo setSignature(final Utf8String value) { + bitField0_ |= 0x00000400; + signature.copyFrom(value); + return this; + } + + /** + * repeated .CharShow Chars = 9; + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * repeated .CharShow Chars = 9; + * @return this + */ + public AccInfo clearChars() { + bitField0_ &= ~0x00000800; + chars.clear(); + return this; + } + + /** + * repeated .CharShow Chars = 9; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getChars() { + return chars; + } + + /** + * repeated .CharShow Chars = 9; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableChars() { + bitField0_ |= 0x00000800; + return chars; + } + + /** + * repeated .CharShow Chars = 9; + * @param value the chars to add + * @return this + */ + public AccInfo addChars(final CharShow value) { + bitField0_ |= 0x00000800; + chars.add(value); + return this; + } + + /** + * repeated .CharShow Chars = 9; + * @param values the chars to add + * @return this + */ + public AccInfo addAllChars(final CharShow... values) { + bitField0_ |= 0x00000800; + chars.addAll(values); + return this; + } + + /** + * repeated .NewbieInfo Newbies = 14; + * @return whether the newbies field is set + */ + public boolean hasNewbies() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * repeated .NewbieInfo Newbies = 14; + * @return this + */ + public AccInfo clearNewbies() { + bitField0_ &= ~0x00001000; + newbies.clear(); + return this; + } + + /** + * repeated .NewbieInfo Newbies = 14; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNewbies()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getNewbies() { + return newbies; + } + + /** + * repeated .NewbieInfo Newbies = 14; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableNewbies() { + bitField0_ |= 0x00001000; + return newbies; + } + + /** + * repeated .NewbieInfo Newbies = 14; + * @param value the newbies to add + * @return this + */ + public AccInfo addNewbies(final NewbieInfo value) { + bitField0_ |= 0x00001000; + newbies.add(value); + return this; + } + + /** + * repeated .NewbieInfo Newbies = 14; + * @param values the newbies to add + * @return this + */ + public AccInfo addAllNewbies(final NewbieInfo... values) { + bitField0_ |= 0x00001000; + newbies.addAll(values); + return this; + } + + @Override + public AccInfo copyFrom(final AccInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + createTime = other.createTime; + id = other.id; + hashtag = other.hashtag; + headIcon = other.headIcon; + titlePrefix = other.titlePrefix; + titleSuffix = other.titleSuffix; + skinId = other.skinId; + gender = other.gender; + nextPackage.copyFrom(other.nextPackage); + nickName.copyFrom(other.nickName); + signature.copyFrom(other.signature); + chars.copyFrom(other.chars); + newbies.copyFrom(other.newbies); + } + return this; + } + + @Override + public AccInfo mergeFrom(final AccInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCreateTime()) { + setCreateTime(other.createTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasHashtag()) { + setHashtag(other.hashtag); + } + if (other.hasHeadIcon()) { + setHeadIcon(other.headIcon); + } + if (other.hasTitlePrefix()) { + setTitlePrefix(other.titlePrefix); + } + if (other.hasTitleSuffix()) { + setTitleSuffix(other.titleSuffix); + } + if (other.hasSkinId()) { + setSkinId(other.skinId); + } + if (other.hasGender()) { + setGender(other.gender); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNickName()) { + getMutableNickNameBytes().copyFrom(other.nickName); + } + if (other.hasSignature()) { + getMutableSignatureBytes().copyFrom(other.signature); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + if (other.hasNewbies()) { + getMutableNewbies().addAll(other.newbies); + } + return this; + } + + @Override + public AccInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + createTime = 0L; + id = 0L; + hashtag = 0; + headIcon = 0; + titlePrefix = 0; + titleSuffix = 0; + skinId = 0; + gender = false; + nextPackage.clear(); + nickName.clear(); + signature.clear(); + chars.clear(); + newbies.clear(); + return this; + } + + @Override + public AccInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + nickName.clear(); + signature.clear(); + chars.clearQuick(); + newbies.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AccInfo)) { + return false; + } + AccInfo other = (AccInfo) o; + return bitField0_ == other.bitField0_ + && (!hasCreateTime() || createTime == other.createTime) + && (!hasId() || id == other.id) + && (!hasHashtag() || hashtag == other.hashtag) + && (!hasHeadIcon() || headIcon == other.headIcon) + && (!hasTitlePrefix() || titlePrefix == other.titlePrefix) + && (!hasTitleSuffix() || titleSuffix == other.titleSuffix) + && (!hasSkinId() || skinId == other.skinId) + && (!hasGender() || gender == other.gender) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNickName() || nickName.equals(other.nickName)) + && (!hasSignature() || signature.equals(other.signature)) + && (!hasChars() || chars.equals(other.chars)) + && (!hasNewbies() || newbies.equals(other.newbies)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 120); + output.writeInt64NoTag(createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(hashtag); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(headIcon); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(titlePrefix); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(titleSuffix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(skinId); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 40); + output.writeBoolNoTag(gender); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(nickName); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 50); + output.writeStringNoTag(signature); + } + if ((bitField0_ & 0x00000800) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(chars.get(i)); + } + } + if ((bitField0_ & 0x00001000) != 0) { + for (int i = 0; i < newbies.length(); i++) { + output.writeRawByte((byte) 114); + output.writeMessageNoTag(newbies.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(hashtag); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titlePrefix); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titleSuffix); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skinId); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(nickName); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(signature); + } + if ((bitField0_ & 0x00000800) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + if ((bitField0_ & 0x00001000) != 0) { + size += (1 * newbies.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(newbies); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AccInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 120: { + // createTime + createTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // hashtag + hashtag = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // headIcon + headIcon = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // titlePrefix + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // titleSuffix + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 80) { + break; + } + } + case 80: { + // skinId + skinId = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // gender + gender = input.readBool(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // nickName + input.readString(nickName); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // signature + input.readString(signature); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x00000800; + if (tag != 114) { + break; + } + } + case 114: { + // newbies + tag = input.readRepeatedMessage(newbies, tag); + bitField0_ |= 0x00001000; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.createTime, createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.hashtag, hashtag); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.headIcon, headIcon); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.titlePrefix, titlePrefix); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.titleSuffix, titleSuffix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.skinId, skinId); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBool(FieldNames.gender, gender); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeString(FieldNames.nickName, nickName); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeString(FieldNames.signature, signature); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRepeatedMessage(FieldNames.newbies, newbies); + } + output.endObject(); + } + + @Override + public AccInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -932289015: { + if (input.isAtField(FieldNames.createTime)) { + if (!input.trySkipNullValue()) { + createTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1932766292: { + if (input.isAtField(FieldNames.hashtag)) { + if (!input.trySkipNullValue()) { + hashtag = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1051463015: { + if (input.isAtField(FieldNames.headIcon)) { + if (!input.trySkipNullValue()) { + headIcon = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2096776938: { + if (input.isAtField(FieldNames.titlePrefix)) { + if (!input.trySkipNullValue()) { + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2109502551: { + if (input.isAtField(FieldNames.titleSuffix)) { + if (!input.trySkipNullValue()) { + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1816694888: { + if (input.isAtField(FieldNames.skinId)) { + if (!input.trySkipNullValue()) { + skinId = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2129321697: { + if (input.isAtField(FieldNames.gender)) { + if (!input.trySkipNullValue()) { + gender = input.readBool(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 134381742: { + if (input.isAtField(FieldNames.nickName)) { + if (!input.trySkipNullValue()) { + input.readString(nickName); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1217415016: { + if (input.isAtField(FieldNames.signature)) { + if (!input.trySkipNullValue()) { + input.readString(signature); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case -784689995: { + if (input.isAtField(FieldNames.newbies)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(newbies); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AccInfo clone() { + return new AccInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AccInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AccInfo(), data).checkInitialized(); + } + + public static AccInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AccInfo(), input).checkInitialized(); + } + + public static AccInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AccInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating AccInfo messages + */ + public static MessageFactory getFactory() { + return AccInfoFactory.INSTANCE; + } + + private enum AccInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public AccInfo create() { + return AccInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName createTime = FieldName.forField("CreateTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName hashtag = FieldName.forField("Hashtag"); + + static final FieldName headIcon = FieldName.forField("HeadIcon"); + + static final FieldName titlePrefix = FieldName.forField("TitlePrefix"); + + static final FieldName titleSuffix = FieldName.forField("TitleSuffix"); + + static final FieldName skinId = FieldName.forField("SkinId"); + + static final FieldName gender = FieldName.forField("Gender"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nickName = FieldName.forField("NickName"); + + static final FieldName signature = FieldName.forField("Signature"); + + static final FieldName chars = FieldName.forField("Chars"); + + static final FieldName newbies = FieldName.forField("Newbies"); + } + } + + /** + * Protobuf type {@code NewbieInfo} + */ + public static final class NewbieInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 StepId = 2; + */ + private int stepId; + + /** + * optional uint32 GroupId = 1; + */ + private int groupId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private NewbieInfo() { + } + + /** + * @return a new empty instance of {@code NewbieInfo} + */ + public static NewbieInfo newInstance() { + return new NewbieInfo(); + } + + /** + * optional int32 StepId = 2; + * @return whether the stepId field is set + */ + public boolean hasStepId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 StepId = 2; + * @return this + */ + public NewbieInfo clearStepId() { + bitField0_ &= ~0x00000001; + stepId = 0; + return this; + } + + /** + * optional int32 StepId = 2; + * @return the stepId + */ + public int getStepId() { + return stepId; + } + + /** + * optional int32 StepId = 2; + * @param value the stepId to set + * @return this + */ + public NewbieInfo setStepId(final int value) { + bitField0_ |= 0x00000001; + stepId = value; + return this; + } + + /** + * optional uint32 GroupId = 1; + * @return whether the groupId field is set + */ + public boolean hasGroupId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 GroupId = 1; + * @return this + */ + public NewbieInfo clearGroupId() { + bitField0_ &= ~0x00000002; + groupId = 0; + return this; + } + + /** + * optional uint32 GroupId = 1; + * @return the groupId + */ + public int getGroupId() { + return groupId; + } + + /** + * optional uint32 GroupId = 1; + * @param value the groupId to set + * @return this + */ + public NewbieInfo setGroupId(final int value) { + bitField0_ |= 0x00000002; + groupId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public NewbieInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public NewbieInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public NewbieInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public NewbieInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public NewbieInfo copyFrom(final NewbieInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + stepId = other.stepId; + groupId = other.groupId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NewbieInfo mergeFrom(final NewbieInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStepId()) { + setStepId(other.stepId); + } + if (other.hasGroupId()) { + setGroupId(other.groupId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NewbieInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + stepId = 0; + groupId = 0; + nextPackage.clear(); + return this; + } + + @Override + public NewbieInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NewbieInfo)) { + return false; + } + NewbieInfo other = (NewbieInfo) o; + return bitField0_ == other.bitField0_ + && (!hasStepId() || stepId == other.stepId) + && (!hasGroupId() || groupId == other.groupId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(stepId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(stepId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NewbieInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // stepId + stepId = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // groupId + groupId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.stepId, stepId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.groupId, groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public NewbieInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1808500441: { + if (input.isAtField(FieldNames.stepId)) { + if (!input.trySkipNullValue()) { + stepId = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1958081498: { + if (input.isAtField(FieldNames.groupId)) { + if (!input.trySkipNullValue()) { + groupId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NewbieInfo clone() { + return new NewbieInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NewbieInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NewbieInfo(), data).checkInitialized(); + } + + public static NewbieInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NewbieInfo(), input).checkInitialized(); + } + + public static NewbieInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NewbieInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating NewbieInfo messages + */ + public static MessageFactory getFactory() { + return NewbieInfoFactory.INSTANCE; + } + + private enum NewbieInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public NewbieInfo create() { + return NewbieInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName stepId = FieldName.forField("StepId"); + + static final FieldName groupId = FieldName.forField("GroupId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code QuestProgress} + */ + public static final class QuestProgress extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Cur = 1; + */ + private int cur; + + /** + * optional uint32 Max = 2; + */ + private int max; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private QuestProgress() { + } + + /** + * @return a new empty instance of {@code QuestProgress} + */ + public static QuestProgress newInstance() { + return new QuestProgress(); + } + + /** + * optional uint32 Cur = 1; + * @return whether the cur field is set + */ + public boolean hasCur() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Cur = 1; + * @return this + */ + public QuestProgress clearCur() { + bitField0_ &= ~0x00000001; + cur = 0; + return this; + } + + /** + * optional uint32 Cur = 1; + * @return the cur + */ + public int getCur() { + return cur; + } + + /** + * optional uint32 Cur = 1; + * @param value the cur to set + * @return this + */ + public QuestProgress setCur(final int value) { + bitField0_ |= 0x00000001; + cur = value; + return this; + } + + /** + * optional uint32 Max = 2; + * @return whether the max field is set + */ + public boolean hasMax() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Max = 2; + * @return this + */ + public QuestProgress clearMax() { + bitField0_ &= ~0x00000002; + max = 0; + return this; + } + + /** + * optional uint32 Max = 2; + * @return the max + */ + public int getMax() { + return max; + } + + /** + * optional uint32 Max = 2; + * @param value the max to set + * @return this + */ + public QuestProgress setMax(final int value) { + bitField0_ |= 0x00000002; + max = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public QuestProgress clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public QuestProgress addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public QuestProgress addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public QuestProgress setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public QuestProgress copyFrom(final QuestProgress other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + cur = other.cur; + max = other.max; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public QuestProgress mergeFrom(final QuestProgress other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCur()) { + setCur(other.cur); + } + if (other.hasMax()) { + setMax(other.max); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public QuestProgress clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + cur = 0; + max = 0; + nextPackage.clear(); + return this; + } + + @Override + public QuestProgress clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof QuestProgress)) { + return false; + } + QuestProgress other = (QuestProgress) o; + return bitField0_ == other.bitField0_ + && (!hasCur() || cur == other.cur) + && (!hasMax() || max == other.max) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(cur); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(max); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(cur); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(max); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public QuestProgress mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // cur + cur = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // max + max = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.cur, cur); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.max, max); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public QuestProgress mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 68128: { + if (input.isAtField(FieldNames.cur)) { + if (!input.trySkipNullValue()) { + cur = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 77124: { + if (input.isAtField(FieldNames.max)) { + if (!input.trySkipNullValue()) { + max = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public QuestProgress clone() { + return new QuestProgress().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static QuestProgress parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new QuestProgress(), data).checkInitialized(); + } + + public static QuestProgress parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new QuestProgress(), input).checkInitialized(); + } + + public static QuestProgress parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new QuestProgress(), input).checkInitialized(); + } + + /** + * @return factory for creating QuestProgress messages + */ + public static MessageFactory getFactory() { + return QuestProgressFactory.INSTANCE; + } + + private enum QuestProgressFactory implements MessageFactory { + INSTANCE; + + @Override + public QuestProgress create() { + return QuestProgress.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName cur = FieldName.forField("Cur"); + + static final FieldName max = FieldName.forField("Max"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Quest} + */ + public static final class Quest extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Expire = 3; + */ + private long expire; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Status = 2; + */ + private int status; + + /** + * optional .QuestType Type = 4; + */ + private int type; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .QuestProgress Progress = 15; + */ + private final RepeatedMessage progress = RepeatedMessage.newEmptyInstance(QuestProgress.getFactory()); + + private Quest() { + } + + /** + * @return a new empty instance of {@code Quest} + */ + public static Quest newInstance() { + return new Quest(); + } + + /** + * optional int64 Expire = 3; + * @return whether the expire field is set + */ + public boolean hasExpire() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Expire = 3; + * @return this + */ + public Quest clearExpire() { + bitField0_ &= ~0x00000001; + expire = 0L; + return this; + } + + /** + * optional int64 Expire = 3; + * @return the expire + */ + public long getExpire() { + return expire; + } + + /** + * optional int64 Expire = 3; + * @param value the expire to set + * @return this + */ + public Quest setExpire(final long value) { + bitField0_ |= 0x00000001; + expire = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public Quest clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public Quest setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 Status = 2; + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Status = 2; + * @return this + */ + public Quest clearStatus() { + bitField0_ &= ~0x00000004; + status = 0; + return this; + } + + /** + * optional uint32 Status = 2; + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * optional uint32 Status = 2; + * @param value the status to set + * @return this + */ + public Quest setStatus(final int value) { + bitField0_ |= 0x00000004; + status = value; + return this; + } + + /** + * optional .QuestType Type = 4; + * @return whether the type field is set + */ + public boolean hasType() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .QuestType Type = 4; + * @return this + */ + public Quest clearType() { + bitField0_ &= ~0x00000008; + type = 0; + return this; + } + + /** + * optional .QuestType Type = 4; + * @return the type + */ + public QuestType getType() { + return QuestType.forNumber(type); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link Quest#getType()}.getNumber(). + * + * @return numeric wire representation + */ + public int getTypeValue() { + return type; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link QuestType}. Setting an invalid value + * can cause {@link Quest#getType()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public Quest setTypeValue(final int value) { + bitField0_ |= 0x00000008; + type = value; + return this; + } + + /** + * optional .QuestType Type = 4; + * @param value the type to set + * @return this + */ + public Quest setType(final QuestType value) { + bitField0_ |= 0x00000008; + type = value.getNumber(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Quest clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Quest addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Quest addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Quest setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .QuestProgress Progress = 15; + * @return whether the progress field is set + */ + public boolean hasProgress() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * repeated .QuestProgress Progress = 15; + * @return this + */ + public Quest clearProgress() { + bitField0_ &= ~0x00000020; + progress.clear(); + return this; + } + + /** + * repeated .QuestProgress Progress = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableProgress()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getProgress() { + return progress; + } + + /** + * repeated .QuestProgress Progress = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableProgress() { + bitField0_ |= 0x00000020; + return progress; + } + + /** + * repeated .QuestProgress Progress = 15; + * @param value the progress to add + * @return this + */ + public Quest addProgress(final QuestProgress value) { + bitField0_ |= 0x00000020; + progress.add(value); + return this; + } + + /** + * repeated .QuestProgress Progress = 15; + * @param values the progress to add + * @return this + */ + public Quest addAllProgress(final QuestProgress... values) { + bitField0_ |= 0x00000020; + progress.addAll(values); + return this; + } + + @Override + public Quest copyFrom(final Quest other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + expire = other.expire; + id = other.id; + status = other.status; + type = other.type; + nextPackage.copyFrom(other.nextPackage); + progress.copyFrom(other.progress); + } + return this; + } + + @Override + public Quest mergeFrom(final Quest other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExpire()) { + setExpire(other.expire); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStatus()) { + setStatus(other.status); + } + if (other.hasType()) { + setTypeValue(other.type); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasProgress()) { + getMutableProgress().addAll(other.progress); + } + return this; + } + + @Override + public Quest clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + expire = 0L; + id = 0; + status = 0; + type = 0; + nextPackage.clear(); + progress.clear(); + return this; + } + + @Override + public Quest clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + progress.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Quest)) { + return false; + } + Quest other = (Quest) o; + return bitField0_ == other.bitField0_ + && (!hasExpire() || expire == other.expire) + && (!hasId() || id == other.id) + && (!hasStatus() || status == other.status) + && (!hasType() || type == other.type) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasProgress() || progress.equals(other.progress)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(expire); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(status); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeEnumNoTag(type); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < progress.length(); i++) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(progress.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(expire); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(status); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(type); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * progress.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(progress); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Quest mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // expire + expire = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // status + status = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // type + final int value = input.readInt32(); + if (QuestType.forNumber(value) != null) { + type = value; + bitField0_ |= 0x00000008; + } + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // progress + tag = input.readRepeatedMessage(progress, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.expire, expire); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.status, status); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeEnum(FieldNames.type, type, QuestType.converter()); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.progress, progress); + } + output.endObject(); + } + + @Override + public Quest mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2089675071: { + if (input.isAtField(FieldNames.expire)) { + if (!input.trySkipNullValue()) { + expire = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1808614382: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + status = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2622298: { + if (input.isAtField(FieldNames.type)) { + if (!input.trySkipNullValue()) { + final QuestType value = input.readEnum(QuestType.converter()); + if (value != null) { + type = value.getNumber(); + bitField0_ |= 0x00000008; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -936434099: { + if (input.isAtField(FieldNames.progress)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(progress); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Quest clone() { + return new Quest().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Quest parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Quest(), data).checkInitialized(); + } + + public static Quest parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Quest(), input).checkInitialized(); + } + + public static Quest parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Quest(), input).checkInitialized(); + } + + /** + * @return factory for creating Quest messages + */ + public static MessageFactory getFactory() { + return QuestFactory.INSTANCE; + } + + private enum QuestFactory implements MessageFactory { + INSTANCE; + + @Override + public Quest create() { + return Quest.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName expire = FieldName.forField("Expire"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName status = FieldName.forField("Status"); + + static final FieldName type = FieldName.forField("Type"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName progress = FieldName.forField("Progress"); + } + } + + /** + * Protobuf type {@code Quests} + */ + public static final class Quests extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Quest List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Quest.getFactory()); + + private Quests() { + } + + /** + * @return a new empty instance of {@code Quests} + */ + public static Quests newInstance() { + return new Quests(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Quests clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Quests addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Quests addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Quests setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Quest List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Quest List = 1; + * @return this + */ + public Quests clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .Quest List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .Quest List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .Quest List = 1; + * @param value the list to add + * @return this + */ + public Quests addList(final Quest value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .Quest List = 1; + * @param values the list to add + * @return this + */ + public Quests addAllList(final Quest... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public Quests copyFrom(final Quests other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public Quests mergeFrom(final Quests other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public Quests clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public Quests clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Quests)) { + return false; + } + Quests other = (Quests) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Quests mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public Quests mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Quests clone() { + return new Quests().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Quests parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Quests(), data).checkInitialized(); + } + + public static Quests parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Quests(), input).checkInitialized(); + } + + public static Quests parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Quests(), input).checkInitialized(); + } + + /** + * @return factory for creating Quests messages + */ + public static MessageFactory getFactory() { + return QuestsFactory.INSTANCE; + } + + private enum QuestsFactory implements MessageFactory { + INSTANCE; + + @Override + public Quests create() { + return Quests.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code Achievement} + */ + public static final class Achievement extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Completed = 3; + */ + private long completed; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 Status = 2; + */ + private int status; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .QuestProgress Progress = 4; + */ + private final RepeatedMessage progress = RepeatedMessage.newEmptyInstance(QuestProgress.getFactory()); + + private Achievement() { + } + + /** + * @return a new empty instance of {@code Achievement} + */ + public static Achievement newInstance() { + return new Achievement(); + } + + /** + * optional int64 Completed = 3; + * @return whether the completed field is set + */ + public boolean hasCompleted() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Completed = 3; + * @return this + */ + public Achievement clearCompleted() { + bitField0_ &= ~0x00000001; + completed = 0L; + return this; + } + + /** + * optional int64 Completed = 3; + * @return the completed + */ + public long getCompleted() { + return completed; + } + + /** + * optional int64 Completed = 3; + * @param value the completed to set + * @return this + */ + public Achievement setCompleted(final long value) { + bitField0_ |= 0x00000001; + completed = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public Achievement clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public Achievement setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 Status = 2; + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Status = 2; + * @return this + */ + public Achievement clearStatus() { + bitField0_ &= ~0x00000004; + status = 0; + return this; + } + + /** + * optional uint32 Status = 2; + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * optional uint32 Status = 2; + * @param value the status to set + * @return this + */ + public Achievement setStatus(final int value) { + bitField0_ |= 0x00000004; + status = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Achievement clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Achievement addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Achievement addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Achievement setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .QuestProgress Progress = 4; + * @return whether the progress field is set + */ + public boolean hasProgress() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * repeated .QuestProgress Progress = 4; + * @return this + */ + public Achievement clearProgress() { + bitField0_ &= ~0x00000010; + progress.clear(); + return this; + } + + /** + * repeated .QuestProgress Progress = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableProgress()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getProgress() { + return progress; + } + + /** + * repeated .QuestProgress Progress = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableProgress() { + bitField0_ |= 0x00000010; + return progress; + } + + /** + * repeated .QuestProgress Progress = 4; + * @param value the progress to add + * @return this + */ + public Achievement addProgress(final QuestProgress value) { + bitField0_ |= 0x00000010; + progress.add(value); + return this; + } + + /** + * repeated .QuestProgress Progress = 4; + * @param values the progress to add + * @return this + */ + public Achievement addAllProgress(final QuestProgress... values) { + bitField0_ |= 0x00000010; + progress.addAll(values); + return this; + } + + @Override + public Achievement copyFrom(final Achievement other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + completed = other.completed; + id = other.id; + status = other.status; + nextPackage.copyFrom(other.nextPackage); + progress.copyFrom(other.progress); + } + return this; + } + + @Override + public Achievement mergeFrom(final Achievement other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCompleted()) { + setCompleted(other.completed); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStatus()) { + setStatus(other.status); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasProgress()) { + getMutableProgress().addAll(other.progress); + } + return this; + } + + @Override + public Achievement clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + completed = 0L; + id = 0; + status = 0; + nextPackage.clear(); + progress.clear(); + return this; + } + + @Override + public Achievement clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + progress.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Achievement)) { + return false; + } + Achievement other = (Achievement) o; + return bitField0_ == other.bitField0_ + && (!hasCompleted() || completed == other.completed) + && (!hasId() || id == other.id) + && (!hasStatus() || status == other.status) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasProgress() || progress.equals(other.progress)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(completed); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(status); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < progress.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(progress.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(completed); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(status); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * progress.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(progress); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Achievement mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // completed + completed = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // status + status = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // progress + tag = input.readRepeatedMessage(progress, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.completed, completed); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.status, status); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.progress, progress); + } + output.endObject(); + } + + @Override + public Achievement mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 601036331: { + if (input.isAtField(FieldNames.completed)) { + if (!input.trySkipNullValue()) { + completed = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1808614382: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + status = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -936434099: { + if (input.isAtField(FieldNames.progress)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(progress); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Achievement clone() { + return new Achievement().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Achievement parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Achievement(), data).checkInitialized(); + } + + public static Achievement parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Achievement(), input).checkInitialized(); + } + + public static Achievement parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Achievement(), input).checkInitialized(); + } + + /** + * @return factory for creating Achievement messages + */ + public static MessageFactory getFactory() { + return AchievementFactory.INSTANCE; + } + + private enum AchievementFactory implements MessageFactory { + INSTANCE; + + @Override + public Achievement create() { + return Achievement.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName completed = FieldName.forField("Completed"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName status = FieldName.forField("Status"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName progress = FieldName.forField("Progress"); + } + } + + /** + * Protobuf type {@code Achievements} + */ + public static final class Achievements extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Achievement List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Achievement.getFactory()); + + private Achievements() { + } + + /** + * @return a new empty instance of {@code Achievements} + */ + public static Achievements newInstance() { + return new Achievements(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Achievements clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Achievements addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Achievements addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Achievements setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Achievement List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Achievement List = 1; + * @return this + */ + public Achievements clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .Achievement List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .Achievement List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .Achievement List = 1; + * @param value the list to add + * @return this + */ + public Achievements addList(final Achievement value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .Achievement List = 1; + * @param values the list to add + * @return this + */ + public Achievements addAllList(final Achievement... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public Achievements copyFrom(final Achievements other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public Achievements mergeFrom(final Achievements other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public Achievements clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public Achievements clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Achievements)) { + return false; + } + Achievements other = (Achievements) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Achievements mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public Achievements mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Achievements clone() { + return new Achievements().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Achievements parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Achievements(), data).checkInitialized(); + } + + public static Achievements parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Achievements(), input).checkInitialized(); + } + + public static Achievements parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Achievements(), input).checkInitialized(); + } + + /** + * @return factory for creating Achievements messages + */ + public static MessageFactory getFactory() { + return AchievementsFactory.INSTANCE; + } + + private enum AchievementsFactory implements MessageFactory { + INSTANCE; + + @Override + public Achievements create() { + return Achievements.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code Dictionary} + */ + public static final class Dictionary extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 TabId = 1; + */ + private int tabId; + + /** + * optional uint32 Index = 2; + */ + private int index; + + /** + * optional uint32 Status = 3; + */ + private int status; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Dictionary() { + } + + /** + * @return a new empty instance of {@code Dictionary} + */ + public static Dictionary newInstance() { + return new Dictionary(); + } + + /** + * optional uint32 TabId = 1; + * @return whether the tabId field is set + */ + public boolean hasTabId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 TabId = 1; + * @return this + */ + public Dictionary clearTabId() { + bitField0_ &= ~0x00000001; + tabId = 0; + return this; + } + + /** + * optional uint32 TabId = 1; + * @return the tabId + */ + public int getTabId() { + return tabId; + } + + /** + * optional uint32 TabId = 1; + * @param value the tabId to set + * @return this + */ + public Dictionary setTabId(final int value) { + bitField0_ |= 0x00000001; + tabId = value; + return this; + } + + /** + * optional uint32 Index = 2; + * @return whether the index field is set + */ + public boolean hasIndex() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Index = 2; + * @return this + */ + public Dictionary clearIndex() { + bitField0_ &= ~0x00000002; + index = 0; + return this; + } + + /** + * optional uint32 Index = 2; + * @return the index + */ + public int getIndex() { + return index; + } + + /** + * optional uint32 Index = 2; + * @param value the index to set + * @return this + */ + public Dictionary setIndex(final int value) { + bitField0_ |= 0x00000002; + index = value; + return this; + } + + /** + * optional uint32 Status = 3; + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 Status = 3; + * @return this + */ + public Dictionary clearStatus() { + bitField0_ &= ~0x00000004; + status = 0; + return this; + } + + /** + * optional uint32 Status = 3; + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * optional uint32 Status = 3; + * @param value the status to set + * @return this + */ + public Dictionary setStatus(final int value) { + bitField0_ |= 0x00000004; + status = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Dictionary clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Dictionary addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Dictionary addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Dictionary setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Dictionary copyFrom(final Dictionary other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + tabId = other.tabId; + index = other.index; + status = other.status; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Dictionary mergeFrom(final Dictionary other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTabId()) { + setTabId(other.tabId); + } + if (other.hasIndex()) { + setIndex(other.index); + } + if (other.hasStatus()) { + setStatus(other.status); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Dictionary clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + tabId = 0; + index = 0; + status = 0; + nextPackage.clear(); + return this; + } + + @Override + public Dictionary clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Dictionary)) { + return false; + } + Dictionary other = (Dictionary) o; + return bitField0_ == other.bitField0_ + && (!hasTabId() || tabId == other.tabId) + && (!hasIndex() || index == other.index) + && (!hasStatus() || status == other.status) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(index); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(status); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(index); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(status); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Dictionary mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // tabId + tabId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // index + index = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // status + status = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.tabId, tabId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.index, index); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.status, status); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Dictionary mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 80562032: { + if (input.isAtField(FieldNames.tabId)) { + if (!input.trySkipNullValue()) { + tabId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70793394: { + if (input.isAtField(FieldNames.index)) { + if (!input.trySkipNullValue()) { + index = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1808614382: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + status = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Dictionary clone() { + return new Dictionary().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Dictionary parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Dictionary(), data).checkInitialized(); + } + + public static Dictionary parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Dictionary(), input).checkInitialized(); + } + + public static Dictionary parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Dictionary(), input).checkInitialized(); + } + + /** + * @return factory for creating Dictionary messages + */ + public static MessageFactory getFactory() { + return DictionaryFactory.INSTANCE; + } + + private enum DictionaryFactory implements MessageFactory { + INSTANCE; + + @Override + public Dictionary create() { + return Dictionary.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName tabId = FieldName.forField("TabId"); + + static final FieldName index = FieldName.forField("Index"); + + static final FieldName status = FieldName.forField("Status"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Dictionaries} + */ + public static final class Dictionaries extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Dictionary List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Dictionary.getFactory()); + + private Dictionaries() { + } + + /** + * @return a new empty instance of {@code Dictionaries} + */ + public static Dictionaries newInstance() { + return new Dictionaries(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Dictionaries clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Dictionaries addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Dictionaries addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Dictionaries setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Dictionary List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Dictionary List = 1; + * @return this + */ + public Dictionaries clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .Dictionary List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .Dictionary List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .Dictionary List = 1; + * @param value the list to add + * @return this + */ + public Dictionaries addList(final Dictionary value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .Dictionary List = 1; + * @param values the list to add + * @return this + */ + public Dictionaries addAllList(final Dictionary... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public Dictionaries copyFrom(final Dictionaries other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public Dictionaries mergeFrom(final Dictionaries other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public Dictionaries clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public Dictionaries clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Dictionaries)) { + return false; + } + Dictionaries other = (Dictionaries) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Dictionaries mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public Dictionaries mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Dictionaries clone() { + return new Dictionaries().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Dictionaries parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Dictionaries(), data).checkInitialized(); + } + + public static Dictionaries parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Dictionaries(), input).checkInitialized(); + } + + public static Dictionaries parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Dictionaries(), input).checkInitialized(); + } + + /** + * @return factory for creating Dictionaries messages + */ + public static MessageFactory getFactory() { + return DictionariesFactory.INSTANCE; + } + + private enum DictionariesFactory implements MessageFactory { + INSTANCE; + + @Override + public Dictionaries create() { + return Dictionaries.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code Event} + */ + public static final class Event extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 Data = 2; + */ + private final RepeatedInt data = RepeatedInt.newEmptyInstance(); + + private Event() { + } + + /** + * @return a new empty instance of {@code Event} + */ + public static Event newInstance() { + return new Event(); + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public Event clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public Event setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Event clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Event addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Event addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Event setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 Data = 2; + * @return whether the data field is set + */ + public boolean hasData() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 Data = 2; + * @return this + */ + public Event clearData() { + bitField0_ &= ~0x00000004; + data.clear(); + return this; + } + + /** + * repeated uint32 Data = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableData()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getData() { + return data; + } + + /** + * repeated uint32 Data = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableData() { + bitField0_ |= 0x00000004; + return data; + } + + /** + * repeated uint32 Data = 2; + * @param value the data to add + * @return this + */ + public Event addData(final int value) { + bitField0_ |= 0x00000004; + data.add(value); + return this; + } + + /** + * repeated uint32 Data = 2; + * @param values the data to add + * @return this + */ + public Event addAllData(final int... values) { + bitField0_ |= 0x00000004; + data.addAll(values); + return this; + } + + @Override + public Event copyFrom(final Event other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + data.copyFrom(other.data); + } + return this; + } + + @Override + public Event mergeFrom(final Event other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasData()) { + getMutableData().addAll(other.data); + } + return this; + } + + @Override + public Event clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + data.clear(); + return this; + } + + @Override + public Event clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + data.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Event)) { + return false; + } + Event other = (Event) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasData() || data.equals(other.data)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < data.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(data.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * data.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(data); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Event mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // data [packed=true] + input.readPackedUInt32(data, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // data [packed=false] + tag = input.readRepeatedUInt32(data, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.data, data); + } + output.endObject(); + } + + @Override + public Event mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2122698: { + if (input.isAtField(FieldNames.data)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(data); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Event clone() { + return new Event().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Event parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Event(), data).checkInitialized(); + } + + public static Event parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Event(), input).checkInitialized(); + } + + public static Event parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Event(), input).checkInitialized(); + } + + /** + * @return factory for creating Event messages + */ + public static MessageFactory getFactory() { + return EventFactory.INSTANCE; + } + + private enum EventFactory implements MessageFactory { + INSTANCE; + + @Override + public Event create() { + return Event.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName data = FieldName.forField("Data"); + } + } + + /** + * Protobuf type {@code Events} + */ + public static final class Events extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Event List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Event.getFactory()); + + private Events() { + } + + /** + * @return a new empty instance of {@code Events} + */ + public static Events newInstance() { + return new Events(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Events clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Events addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Events addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Events setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Event List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Event List = 1; + * @return this + */ + public Events clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .Event List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .Event List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .Event List = 1; + * @param value the list to add + * @return this + */ + public Events addList(final Event value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .Event List = 1; + * @param values the list to add + * @return this + */ + public Events addAllList(final Event... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public Events copyFrom(final Events other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public Events mergeFrom(final Events other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public Events clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public Events clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Events)) { + return false; + } + Events other = (Events) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Events mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public Events mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Events clone() { + return new Events().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Events parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Events(), data).checkInitialized(); + } + + public static Events parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Events(), input).checkInitialized(); + } + + public static Events parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Events(), input).checkInitialized(); + } + + /** + * @return factory for creating Events messages + */ + public static MessageFactory getFactory() { + return EventsFactory.INSTANCE; + } + + private enum EventsFactory implements MessageFactory { + INSTANCE; + + @Override + public Events create() { + return Events.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code Mail} + */ + public static final class Mail extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Time = 6; + */ + private long time; + + /** + * optional int64 Deadline = 7; + */ + private long deadline; + + /** + * optional int64 SurveyId = 14; + */ + private long surveyId; + + /** + * optional uint64 Flag = 11; + */ + private long flag; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 TemplateId = 4; + */ + private int templateId; + + /** + * optional bool Read = 8; + */ + private boolean read; + + /** + * optional bool Recv = 9; + */ + private boolean recv; + + /** + * optional bool Pin = 15; + */ + private boolean pin; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * optional string Subject = 2; + */ + private final Utf8String subject = Utf8String.newEmptyInstance(); + + /** + * optional string Desc = 3; + */ + private final Utf8String desc = Utf8String.newEmptyInstance(); + + /** + * optional string Author = 5; + */ + private final Utf8String author = Utf8String.newEmptyInstance(); + + /** + * repeated .ItemTpl Attachments = 10; + */ + private final RepeatedMessage attachments = RepeatedMessage.newEmptyInstance(ItemTpl.getFactory()); + + /** + * repeated string SubjectArgs = 12; + */ + private final RepeatedString subjectArgs = RepeatedString.newEmptyInstance(); + + /** + * repeated string DescArgs = 13; + */ + private final RepeatedString descArgs = RepeatedString.newEmptyInstance(); + + private Mail() { + } + + /** + * @return a new empty instance of {@code Mail} + */ + public static Mail newInstance() { + return new Mail(); + } + + /** + * optional int64 Time = 6; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Time = 6; + * @return this + */ + public Mail clearTime() { + bitField0_ &= ~0x00000001; + time = 0L; + return this; + } + + /** + * optional int64 Time = 6; + * @return the time + */ + public long getTime() { + return time; + } + + /** + * optional int64 Time = 6; + * @param value the time to set + * @return this + */ + public Mail setTime(final long value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * optional int64 Deadline = 7; + * @return whether the deadline field is set + */ + public boolean hasDeadline() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional int64 Deadline = 7; + * @return this + */ + public Mail clearDeadline() { + bitField0_ &= ~0x00000002; + deadline = 0L; + return this; + } + + /** + * optional int64 Deadline = 7; + * @return the deadline + */ + public long getDeadline() { + return deadline; + } + + /** + * optional int64 Deadline = 7; + * @param value the deadline to set + * @return this + */ + public Mail setDeadline(final long value) { + bitField0_ |= 0x00000002; + deadline = value; + return this; + } + + /** + * optional int64 SurveyId = 14; + * @return whether the surveyId field is set + */ + public boolean hasSurveyId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional int64 SurveyId = 14; + * @return this + */ + public Mail clearSurveyId() { + bitField0_ &= ~0x00000004; + surveyId = 0L; + return this; + } + + /** + * optional int64 SurveyId = 14; + * @return the surveyId + */ + public long getSurveyId() { + return surveyId; + } + + /** + * optional int64 SurveyId = 14; + * @param value the surveyId to set + * @return this + */ + public Mail setSurveyId(final long value) { + bitField0_ |= 0x00000004; + surveyId = value; + return this; + } + + /** + * optional uint64 Flag = 11; + * @return whether the flag field is set + */ + public boolean hasFlag() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint64 Flag = 11; + * @return this + */ + public Mail clearFlag() { + bitField0_ &= ~0x00000008; + flag = 0L; + return this; + } + + /** + * optional uint64 Flag = 11; + * @return the flag + */ + public long getFlag() { + return flag; + } + + /** + * optional uint64 Flag = 11; + * @param value the flag to set + * @return this + */ + public Mail setFlag(final long value) { + bitField0_ |= 0x00000008; + flag = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public Mail clearId() { + bitField0_ &= ~0x00000010; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public Mail setId(final int value) { + bitField0_ |= 0x00000010; + id = value; + return this; + } + + /** + * optional uint32 TemplateId = 4; + * @return whether the templateId field is set + */ + public boolean hasTemplateId() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional uint32 TemplateId = 4; + * @return this + */ + public Mail clearTemplateId() { + bitField0_ &= ~0x00000020; + templateId = 0; + return this; + } + + /** + * optional uint32 TemplateId = 4; + * @return the templateId + */ + public int getTemplateId() { + return templateId; + } + + /** + * optional uint32 TemplateId = 4; + * @param value the templateId to set + * @return this + */ + public Mail setTemplateId(final int value) { + bitField0_ |= 0x00000020; + templateId = value; + return this; + } + + /** + * optional bool Read = 8; + * @return whether the read field is set + */ + public boolean hasRead() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional bool Read = 8; + * @return this + */ + public Mail clearRead() { + bitField0_ &= ~0x00000040; + read = false; + return this; + } + + /** + * optional bool Read = 8; + * @return the read + */ + public boolean getRead() { + return read; + } + + /** + * optional bool Read = 8; + * @param value the read to set + * @return this + */ + public Mail setRead(final boolean value) { + bitField0_ |= 0x00000040; + read = value; + return this; + } + + /** + * optional bool Recv = 9; + * @return whether the recv field is set + */ + public boolean hasRecv() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional bool Recv = 9; + * @return this + */ + public Mail clearRecv() { + bitField0_ &= ~0x00000080; + recv = false; + return this; + } + + /** + * optional bool Recv = 9; + * @return the recv + */ + public boolean getRecv() { + return recv; + } + + /** + * optional bool Recv = 9; + * @param value the recv to set + * @return this + */ + public Mail setRecv(final boolean value) { + bitField0_ |= 0x00000080; + recv = value; + return this; + } + + /** + * optional bool Pin = 15; + * @return whether the pin field is set + */ + public boolean hasPin() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional bool Pin = 15; + * @return this + */ + public Mail clearPin() { + bitField0_ &= ~0x00000100; + pin = false; + return this; + } + + /** + * optional bool Pin = 15; + * @return the pin + */ + public boolean getPin() { + return pin; + } + + /** + * optional bool Pin = 15; + * @param value the pin to set + * @return this + */ + public Mail setPin(final boolean value) { + bitField0_ |= 0x00000100; + pin = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Mail clearNextPackage() { + bitField0_ &= ~0x00000200; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000200; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Mail addNextPackage(final byte value) { + bitField0_ |= 0x00000200; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Mail addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Mail setNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.copyFrom(values); + return this; + } + + /** + * optional string Subject = 2; + * @return whether the subject field is set + */ + public boolean hasSubject() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * optional string Subject = 2; + * @return this + */ + public Mail clearSubject() { + bitField0_ &= ~0x00000400; + subject.clear(); + return this; + } + + /** + * optional string Subject = 2; + * @return the subject + */ + public java.lang.String getSubject() { + return subject.getString(); + } + + /** + * optional string Subject = 2; + * @return internal {@code Utf8String} representation of subject for reading + */ + public Utf8String getSubjectBytes() { + return this.subject; + } + + /** + * optional string Subject = 2; + * @return internal {@code Utf8String} representation of subject for modifications + */ + public Utf8String getMutableSubjectBytes() { + bitField0_ |= 0x00000400; + return this.subject; + } + + /** + * optional string Subject = 2; + * @param value the subject to set + * @return this + */ + public Mail setSubject(final CharSequence value) { + bitField0_ |= 0x00000400; + subject.copyFrom(value); + return this; + } + + /** + * optional string Subject = 2; + * @param value the subject to set + * @return this + */ + public Mail setSubject(final Utf8String value) { + bitField0_ |= 0x00000400; + subject.copyFrom(value); + return this; + } + + /** + * optional string Desc = 3; + * @return whether the desc field is set + */ + public boolean hasDesc() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * optional string Desc = 3; + * @return this + */ + public Mail clearDesc() { + bitField0_ &= ~0x00000800; + desc.clear(); + return this; + } + + /** + * optional string Desc = 3; + * @return the desc + */ + public java.lang.String getDesc() { + return desc.getString(); + } + + /** + * optional string Desc = 3; + * @return internal {@code Utf8String} representation of desc for reading + */ + public Utf8String getDescBytes() { + return this.desc; + } + + /** + * optional string Desc = 3; + * @return internal {@code Utf8String} representation of desc for modifications + */ + public Utf8String getMutableDescBytes() { + bitField0_ |= 0x00000800; + return this.desc; + } + + /** + * optional string Desc = 3; + * @param value the desc to set + * @return this + */ + public Mail setDesc(final CharSequence value) { + bitField0_ |= 0x00000800; + desc.copyFrom(value); + return this; + } + + /** + * optional string Desc = 3; + * @param value the desc to set + * @return this + */ + public Mail setDesc(final Utf8String value) { + bitField0_ |= 0x00000800; + desc.copyFrom(value); + return this; + } + + /** + * optional string Author = 5; + * @return whether the author field is set + */ + public boolean hasAuthor() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * optional string Author = 5; + * @return this + */ + public Mail clearAuthor() { + bitField0_ &= ~0x00001000; + author.clear(); + return this; + } + + /** + * optional string Author = 5; + * @return the author + */ + public java.lang.String getAuthor() { + return author.getString(); + } + + /** + * optional string Author = 5; + * @return internal {@code Utf8String} representation of author for reading + */ + public Utf8String getAuthorBytes() { + return this.author; + } + + /** + * optional string Author = 5; + * @return internal {@code Utf8String} representation of author for modifications + */ + public Utf8String getMutableAuthorBytes() { + bitField0_ |= 0x00001000; + return this.author; + } + + /** + * optional string Author = 5; + * @param value the author to set + * @return this + */ + public Mail setAuthor(final CharSequence value) { + bitField0_ |= 0x00001000; + author.copyFrom(value); + return this; + } + + /** + * optional string Author = 5; + * @param value the author to set + * @return this + */ + public Mail setAuthor(final Utf8String value) { + bitField0_ |= 0x00001000; + author.copyFrom(value); + return this; + } + + /** + * repeated .ItemTpl Attachments = 10; + * @return whether the attachments field is set + */ + public boolean hasAttachments() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * repeated .ItemTpl Attachments = 10; + * @return this + */ + public Mail clearAttachments() { + bitField0_ &= ~0x00002000; + attachments.clear(); + return this; + } + + /** + * repeated .ItemTpl Attachments = 10; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAttachments()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getAttachments() { + return attachments; + } + + /** + * repeated .ItemTpl Attachments = 10; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableAttachments() { + bitField0_ |= 0x00002000; + return attachments; + } + + /** + * repeated .ItemTpl Attachments = 10; + * @param value the attachments to add + * @return this + */ + public Mail addAttachments(final ItemTpl value) { + bitField0_ |= 0x00002000; + attachments.add(value); + return this; + } + + /** + * repeated .ItemTpl Attachments = 10; + * @param values the attachments to add + * @return this + */ + public Mail addAllAttachments(final ItemTpl... values) { + bitField0_ |= 0x00002000; + attachments.addAll(values); + return this; + } + + /** + * repeated string SubjectArgs = 12; + * @return whether the subjectArgs field is set + */ + public boolean hasSubjectArgs() { + return (bitField0_ & 0x00004000) != 0; + } + + /** + * repeated string SubjectArgs = 12; + * @return this + */ + public Mail clearSubjectArgs() { + bitField0_ &= ~0x00004000; + subjectArgs.clear(); + return this; + } + + /** + * repeated string SubjectArgs = 12; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSubjectArgs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedString getSubjectArgs() { + return subjectArgs; + } + + /** + * repeated string SubjectArgs = 12; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedString getMutableSubjectArgs() { + bitField0_ |= 0x00004000; + return subjectArgs; + } + + /** + * repeated string SubjectArgs = 12; + * @param value the subjectArgs to add + * @return this + */ + public Mail addSubjectArgs(final CharSequence value) { + bitField0_ |= 0x00004000; + subjectArgs.add(value); + return this; + } + + /** + * repeated string SubjectArgs = 12; + * @param values the subjectArgs to add + * @return this + */ + public Mail addAllSubjectArgs(final CharSequence... values) { + bitField0_ |= 0x00004000; + subjectArgs.addAll(values); + return this; + } + + /** + * repeated string DescArgs = 13; + * @return whether the descArgs field is set + */ + public boolean hasDescArgs() { + return (bitField0_ & 0x00008000) != 0; + } + + /** + * repeated string DescArgs = 13; + * @return this + */ + public Mail clearDescArgs() { + bitField0_ &= ~0x00008000; + descArgs.clear(); + return this; + } + + /** + * repeated string DescArgs = 13; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDescArgs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedString getDescArgs() { + return descArgs; + } + + /** + * repeated string DescArgs = 13; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedString getMutableDescArgs() { + bitField0_ |= 0x00008000; + return descArgs; + } + + /** + * repeated string DescArgs = 13; + * @param value the descArgs to add + * @return this + */ + public Mail addDescArgs(final CharSequence value) { + bitField0_ |= 0x00008000; + descArgs.add(value); + return this; + } + + /** + * repeated string DescArgs = 13; + * @param values the descArgs to add + * @return this + */ + public Mail addAllDescArgs(final CharSequence... values) { + bitField0_ |= 0x00008000; + descArgs.addAll(values); + return this; + } + + @Override + public Mail copyFrom(final Mail other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + deadline = other.deadline; + surveyId = other.surveyId; + flag = other.flag; + id = other.id; + templateId = other.templateId; + read = other.read; + recv = other.recv; + pin = other.pin; + nextPackage.copyFrom(other.nextPackage); + subject.copyFrom(other.subject); + desc.copyFrom(other.desc); + author.copyFrom(other.author); + attachments.copyFrom(other.attachments); + subjectArgs.copyFrom(other.subjectArgs); + descArgs.copyFrom(other.descArgs); + } + return this; + } + + @Override + public Mail mergeFrom(final Mail other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasDeadline()) { + setDeadline(other.deadline); + } + if (other.hasSurveyId()) { + setSurveyId(other.surveyId); + } + if (other.hasFlag()) { + setFlag(other.flag); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasTemplateId()) { + setTemplateId(other.templateId); + } + if (other.hasRead()) { + setRead(other.read); + } + if (other.hasRecv()) { + setRecv(other.recv); + } + if (other.hasPin()) { + setPin(other.pin); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSubject()) { + getMutableSubjectBytes().copyFrom(other.subject); + } + if (other.hasDesc()) { + getMutableDescBytes().copyFrom(other.desc); + } + if (other.hasAuthor()) { + getMutableAuthorBytes().copyFrom(other.author); + } + if (other.hasAttachments()) { + getMutableAttachments().addAll(other.attachments); + } + if (other.hasSubjectArgs()) { + getMutableSubjectArgs().addAll(other.subjectArgs); + } + if (other.hasDescArgs()) { + getMutableDescArgs().addAll(other.descArgs); + } + return this; + } + + @Override + public Mail clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0L; + deadline = 0L; + surveyId = 0L; + flag = 0L; + id = 0; + templateId = 0; + read = false; + recv = false; + pin = false; + nextPackage.clear(); + subject.clear(); + desc.clear(); + author.clear(); + attachments.clear(); + subjectArgs.clear(); + descArgs.clear(); + return this; + } + + @Override + public Mail clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + subject.clear(); + desc.clear(); + author.clear(); + attachments.clearQuick(); + subjectArgs.clear(); + descArgs.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Mail)) { + return false; + } + Mail other = (Mail) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || time == other.time) + && (!hasDeadline() || deadline == other.deadline) + && (!hasSurveyId() || surveyId == other.surveyId) + && (!hasFlag() || flag == other.flag) + && (!hasId() || id == other.id) + && (!hasTemplateId() || templateId == other.templateId) + && (!hasRead() || read == other.read) + && (!hasRecv() || recv == other.recv) + && (!hasPin() || pin == other.pin) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSubject() || subject.equals(other.subject)) + && (!hasDesc() || desc.equals(other.desc)) + && (!hasAuthor() || author.equals(other.author)) + && (!hasAttachments() || attachments.equals(other.attachments)) + && (!hasSubjectArgs() || subjectArgs.equals(other.subjectArgs)) + && (!hasDescArgs() || descArgs.equals(other.descArgs)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 48); + output.writeInt64NoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 56); + output.writeInt64NoTag(deadline); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 112); + output.writeInt64NoTag(surveyId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 88); + output.writeUInt64NoTag(flag); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(templateId); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 64); + output.writeBoolNoTag(read); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 72); + output.writeBoolNoTag(recv); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 120); + output.writeBoolNoTag(pin); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(subject); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawByte((byte) 26); + output.writeStringNoTag(desc); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawByte((byte) 42); + output.writeStringNoTag(author); + } + if ((bitField0_ & 0x00002000) != 0) { + for (int i = 0; i < attachments.length(); i++) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(attachments.get(i)); + } + } + if ((bitField0_ & 0x00004000) != 0) { + for (int i = 0; i < subjectArgs.length(); i++) { + output.writeRawByte((byte) 98); + output.writeStringNoTag(subjectArgs.get(i)); + } + } + if ((bitField0_ & 0x00008000) != 0) { + for (int i = 0; i < descArgs.length(); i++) { + output.writeRawByte((byte) 106); + output.writeStringNoTag(descArgs.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(deadline); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(surveyId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(flag); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(templateId); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000200) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(subject); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(desc); + } + if ((bitField0_ & 0x00001000) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(author); + } + if ((bitField0_ & 0x00002000) != 0) { + size += (1 * attachments.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(attachments); + } + if ((bitField0_ & 0x00004000) != 0) { + size += (1 * subjectArgs.length()) + ProtoSink.computeRepeatedStringSizeNoTag(subjectArgs); + } + if ((bitField0_ & 0x00008000) != 0) { + size += (1 * descArgs.length()) + ProtoSink.computeRepeatedStringSizeNoTag(descArgs); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Mail mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 48: { + // time + time = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // deadline + deadline = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // surveyId + surveyId = input.readInt64(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 88) { + break; + } + } + case 88: { + // flag + flag = input.readUInt64(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // templateId + templateId = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // read + read = input.readBool(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // recv + recv = input.readBool(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // pin + pin = input.readBool(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // subject + input.readString(subject); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // desc + input.readString(desc); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // author + input.readString(author); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // attachments + tag = input.readRepeatedMessage(attachments, tag); + bitField0_ |= 0x00002000; + if (tag != 98) { + break; + } + } + case 98: { + // subjectArgs + tag = input.readRepeatedString(subjectArgs, tag); + bitField0_ |= 0x00004000; + if (tag != 106) { + break; + } + } + case 106: { + // descArgs + tag = input.readRepeatedString(descArgs, tag); + bitField0_ |= 0x00008000; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.deadline, deadline); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeInt64(FieldNames.surveyId, surveyId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt64(FieldNames.flag, flag); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.templateId, templateId); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBool(FieldNames.read, read); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBool(FieldNames.recv, recv); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBool(FieldNames.pin, pin); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeString(FieldNames.subject, subject); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeString(FieldNames.desc, desc); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeString(FieldNames.author, author); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRepeatedMessage(FieldNames.attachments, attachments); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeRepeatedString(FieldNames.subjectArgs, subjectArgs); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeRepeatedString(FieldNames.descArgs, descArgs); + } + output.endObject(); + } + + @Override + public Mail mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 568278648: { + if (input.isAtField(FieldNames.deadline)) { + if (!input.trySkipNullValue()) { + deadline = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1536055755: { + if (input.isAtField(FieldNames.surveyId)) { + if (!input.trySkipNullValue()) { + surveyId = input.readInt64(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2192268: { + if (input.isAtField(FieldNames.flag)) { + if (!input.trySkipNullValue()) { + flag = input.readUInt64(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -997491883: { + if (input.isAtField(FieldNames.templateId)) { + if (!input.trySkipNullValue()) { + templateId = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2543030: { + if (input.isAtField(FieldNames.read)) { + if (!input.trySkipNullValue()) { + read = input.readBool(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2543110: { + if (input.isAtField(FieldNames.recv)) { + if (!input.trySkipNullValue()) { + recv = input.readBool(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80245: { + if (input.isAtField(FieldNames.pin)) { + if (!input.trySkipNullValue()) { + pin = input.readBool(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -203231988: { + if (input.isAtField(FieldNames.subject)) { + if (!input.trySkipNullValue()) { + input.readString(subject); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2126513: { + if (input.isAtField(FieldNames.desc)) { + if (!input.trySkipNullValue()) { + input.readString(desc); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1972506027: { + if (input.isAtField(FieldNames.author)) { + if (!input.trySkipNullValue()) { + input.readString(author); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 928871312: { + if (input.isAtField(FieldNames.attachments)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(attachments); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1064094729: { + if (input.isAtField(FieldNames.subjectArgs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedString(subjectArgs); + bitField0_ |= 0x00004000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1081407278: { + if (input.isAtField(FieldNames.descArgs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedString(descArgs); + bitField0_ |= 0x00008000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Mail clone() { + return new Mail().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Mail parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Mail(), data).checkInitialized(); + } + + public static Mail parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Mail(), input).checkInitialized(); + } + + public static Mail parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Mail(), input).checkInitialized(); + } + + /** + * @return factory for creating Mail messages + */ + public static MessageFactory getFactory() { + return MailFactory.INSTANCE; + } + + private enum MailFactory implements MessageFactory { + INSTANCE; + + @Override + public Mail create() { + return Mail.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("Time"); + + static final FieldName deadline = FieldName.forField("Deadline"); + + static final FieldName surveyId = FieldName.forField("SurveyId"); + + static final FieldName flag = FieldName.forField("Flag"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName templateId = FieldName.forField("TemplateId"); + + static final FieldName read = FieldName.forField("Read"); + + static final FieldName recv = FieldName.forField("Recv"); + + static final FieldName pin = FieldName.forField("Pin"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName subject = FieldName.forField("Subject"); + + static final FieldName desc = FieldName.forField("Desc"); + + static final FieldName author = FieldName.forField("Author"); + + static final FieldName attachments = FieldName.forField("Attachments"); + + static final FieldName subjectArgs = FieldName.forField("SubjectArgs"); + + static final FieldName descArgs = FieldName.forField("DescArgs"); + } + } + + /** + * Protobuf type {@code Mails} + */ + public static final class Mails extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .Mail List = 1; + */ + private final RepeatedMessage list = RepeatedMessage.newEmptyInstance(Mail.getFactory()); + + private Mails() { + } + + /** + * @return a new empty instance of {@code Mails} + */ + public static Mails newInstance() { + return new Mails(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Mails clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Mails addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Mails addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Mails setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .Mail List = 1; + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .Mail List = 1; + * @return this + */ + public Mails clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * repeated .Mail List = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getList() { + return list; + } + + /** + * repeated .Mail List = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * repeated .Mail List = 1; + * @param value the list to add + * @return this + */ + public Mails addList(final Mail value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * repeated .Mail List = 1; + * @param values the list to add + * @return this + */ + public Mails addAllList(final Mail... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public Mails copyFrom(final Mails other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public Mails mergeFrom(final Mails other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public Mails clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public Mails clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Mails)) { + return false; + } + Mails other = (Mails) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Mails mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public Mails mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Mails clone() { + return new Mails().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Mails parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Mails(), data).checkInitialized(); + } + + public static Mails parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Mails(), input).checkInitialized(); + } + + public static Mails parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Mails(), input).checkInitialized(); + } + + /** + * @return factory for creating Mails messages + */ + public static MessageFactory getFactory() { + return MailsFactory.INSTANCE; + } + + private enum MailsFactory implements MessageFactory { + INSTANCE; + + @Override + public Mails create() { + return Mails.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code MailRequest} + */ + public static final class MailRequest extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Flag = 2; + */ + private long flag; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private MailRequest() { + } + + /** + * @return a new empty instance of {@code MailRequest} + */ + public static MailRequest newInstance() { + return new MailRequest(); + } + + /** + * optional uint64 Flag = 2; + * @return whether the flag field is set + */ + public boolean hasFlag() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Flag = 2; + * @return this + */ + public MailRequest clearFlag() { + bitField0_ &= ~0x00000001; + flag = 0L; + return this; + } + + /** + * optional uint64 Flag = 2; + * @return the flag + */ + public long getFlag() { + return flag; + } + + /** + * optional uint64 Flag = 2; + * @param value the flag to set + * @return this + */ + public MailRequest setFlag(final long value) { + bitField0_ |= 0x00000001; + flag = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public MailRequest clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public MailRequest setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MailRequest clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MailRequest addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MailRequest addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MailRequest setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public MailRequest copyFrom(final MailRequest other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + flag = other.flag; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MailRequest mergeFrom(final MailRequest other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFlag()) { + setFlag(other.flag); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MailRequest clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + flag = 0L; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public MailRequest clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MailRequest)) { + return false; + } + MailRequest other = (MailRequest) o; + return bitField0_ == other.bitField0_ + && (!hasFlag() || flag == other.flag) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(flag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(flag); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MailRequest mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // flag + flag = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.flag, flag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public MailRequest mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2192268: { + if (input.isAtField(FieldNames.flag)) { + if (!input.trySkipNullValue()) { + flag = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MailRequest clone() { + return new MailRequest().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MailRequest parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MailRequest(), data).checkInitialized(); + } + + public static MailRequest parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailRequest(), input).checkInitialized(); + } + + public static MailRequest parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailRequest(), input).checkInitialized(); + } + + /** + * @return factory for creating MailRequest messages + */ + public static MessageFactory getFactory() { + return MailRequestFactory.INSTANCE; + } + + private enum MailRequestFactory implements MessageFactory { + INSTANCE; + + @Override + public MailRequest create() { + return MailRequest.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName flag = FieldName.forField("Flag"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code MailState} + */ + public static final class MailState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool New = 1; + */ + private boolean new_; + + /** + * optional bool Revoke = 2; + */ + private boolean revoke; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private MailState() { + } + + /** + * @return a new empty instance of {@code MailState} + */ + public static MailState newInstance() { + return new MailState(); + } + + /** + * optional bool New = 1; + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool New = 1; + * @return this + */ + public MailState clearNew() { + bitField0_ &= ~0x00000001; + new_ = false; + return this; + } + + /** + * optional bool New = 1; + * @return the new_ + */ + public boolean getNew() { + return new_; + } + + /** + * optional bool New = 1; + * @param value the new_ to set + * @return this + */ + public MailState setNew(final boolean value) { + bitField0_ |= 0x00000001; + new_ = value; + return this; + } + + /** + * optional bool Revoke = 2; + * @return whether the revoke field is set + */ + public boolean hasRevoke() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bool Revoke = 2; + * @return this + */ + public MailState clearRevoke() { + bitField0_ &= ~0x00000002; + revoke = false; + return this; + } + + /** + * optional bool Revoke = 2; + * @return the revoke + */ + public boolean getRevoke() { + return revoke; + } + + /** + * optional bool Revoke = 2; + * @param value the revoke to set + * @return this + */ + public MailState setRevoke(final boolean value) { + bitField0_ |= 0x00000002; + revoke = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public MailState clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public MailState addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public MailState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public MailState setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public MailState copyFrom(final MailState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + new_ = other.new_; + revoke = other.revoke; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MailState mergeFrom(final MailState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasRevoke()) { + setRevoke(other.revoke); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MailState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + new_ = false; + revoke = false; + nextPackage.clear(); + return this; + } + + @Override + public MailState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MailState)) { + return false; + } + MailState other = (MailState) o; + return bitField0_ == other.bitField0_ + && (!hasNew() || new_ == other.new_) + && (!hasRevoke() || revoke == other.revoke) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(revoke); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MailState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // new_ + new_ = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // revoke + revoke = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.revoke, revoke); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public MailState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1850475866: { + if (input.isAtField(FieldNames.revoke)) { + if (!input.trySkipNullValue()) { + revoke = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MailState clone() { + return new MailState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MailState parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MailState(), data).checkInitialized(); + } + + public static MailState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailState(), input).checkInitialized(); + } + + public static MailState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MailState(), input).checkInitialized(); + } + + /** + * @return factory for creating MailState messages + */ + public static MessageFactory getFactory() { + return MailStateFactory.INSTANCE; + } + + private enum MailStateFactory implements MessageFactory { + INSTANCE; + + @Override + public MailState create() { + return MailState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName revoke = FieldName.forField("Revoke"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code AchievementState} + */ + public static final class AchievementState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool New = 1; + */ + private boolean new_; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private AchievementState() { + } + + /** + * @return a new empty instance of {@code AchievementState} + */ + public static AchievementState newInstance() { + return new AchievementState(); + } + + /** + * optional bool New = 1; + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool New = 1; + * @return this + */ + public AchievementState clearNew() { + bitField0_ &= ~0x00000001; + new_ = false; + return this; + } + + /** + * optional bool New = 1; + * @return the new_ + */ + public boolean getNew() { + return new_; + } + + /** + * optional bool New = 1; + * @param value the new_ to set + * @return this + */ + public AchievementState setNew(final boolean value) { + bitField0_ |= 0x00000001; + new_ = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public AchievementState clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public AchievementState addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public AchievementState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public AchievementState setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public AchievementState copyFrom(final AchievementState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + new_ = other.new_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AchievementState mergeFrom(final AchievementState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AchievementState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + new_ = false; + nextPackage.clear(); + return this; + } + + @Override + public AchievementState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AchievementState)) { + return false; + } + AchievementState other = (AchievementState) o; + return bitField0_ == other.bitField0_ + && (!hasNew() || new_ == other.new_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AchievementState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // new_ + new_ = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public AchievementState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AchievementState clone() { + return new AchievementState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AchievementState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AchievementState(), data).checkInitialized(); + } + + public static AchievementState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AchievementState(), input).checkInitialized(); + } + + public static AchievementState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AchievementState(), input).checkInitialized(); + } + + /** + * @return factory for creating AchievementState messages + */ + public static MessageFactory getFactory() { + return AchievementStateFactory.INSTANCE; + } + + private enum AchievementStateFactory implements MessageFactory { + INSTANCE; + + @Override + public AchievementState create() { + return AchievementState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FriendState} + */ + public static final class FriendState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 Id = 1; + */ + private long id; + + /** + * optional uint32 Action = 2; + */ + private int action; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendState() { + } + + /** + * @return a new empty instance of {@code FriendState} + */ + public static FriendState newInstance() { + return new FriendState(); + } + + /** + * optional uint64 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 Id = 1; + * @return this + */ + public FriendState clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * optional uint64 Id = 1; + * @return the id + */ + public long getId() { + return id; + } + + /** + * optional uint64 Id = 1; + * @param value the id to set + * @return this + */ + public FriendState setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * optional uint32 Action = 2; + * @return whether the action field is set + */ + public boolean hasAction() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Action = 2; + * @return this + */ + public FriendState clearAction() { + bitField0_ &= ~0x00000002; + action = 0; + return this; + } + + /** + * optional uint32 Action = 2; + * @return the action + */ + public int getAction() { + return action; + } + + /** + * optional uint32 Action = 2; + * @param value the action to set + * @return this + */ + public FriendState setAction(final int value) { + bitField0_ |= 0x00000002; + action = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendState clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendState addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendState setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendState copyFrom(final FriendState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + action = other.action; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendState mergeFrom(final FriendState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasAction()) { + setAction(other.action); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + action = 0; + nextPackage.clear(); + return this; + } + + @Override + public FriendState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendState)) { + return false; + } + FriendState other = (FriendState) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasAction() || action == other.action) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(action); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(action); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // action + action = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.action, action); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1955883606: { + if (input.isAtField(FieldNames.action)) { + if (!input.trySkipNullValue()) { + action = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendState clone() { + return new FriendState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendState parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendState(), data).checkInitialized(); + } + + public static FriendState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendState(), input).checkInitialized(); + } + + public static FriendState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendState(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendState messages + */ + public static MessageFactory getFactory() { + return FriendStateFactory.INSTANCE; + } + + private enum FriendStateFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendState create() { + return FriendState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName action = FieldName.forField("Action"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code BattlePassState} + */ + public static final class BattlePassState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 State = 1; + */ + private int state; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattlePassState() { + } + + /** + * @return a new empty instance of {@code BattlePassState} + */ + public static BattlePassState newInstance() { + return new BattlePassState(); + } + + /** + * optional int32 State = 1; + * @return whether the state field is set + */ + public boolean hasState() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 State = 1; + * @return this + */ + public BattlePassState clearState() { + bitField0_ &= ~0x00000001; + state = 0; + return this; + } + + /** + * optional int32 State = 1; + * @return the state + */ + public int getState() { + return state; + } + + /** + * optional int32 State = 1; + * @param value the state to set + * @return this + */ + public BattlePassState setState(final int value) { + bitField0_ |= 0x00000001; + state = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public BattlePassState clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public BattlePassState addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public BattlePassState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public BattlePassState setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattlePassState copyFrom(final BattlePassState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + state = other.state; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassState mergeFrom(final BattlePassState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasState()) { + setState(other.state); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattlePassState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + state = 0; + nextPackage.clear(); + return this; + } + + @Override + public BattlePassState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattlePassState)) { + return false; + } + BattlePassState other = (BattlePassState) o; + return bitField0_ == other.bitField0_ + && (!hasState() || state == other.state) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt32NoTag(state); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(state); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattlePassState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // state + state = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.state, state); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattlePassState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 80204913: { + if (input.isAtField(FieldNames.state)) { + if (!input.trySkipNullValue()) { + state = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattlePassState clone() { + return new BattlePassState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattlePassState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattlePassState(), data).checkInitialized(); + } + + public static BattlePassState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassState(), input).checkInitialized(); + } + + public static BattlePassState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattlePassState(), input).checkInitialized(); + } + + /** + * @return factory for creating BattlePassState messages + */ + public static MessageFactory getFactory() { + return BattlePassStateFactory.INSTANCE; + } + + private enum BattlePassStateFactory implements MessageFactory { + INSTANCE; + + @Override + public BattlePassState create() { + return BattlePassState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName state = FieldName.forField("State"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharAdvanceRewardState} + */ + public static final class CharAdvanceRewardState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional bytes Flag = 2; + */ + private final RepeatedByte flag = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharAdvanceRewardState() { + } + + /** + * @return a new empty instance of {@code CharAdvanceRewardState} + */ + public static CharAdvanceRewardState newInstance() { + return new CharAdvanceRewardState(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharAdvanceRewardState clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharAdvanceRewardState setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional bytes Flag = 2; + * @return whether the flag field is set + */ + public boolean hasFlag() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes Flag = 2; + * @return this + */ + public CharAdvanceRewardState clearFlag() { + bitField0_ &= ~0x00000002; + flag.clear(); + return this; + } + + /** + * optional bytes Flag = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFlag()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getFlag() { + return flag; + } + + /** + * optional bytes Flag = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableFlag() { + bitField0_ |= 0x00000002; + return flag; + } + + /** + * optional bytes Flag = 2; + * @param value the flag to add + * @return this + */ + public CharAdvanceRewardState addFlag(final byte value) { + bitField0_ |= 0x00000002; + flag.add(value); + return this; + } + + /** + * optional bytes Flag = 2; + * @param values the flag to add + * @return this + */ + public CharAdvanceRewardState addAllFlag(final byte... values) { + bitField0_ |= 0x00000002; + flag.addAll(values); + return this; + } + + /** + * optional bytes Flag = 2; + * @param values the flag to set + * @return this + */ + public CharAdvanceRewardState setFlag(final byte... values) { + bitField0_ |= 0x00000002; + flag.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAdvanceRewardState clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAdvanceRewardState addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAdvanceRewardState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAdvanceRewardState setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharAdvanceRewardState copyFrom(final CharAdvanceRewardState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + flag.copyFrom(other.flag); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAdvanceRewardState mergeFrom(final CharAdvanceRewardState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasFlag()) { + getMutableFlag().copyFrom(other.flag); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharAdvanceRewardState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + flag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CharAdvanceRewardState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + flag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAdvanceRewardState)) { + return false; + } + CharAdvanceRewardState other = (CharAdvanceRewardState) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasFlag() || flag.equals(other.flag)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeBytesNoTag(flag); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(flag); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAdvanceRewardState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // flag + input.readBytes(flag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.flag, flag); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharAdvanceRewardState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2192268: { + if (input.isAtField(FieldNames.flag)) { + if (!input.trySkipNullValue()) { + input.readBytes(flag); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAdvanceRewardState clone() { + return new CharAdvanceRewardState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAdvanceRewardState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardState(), data).checkInitialized(); + } + + public static CharAdvanceRewardState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardState(), input).checkInitialized(); + } + + public static CharAdvanceRewardState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAdvanceRewardState(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAdvanceRewardState messages + */ + public static MessageFactory getFactory() { + return CharAdvanceRewardStateFactory.INSTANCE; + } + + private enum CharAdvanceRewardStateFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAdvanceRewardState create() { + return CharAdvanceRewardState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName flag = FieldName.forField("Flag"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code WorldClassRewardState} + */ + public static final class WorldClassRewardState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes Flag = 1; + */ + private final RepeatedByte flag = RepeatedByte.newEmptyInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private WorldClassRewardState() { + } + + /** + * @return a new empty instance of {@code WorldClassRewardState} + */ + public static WorldClassRewardState newInstance() { + return new WorldClassRewardState(); + } + + /** + * optional bytes Flag = 1; + * @return whether the flag field is set + */ + public boolean hasFlag() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes Flag = 1; + * @return this + */ + public WorldClassRewardState clearFlag() { + bitField0_ &= ~0x00000001; + flag.clear(); + return this; + } + + /** + * optional bytes Flag = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFlag()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getFlag() { + return flag; + } + + /** + * optional bytes Flag = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableFlag() { + bitField0_ |= 0x00000001; + return flag; + } + + /** + * optional bytes Flag = 1; + * @param value the flag to add + * @return this + */ + public WorldClassRewardState addFlag(final byte value) { + bitField0_ |= 0x00000001; + flag.add(value); + return this; + } + + /** + * optional bytes Flag = 1; + * @param values the flag to add + * @return this + */ + public WorldClassRewardState addAllFlag(final byte... values) { + bitField0_ |= 0x00000001; + flag.addAll(values); + return this; + } + + /** + * optional bytes Flag = 1; + * @param values the flag to set + * @return this + */ + public WorldClassRewardState setFlag(final byte... values) { + bitField0_ |= 0x00000001; + flag.copyFrom(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public WorldClassRewardState clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public WorldClassRewardState addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public WorldClassRewardState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public WorldClassRewardState setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public WorldClassRewardState copyFrom(final WorldClassRewardState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + flag.copyFrom(other.flag); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClassRewardState mergeFrom(final WorldClassRewardState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFlag()) { + getMutableFlag().copyFrom(other.flag); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClassRewardState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + flag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public WorldClassRewardState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + flag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WorldClassRewardState)) { + return false; + } + WorldClassRewardState other = (WorldClassRewardState) o; + return bitField0_ == other.bitField0_ + && (!hasFlag() || flag.equals(other.flag)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeBytesNoTag(flag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(flag); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WorldClassRewardState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // flag + input.readBytes(flag); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.flag, flag); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public WorldClassRewardState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2192268: { + if (input.isAtField(FieldNames.flag)) { + if (!input.trySkipNullValue()) { + input.readBytes(flag); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WorldClassRewardState clone() { + return new WorldClassRewardState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WorldClassRewardState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WorldClassRewardState(), data).checkInitialized(); + } + + public static WorldClassRewardState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClassRewardState(), input).checkInitialized(); + } + + public static WorldClassRewardState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClassRewardState(), input).checkInitialized(); + } + + /** + * @return factory for creating WorldClassRewardState messages + */ + public static MessageFactory getFactory() { + return WorldClassRewardStateFactory.INSTANCE; + } + + private enum WorldClassRewardStateFactory implements MessageFactory { + INSTANCE; + + @Override + public WorldClassRewardState create() { + return WorldClassRewardState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName flag = FieldName.forField("Flag"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FriendEnergyState} + */ + public static final class FriendEnergyState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bool State = 1; + */ + private boolean state; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendEnergyState() { + } + + /** + * @return a new empty instance of {@code FriendEnergyState} + */ + public static FriendEnergyState newInstance() { + return new FriendEnergyState(); + } + + /** + * optional bool State = 1; + * @return whether the state field is set + */ + public boolean hasState() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bool State = 1; + * @return this + */ + public FriendEnergyState clearState() { + bitField0_ &= ~0x00000001; + state = false; + return this; + } + + /** + * optional bool State = 1; + * @return the state + */ + public boolean getState() { + return state; + } + + /** + * optional bool State = 1; + * @param value the state to set + * @return this + */ + public FriendEnergyState setState(final boolean value) { + bitField0_ |= 0x00000001; + state = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public FriendEnergyState clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public FriendEnergyState addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public FriendEnergyState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public FriendEnergyState setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendEnergyState copyFrom(final FriendEnergyState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + state = other.state; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendEnergyState mergeFrom(final FriendEnergyState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasState()) { + setState(other.state); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendEnergyState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + state = false; + nextPackage.clear(); + return this; + } + + @Override + public FriendEnergyState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendEnergyState)) { + return false; + } + FriendEnergyState other = (FriendEnergyState) o; + return bitField0_ == other.bitField0_ + && (!hasState() || state == other.state) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(state); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendEnergyState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // state + state = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.state, state); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendEnergyState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 80204913: { + if (input.isAtField(FieldNames.state)) { + if (!input.trySkipNullValue()) { + state = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendEnergyState clone() { + return new FriendEnergyState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendEnergyState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendEnergyState(), data).checkInitialized(); + } + + public static FriendEnergyState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendEnergyState(), input).checkInitialized(); + } + + public static FriendEnergyState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendEnergyState(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendEnergyState messages + */ + public static MessageFactory getFactory() { + return FriendEnergyStateFactory.INSTANCE; + } + + private enum FriendEnergyStateFactory implements MessageFactory { + INSTANCE; + + @Override + public FriendEnergyState create() { + return FriendEnergyState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName state = FieldName.forField("State"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharAffinityRewardState} + */ + public static final class CharAffinityRewardState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 CharId = 1; + */ + private int charId; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 QuestIds = 2; + */ + private final RepeatedInt questIds = RepeatedInt.newEmptyInstance(); + + private CharAffinityRewardState() { + } + + /** + * @return a new empty instance of {@code CharAffinityRewardState} + */ + public static CharAffinityRewardState newInstance() { + return new CharAffinityRewardState(); + } + + /** + * optional uint32 CharId = 1; + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 CharId = 1; + * @return this + */ + public CharAffinityRewardState clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * optional uint32 CharId = 1; + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * optional uint32 CharId = 1; + * @param value the charId to set + * @return this + */ + public CharAffinityRewardState setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public CharAffinityRewardState clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public CharAffinityRewardState addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public CharAffinityRewardState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public CharAffinityRewardState setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 QuestIds = 2; + * @return whether the questIds field is set + */ + public boolean hasQuestIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 QuestIds = 2; + * @return this + */ + public CharAffinityRewardState clearQuestIds() { + bitField0_ &= ~0x00000004; + questIds.clear(); + return this; + } + + /** + * repeated uint32 QuestIds = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuestIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getQuestIds() { + return questIds; + } + + /** + * repeated uint32 QuestIds = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableQuestIds() { + bitField0_ |= 0x00000004; + return questIds; + } + + /** + * repeated uint32 QuestIds = 2; + * @param value the questIds to add + * @return this + */ + public CharAffinityRewardState addQuestIds(final int value) { + bitField0_ |= 0x00000004; + questIds.add(value); + return this; + } + + /** + * repeated uint32 QuestIds = 2; + * @param values the questIds to add + * @return this + */ + public CharAffinityRewardState addAllQuestIds(final int... values) { + bitField0_ |= 0x00000004; + questIds.addAll(values); + return this; + } + + @Override + public CharAffinityRewardState copyFrom(final CharAffinityRewardState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + nextPackage.copyFrom(other.nextPackage); + questIds.copyFrom(other.questIds); + } + return this; + } + + @Override + public CharAffinityRewardState mergeFrom(final CharAffinityRewardState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasQuestIds()) { + getMutableQuestIds().addAll(other.questIds); + } + return this; + } + + @Override + public CharAffinityRewardState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + nextPackage.clear(); + questIds.clear(); + return this; + } + + @Override + public CharAffinityRewardState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + questIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharAffinityRewardState)) { + return false; + } + CharAffinityRewardState other = (CharAffinityRewardState) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasQuestIds() || questIds.equals(other.questIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < questIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * questIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(questIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharAffinityRewardState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // questIds [packed=true] + input.readPackedUInt32(questIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // questIds [packed=false] + tag = input.readRepeatedUInt32(questIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.questIds, questIds); + } + output.endObject(); + } + + @Override + public CharAffinityRewardState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1101257066: { + if (input.isAtField(FieldNames.questIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(questIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharAffinityRewardState clone() { + return new CharAffinityRewardState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharAffinityRewardState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharAffinityRewardState(), data).checkInitialized(); + } + + public static CharAffinityRewardState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinityRewardState(), input).checkInitialized(); + } + + public static CharAffinityRewardState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharAffinityRewardState(), input).checkInitialized(); + } + + /** + * @return factory for creating CharAffinityRewardState messages + */ + public static MessageFactory getFactory() { + return CharAffinityRewardStateFactory.INSTANCE; + } + + private enum CharAffinityRewardStateFactory implements MessageFactory { + INSTANCE; + + @Override + public CharAffinityRewardState create() { + return CharAffinityRewardState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName questIds = FieldName.forField("QuestIds"); + } + } + + /** + * Protobuf type {@code StarTowerState} + */ + public static final class StarTowerState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint64 BuildId = 3; + */ + private long buildId; + + /** + * optional uint32 Id = 1; + */ + private int id; + + /** + * optional uint32 ReConnection = 2; + */ + private int reConnection; + + /** + * optional uint32 Floor = 6; + */ + private int floor; + + /** + * optional bool Sweep = 15; + */ + private boolean sweep; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 CharIds = 4; + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + private StarTowerState() { + } + + /** + * @return a new empty instance of {@code StarTowerState} + */ + public static StarTowerState newInstance() { + return new StarTowerState(); + } + + /** + * optional uint64 BuildId = 3; + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint64 BuildId = 3; + * @return this + */ + public StarTowerState clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * optional uint64 BuildId = 3; + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * optional uint64 BuildId = 3; + * @param value the buildId to set + * @return this + */ + public StarTowerState setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * optional uint32 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Id = 1; + * @return this + */ + public StarTowerState clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * optional uint32 Id = 1; + * @return the id + */ + public int getId() { + return id; + } + + /** + * optional uint32 Id = 1; + * @param value the id to set + * @return this + */ + public StarTowerState setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional uint32 ReConnection = 2; + * @return whether the reConnection field is set + */ + public boolean hasReConnection() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 ReConnection = 2; + * @return this + */ + public StarTowerState clearReConnection() { + bitField0_ &= ~0x00000004; + reConnection = 0; + return this; + } + + /** + * optional uint32 ReConnection = 2; + * @return the reConnection + */ + public int getReConnection() { + return reConnection; + } + + /** + * optional uint32 ReConnection = 2; + * @param value the reConnection to set + * @return this + */ + public StarTowerState setReConnection(final int value) { + bitField0_ |= 0x00000004; + reConnection = value; + return this; + } + + /** + * optional uint32 Floor = 6; + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 Floor = 6; + * @return this + */ + public StarTowerState clearFloor() { + bitField0_ &= ~0x00000008; + floor = 0; + return this; + } + + /** + * optional uint32 Floor = 6; + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * optional uint32 Floor = 6; + * @param value the floor to set + * @return this + */ + public StarTowerState setFloor(final int value) { + bitField0_ |= 0x00000008; + floor = value; + return this; + } + + /** + * optional bool Sweep = 15; + * @return whether the sweep field is set + */ + public boolean hasSweep() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bool Sweep = 15; + * @return this + */ + public StarTowerState clearSweep() { + bitField0_ &= ~0x00000010; + sweep = false; + return this; + } + + /** + * optional bool Sweep = 15; + * @return the sweep + */ + public boolean getSweep() { + return sweep; + } + + /** + * optional bool Sweep = 15; + * @param value the sweep to set + * @return this + */ + public StarTowerState setSweep(final boolean value) { + bitField0_ |= 0x00000010; + sweep = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public StarTowerState clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public StarTowerState addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public StarTowerState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public StarTowerState setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 CharIds = 4; + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * repeated uint32 CharIds = 4; + * @return this + */ + public StarTowerState clearCharIds() { + bitField0_ &= ~0x00000040; + charIds.clear(); + return this; + } + + /** + * repeated uint32 CharIds = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * repeated uint32 CharIds = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000040; + return charIds; + } + + /** + * repeated uint32 CharIds = 4; + * @param value the charIds to add + * @return this + */ + public StarTowerState addCharIds(final int value) { + bitField0_ |= 0x00000040; + charIds.add(value); + return this; + } + + /** + * repeated uint32 CharIds = 4; + * @param values the charIds to add + * @return this + */ + public StarTowerState addAllCharIds(final int... values) { + bitField0_ |= 0x00000040; + charIds.addAll(values); + return this; + } + + @Override + public StarTowerState copyFrom(final StarTowerState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + reConnection = other.reConnection; + floor = other.floor; + sweep = other.sweep; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + } + return this; + } + + @Override + public StarTowerState mergeFrom(final StarTowerState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasReConnection()) { + setReConnection(other.reConnection); + } + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasSweep()) { + setSweep(other.sweep); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + return this; + } + + @Override + public StarTowerState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + reConnection = 0; + floor = 0; + sweep = false; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public StarTowerState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerState)) { + return false; + } + StarTowerState other = (StarTowerState) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasReConnection() || reConnection == other.reConnection) + && (!hasFloor() || floor == other.floor) + && (!hasSweep() || sweep == other.sweep) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(reConnection); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 120); + output.writeBoolNoTag(sweep); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(reConnection); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // reConnection + reConnection = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // sweep + sweep = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 32: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000040; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.reConnection, reConnection); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.sweep, sweep); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + output.endObject(); + } + + @Override + public StarTowerState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2109200785: { + if (input.isAtField(FieldNames.reConnection)) { + if (!input.trySkipNullValue()) { + reConnection = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80297676: { + if (input.isAtField(FieldNames.sweep)) { + if (!input.trySkipNullValue()) { + sweep = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerState clone() { + return new StarTowerState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerState(), data).checkInitialized(); + } + + public static StarTowerState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerState(), input).checkInitialized(); + } + + public static StarTowerState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerState(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerState messages + */ + public static MessageFactory getFactory() { + return StarTowerStateFactory.INSTANCE; + } + + private enum StarTowerStateFactory implements MessageFactory { + INSTANCE; + + @Override + public StarTowerState create() { + return StarTowerState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName reConnection = FieldName.forField("ReConnection"); + + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName sweep = FieldName.forField("Sweep"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + } + } + + /** + * Protobuf type {@code StarTowerBookState} + */ + public static final class StarTowerBookState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated uint32 CharIds = 1; + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 EventIds = 2; + */ + private final RepeatedInt eventIds = RepeatedInt.newEmptyInstance(); + + /** + * repeated uint32 Bundles = 3; + */ + private final RepeatedInt bundles = RepeatedInt.newEmptyInstance(); + + private StarTowerBookState() { + } + + /** + * @return a new empty instance of {@code StarTowerBookState} + */ + public static StarTowerBookState newInstance() { + return new StarTowerBookState(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public StarTowerBookState clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookState addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookState setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated uint32 CharIds = 1; + * @return this + */ + public StarTowerBookState clearCharIds() { + bitField0_ &= ~0x00000002; + charIds.clear(); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000002; + return charIds; + } + + /** + * repeated uint32 CharIds = 1; + * @param value the charIds to add + * @return this + */ + public StarTowerBookState addCharIds(final int value) { + bitField0_ |= 0x00000002; + charIds.add(value); + return this; + } + + /** + * repeated uint32 CharIds = 1; + * @param values the charIds to add + * @return this + */ + public StarTowerBookState addAllCharIds(final int... values) { + bitField0_ |= 0x00000002; + charIds.addAll(values); + return this; + } + + /** + * repeated uint32 EventIds = 2; + * @return whether the eventIds field is set + */ + public boolean hasEventIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated uint32 EventIds = 2; + * @return this + */ + public StarTowerBookState clearEventIds() { + bitField0_ &= ~0x00000004; + eventIds.clear(); + return this; + } + + /** + * repeated uint32 EventIds = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEventIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getEventIds() { + return eventIds; + } + + /** + * repeated uint32 EventIds = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableEventIds() { + bitField0_ |= 0x00000004; + return eventIds; + } + + /** + * repeated uint32 EventIds = 2; + * @param value the eventIds to add + * @return this + */ + public StarTowerBookState addEventIds(final int value) { + bitField0_ |= 0x00000004; + eventIds.add(value); + return this; + } + + /** + * repeated uint32 EventIds = 2; + * @param values the eventIds to add + * @return this + */ + public StarTowerBookState addAllEventIds(final int... values) { + bitField0_ |= 0x00000004; + eventIds.addAll(values); + return this; + } + + /** + * repeated uint32 Bundles = 3; + * @return whether the bundles field is set + */ + public boolean hasBundles() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated uint32 Bundles = 3; + * @return this + */ + public StarTowerBookState clearBundles() { + bitField0_ &= ~0x00000008; + bundles.clear(); + return this; + } + + /** + * repeated uint32 Bundles = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBundles()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getBundles() { + return bundles; + } + + /** + * repeated uint32 Bundles = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableBundles() { + bitField0_ |= 0x00000008; + return bundles; + } + + /** + * repeated uint32 Bundles = 3; + * @param value the bundles to add + * @return this + */ + public StarTowerBookState addBundles(final int value) { + bitField0_ |= 0x00000008; + bundles.add(value); + return this; + } + + /** + * repeated uint32 Bundles = 3; + * @param values the bundles to add + * @return this + */ + public StarTowerBookState addAllBundles(final int... values) { + bitField0_ |= 0x00000008; + bundles.addAll(values); + return this; + } + + @Override + public StarTowerBookState copyFrom(final StarTowerBookState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + eventIds.copyFrom(other.eventIds); + bundles.copyFrom(other.bundles); + } + return this; + } + + @Override + public StarTowerBookState mergeFrom(final StarTowerBookState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + if (other.hasEventIds()) { + getMutableEventIds().addAll(other.eventIds); + } + if (other.hasBundles()) { + getMutableBundles().addAll(other.bundles); + } + return this; + } + + @Override + public StarTowerBookState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + eventIds.clear(); + bundles.clear(); + return this; + } + + @Override + public StarTowerBookState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + eventIds.clear(); + bundles.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookState)) { + return false; + } + StarTowerBookState other = (StarTowerBookState) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)) + && (!hasEventIds() || eventIds.equals(other.eventIds)) + && (!hasBundles() || bundles.equals(other.bundles)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < eventIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(eventIds.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < bundles.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(bundles.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * eventIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(eventIds); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * bundles.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(bundles); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // eventIds [packed=true] + input.readPackedUInt32(eventIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // bundles [packed=true] + input.readPackedUInt32(bundles, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000002; + break; + } + case 16: { + // eventIds [packed=false] + tag = input.readRepeatedUInt32(eventIds, tag); + bitField0_ |= 0x00000004; + break; + } + case 24: { + // bundles [packed=false] + tag = input.readRepeatedUInt32(bundles, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.eventIds, eventIds); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.bundles, bundles); + } + output.endObject(); + } + + @Override + public StarTowerBookState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 342741470: { + if (input.isAtField(FieldNames.eventIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(eventIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1899984913: { + if (input.isAtField(FieldNames.bundles)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(bundles); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookState clone() { + return new StarTowerBookState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookState(), data).checkInitialized(); + } + + public static StarTowerBookState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookState(), input).checkInitialized(); + } + + public static StarTowerBookState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookState(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookState messages + */ + public static MessageFactory getFactory() { + return StarTowerBookStateFactory.INSTANCE; + } + + private enum StarTowerBookStateFactory implements MessageFactory { + INSTANCE; + + @Override + public StarTowerBookState create() { + return StarTowerBookState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + + static final FieldName eventIds = FieldName.forField("EventIds"); + + static final FieldName bundles = FieldName.forField("Bundles"); + } + } + + /** + * Protobuf type {@code StateInfo} + */ + public static final class StateInfo extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 InfinityTower = 2; + */ + private int infinityTower; + + /** + * optional bool Friend = 3; + */ + private boolean friend; + + /** + * optional bool NpcAffinityReward = 9; + */ + private boolean npcAffinityReward; + + /** + * optional bool StorySet = 22; + */ + private boolean storySet; + + /** + * optional .MailState Mail = 1; + */ + private final MailState mail = MailState.newInstance(); + + /** + * optional .BattlePassState BattlePass = 4; + */ + private final BattlePassState battlePass = BattlePassState.newInstance(); + + /** + * optional .WorldClassRewardState WorldClassReward = 5; + */ + private final WorldClassRewardState worldClassReward = WorldClassRewardState.newInstance(); + + /** + * optional .FriendEnergyState FriendEnergy = 7; + */ + private final FriendEnergyState friendEnergy = FriendEnergyState.newInstance(); + + /** + * optional .MallPackageState MallPackage = 10; + */ + private final MallPackageState mallPackage = MallPackageState.newInstance(); + + /** + * optional .AchievementState Achievement = 15; + */ + private final AchievementState achievement = AchievementState.newInstance(); + + /** + * optional .QuestState TravelerDuelQuest = 16; + */ + private final QuestState travelerDuelQuest = QuestState.newInstance(); + + /** + * optional .QuestState TravelerDuelChallengeQuest = 17; + */ + private final QuestState travelerDuelChallengeQuest = QuestState.newInstance(); + + /** + * optional .StarTowerState StarTower = 18; + */ + private final StarTowerState starTower = StarTowerState.newInstance(); + + /** + * optional .StarTowerBookState StarTowerBook = 19; + */ + private final StarTowerBookState starTowerBook = StarTowerBookState.newInstance(); + + /** + * optional .ScoreBossState ScoreBoss = 20; + */ + private final ScoreBossState scoreBoss = ScoreBossState.newInstance(); + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .CharAdvanceRewardState CharAdvanceRewards = 6; + */ + private final RepeatedMessage charAdvanceRewards = RepeatedMessage.newEmptyInstance(CharAdvanceRewardState.getFactory()); + + /** + * repeated .CharAffinityRewardState CharAffinityRewards = 8; + */ + private final RepeatedMessage charAffinityRewards = RepeatedMessage.newEmptyInstance(CharAffinityRewardState.getFactory()); + + /** + * repeated .ActivityState Activities = 21; + */ + private final RepeatedMessage activities = RepeatedMessage.newEmptyInstance(ActivityState.getFactory()); + + private StateInfo() { + } + + /** + * @return a new empty instance of {@code StateInfo} + */ + public static StateInfo newInstance() { + return new StateInfo(); + } + + /** + * optional uint32 InfinityTower = 2; + * @return whether the infinityTower field is set + */ + public boolean hasInfinityTower() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 InfinityTower = 2; + * @return this + */ + public StateInfo clearInfinityTower() { + bitField0_ &= ~0x00000001; + infinityTower = 0; + return this; + } + + /** + * optional uint32 InfinityTower = 2; + * @return the infinityTower + */ + public int getInfinityTower() { + return infinityTower; + } + + /** + * optional uint32 InfinityTower = 2; + * @param value the infinityTower to set + * @return this + */ + public StateInfo setInfinityTower(final int value) { + bitField0_ |= 0x00000001; + infinityTower = value; + return this; + } + + /** + * optional bool Friend = 3; + * @return whether the friend field is set + */ + public boolean hasFriend() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional bool Friend = 3; + * @return this + */ + public StateInfo clearFriend() { + bitField0_ &= ~0x00000002; + friend = false; + return this; + } + + /** + * optional bool Friend = 3; + * @return the friend + */ + public boolean getFriend() { + return friend; + } + + /** + * optional bool Friend = 3; + * @param value the friend to set + * @return this + */ + public StateInfo setFriend(final boolean value) { + bitField0_ |= 0x00000002; + friend = value; + return this; + } + + /** + * optional bool NpcAffinityReward = 9; + * @return whether the npcAffinityReward field is set + */ + public boolean hasNpcAffinityReward() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bool NpcAffinityReward = 9; + * @return this + */ + public StateInfo clearNpcAffinityReward() { + bitField0_ &= ~0x00000004; + npcAffinityReward = false; + return this; + } + + /** + * optional bool NpcAffinityReward = 9; + * @return the npcAffinityReward + */ + public boolean getNpcAffinityReward() { + return npcAffinityReward; + } + + /** + * optional bool NpcAffinityReward = 9; + * @param value the npcAffinityReward to set + * @return this + */ + public StateInfo setNpcAffinityReward(final boolean value) { + bitField0_ |= 0x00000004; + npcAffinityReward = value; + return this; + } + + /** + * optional bool StorySet = 22; + * @return whether the storySet field is set + */ + public boolean hasStorySet() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional bool StorySet = 22; + * @return this + */ + public StateInfo clearStorySet() { + bitField0_ &= ~0x00000008; + storySet = false; + return this; + } + + /** + * optional bool StorySet = 22; + * @return the storySet + */ + public boolean getStorySet() { + return storySet; + } + + /** + * optional bool StorySet = 22; + * @param value the storySet to set + * @return this + */ + public StateInfo setStorySet(final boolean value) { + bitField0_ |= 0x00000008; + storySet = value; + return this; + } + + /** + * optional .MailState Mail = 1; + * @return whether the mail field is set + */ + public boolean hasMail() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional .MailState Mail = 1; + * @return this + */ + public StateInfo clearMail() { + bitField0_ &= ~0x00000010; + mail.clear(); + return this; + } + + /** + * optional .MailState Mail = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMail()} if you want to modify it. + * + * @return internal storage object for reading + */ + public MailState getMail() { + return mail; + } + + /** + * optional .MailState Mail = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public MailState getMutableMail() { + bitField0_ |= 0x00000010; + return mail; + } + + /** + * optional .MailState Mail = 1; + * @param value the mail to set + * @return this + */ + public StateInfo setMail(final MailState value) { + bitField0_ |= 0x00000010; + mail.copyFrom(value); + return this; + } + + /** + * optional .BattlePassState BattlePass = 4; + * @return whether the battlePass field is set + */ + public boolean hasBattlePass() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional .BattlePassState BattlePass = 4; + * @return this + */ + public StateInfo clearBattlePass() { + bitField0_ &= ~0x00000020; + battlePass.clear(); + return this; + } + + /** + * optional .BattlePassState BattlePass = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBattlePass()} if you want to modify it. + * + * @return internal storage object for reading + */ + public BattlePassState getBattlePass() { + return battlePass; + } + + /** + * optional .BattlePassState BattlePass = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public BattlePassState getMutableBattlePass() { + bitField0_ |= 0x00000020; + return battlePass; + } + + /** + * optional .BattlePassState BattlePass = 4; + * @param value the battlePass to set + * @return this + */ + public StateInfo setBattlePass(final BattlePassState value) { + bitField0_ |= 0x00000020; + battlePass.copyFrom(value); + return this; + } + + /** + * optional .WorldClassRewardState WorldClassReward = 5; + * @return whether the worldClassReward field is set + */ + public boolean hasWorldClassReward() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional .WorldClassRewardState WorldClassReward = 5; + * @return this + */ + public StateInfo clearWorldClassReward() { + bitField0_ &= ~0x00000040; + worldClassReward.clear(); + return this; + } + + /** + * optional .WorldClassRewardState WorldClassReward = 5; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableWorldClassReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public WorldClassRewardState getWorldClassReward() { + return worldClassReward; + } + + /** + * optional .WorldClassRewardState WorldClassReward = 5; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public WorldClassRewardState getMutableWorldClassReward() { + bitField0_ |= 0x00000040; + return worldClassReward; + } + + /** + * optional .WorldClassRewardState WorldClassReward = 5; + * @param value the worldClassReward to set + * @return this + */ + public StateInfo setWorldClassReward(final WorldClassRewardState value) { + bitField0_ |= 0x00000040; + worldClassReward.copyFrom(value); + return this; + } + + /** + * optional .FriendEnergyState FriendEnergy = 7; + * @return whether the friendEnergy field is set + */ + public boolean hasFriendEnergy() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * optional .FriendEnergyState FriendEnergy = 7; + * @return this + */ + public StateInfo clearFriendEnergy() { + bitField0_ &= ~0x00000080; + friendEnergy.clear(); + return this; + } + + /** + * optional .FriendEnergyState FriendEnergy = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFriendEnergy()} if you want to modify it. + * + * @return internal storage object for reading + */ + public FriendEnergyState getFriendEnergy() { + return friendEnergy; + } + + /** + * optional .FriendEnergyState FriendEnergy = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public FriendEnergyState getMutableFriendEnergy() { + bitField0_ |= 0x00000080; + return friendEnergy; + } + + /** + * optional .FriendEnergyState FriendEnergy = 7; + * @param value the friendEnergy to set + * @return this + */ + public StateInfo setFriendEnergy(final FriendEnergyState value) { + bitField0_ |= 0x00000080; + friendEnergy.copyFrom(value); + return this; + } + + /** + * optional .MallPackageState MallPackage = 10; + * @return whether the mallPackage field is set + */ + public boolean hasMallPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * optional .MallPackageState MallPackage = 10; + * @return this + */ + public StateInfo clearMallPackage() { + bitField0_ &= ~0x00000100; + mallPackage.clear(); + return this; + } + + /** + * optional .MallPackageState MallPackage = 10; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMallPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public MallPackageState getMallPackage() { + return mallPackage; + } + + /** + * optional .MallPackageState MallPackage = 10; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public MallPackageState getMutableMallPackage() { + bitField0_ |= 0x00000100; + return mallPackage; + } + + /** + * optional .MallPackageState MallPackage = 10; + * @param value the mallPackage to set + * @return this + */ + public StateInfo setMallPackage(final MallPackageState value) { + bitField0_ |= 0x00000100; + mallPackage.copyFrom(value); + return this; + } + + /** + * optional .AchievementState Achievement = 15; + * @return whether the achievement field is set + */ + public boolean hasAchievement() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * optional .AchievementState Achievement = 15; + * @return this + */ + public StateInfo clearAchievement() { + bitField0_ &= ~0x00000200; + achievement.clear(); + return this; + } + + /** + * optional .AchievementState Achievement = 15; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAchievement()} if you want to modify it. + * + * @return internal storage object for reading + */ + public AchievementState getAchievement() { + return achievement; + } + + /** + * optional .AchievementState Achievement = 15; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public AchievementState getMutableAchievement() { + bitField0_ |= 0x00000200; + return achievement; + } + + /** + * optional .AchievementState Achievement = 15; + * @param value the achievement to set + * @return this + */ + public StateInfo setAchievement(final AchievementState value) { + bitField0_ |= 0x00000200; + achievement.copyFrom(value); + return this; + } + + /** + * optional .QuestState TravelerDuelQuest = 16; + * @return whether the travelerDuelQuest field is set + */ + public boolean hasTravelerDuelQuest() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * optional .QuestState TravelerDuelQuest = 16; + * @return this + */ + public StateInfo clearTravelerDuelQuest() { + bitField0_ &= ~0x00000400; + travelerDuelQuest.clear(); + return this; + } + + /** + * optional .QuestState TravelerDuelQuest = 16; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTravelerDuelQuest()} if you want to modify it. + * + * @return internal storage object for reading + */ + public QuestState getTravelerDuelQuest() { + return travelerDuelQuest; + } + + /** + * optional .QuestState TravelerDuelQuest = 16; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public QuestState getMutableTravelerDuelQuest() { + bitField0_ |= 0x00000400; + return travelerDuelQuest; + } + + /** + * optional .QuestState TravelerDuelQuest = 16; + * @param value the travelerDuelQuest to set + * @return this + */ + public StateInfo setTravelerDuelQuest(final QuestState value) { + bitField0_ |= 0x00000400; + travelerDuelQuest.copyFrom(value); + return this; + } + + /** + * optional .QuestState TravelerDuelChallengeQuest = 17; + * @return whether the travelerDuelChallengeQuest field is set + */ + public boolean hasTravelerDuelChallengeQuest() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * optional .QuestState TravelerDuelChallengeQuest = 17; + * @return this + */ + public StateInfo clearTravelerDuelChallengeQuest() { + bitField0_ &= ~0x00000800; + travelerDuelChallengeQuest.clear(); + return this; + } + + /** + * optional .QuestState TravelerDuelChallengeQuest = 17; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTravelerDuelChallengeQuest()} if you want to modify it. + * + * @return internal storage object for reading + */ + public QuestState getTravelerDuelChallengeQuest() { + return travelerDuelChallengeQuest; + } + + /** + * optional .QuestState TravelerDuelChallengeQuest = 17; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public QuestState getMutableTravelerDuelChallengeQuest() { + bitField0_ |= 0x00000800; + return travelerDuelChallengeQuest; + } + + /** + * optional .QuestState TravelerDuelChallengeQuest = 17; + * @param value the travelerDuelChallengeQuest to set + * @return this + */ + public StateInfo setTravelerDuelChallengeQuest(final QuestState value) { + bitField0_ |= 0x00000800; + travelerDuelChallengeQuest.copyFrom(value); + return this; + } + + /** + * optional .StarTowerState StarTower = 18; + * @return whether the starTower field is set + */ + public boolean hasStarTower() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * optional .StarTowerState StarTower = 18; + * @return this + */ + public StateInfo clearStarTower() { + bitField0_ &= ~0x00001000; + starTower.clear(); + return this; + } + + /** + * optional .StarTowerState StarTower = 18; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStarTower()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerState getStarTower() { + return starTower; + } + + /** + * optional .StarTowerState StarTower = 18; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerState getMutableStarTower() { + bitField0_ |= 0x00001000; + return starTower; + } + + /** + * optional .StarTowerState StarTower = 18; + * @param value the starTower to set + * @return this + */ + public StateInfo setStarTower(final StarTowerState value) { + bitField0_ |= 0x00001000; + starTower.copyFrom(value); + return this; + } + + /** + * optional .StarTowerBookState StarTowerBook = 19; + * @return whether the starTowerBook field is set + */ + public boolean hasStarTowerBook() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * optional .StarTowerBookState StarTowerBook = 19; + * @return this + */ + public StateInfo clearStarTowerBook() { + bitField0_ &= ~0x00002000; + starTowerBook.clear(); + return this; + } + + /** + * optional .StarTowerBookState StarTowerBook = 19; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStarTowerBook()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerBookState getStarTowerBook() { + return starTowerBook; + } + + /** + * optional .StarTowerBookState StarTowerBook = 19; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerBookState getMutableStarTowerBook() { + bitField0_ |= 0x00002000; + return starTowerBook; + } + + /** + * optional .StarTowerBookState StarTowerBook = 19; + * @param value the starTowerBook to set + * @return this + */ + public StateInfo setStarTowerBook(final StarTowerBookState value) { + bitField0_ |= 0x00002000; + starTowerBook.copyFrom(value); + return this; + } + + /** + * optional .ScoreBossState ScoreBoss = 20; + * @return whether the scoreBoss field is set + */ + public boolean hasScoreBoss() { + return (bitField0_ & 0x00004000) != 0; + } + + /** + * optional .ScoreBossState ScoreBoss = 20; + * @return this + */ + public StateInfo clearScoreBoss() { + bitField0_ &= ~0x00004000; + scoreBoss.clear(); + return this; + } + + /** + * optional .ScoreBossState ScoreBoss = 20; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableScoreBoss()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ScoreBossState getScoreBoss() { + return scoreBoss; + } + + /** + * optional .ScoreBossState ScoreBoss = 20; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ScoreBossState getMutableScoreBoss() { + bitField0_ |= 0x00004000; + return scoreBoss; + } + + /** + * optional .ScoreBossState ScoreBoss = 20; + * @param value the scoreBoss to set + * @return this + */ + public StateInfo setScoreBoss(final ScoreBossState value) { + bitField0_ |= 0x00004000; + scoreBoss.copyFrom(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00008000) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public StateInfo clearNextPackage() { + bitField0_ &= ~0x00008000; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00008000; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public StateInfo addNextPackage(final byte value) { + bitField0_ |= 0x00008000; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public StateInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00008000; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public StateInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00008000; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .CharAdvanceRewardState CharAdvanceRewards = 6; + * @return whether the charAdvanceRewards field is set + */ + public boolean hasCharAdvanceRewards() { + return (bitField0_ & 0x00010000) != 0; + } + + /** + * repeated .CharAdvanceRewardState CharAdvanceRewards = 6; + * @return this + */ + public StateInfo clearCharAdvanceRewards() { + bitField0_ &= ~0x00010000; + charAdvanceRewards.clear(); + return this; + } + + /** + * repeated .CharAdvanceRewardState CharAdvanceRewards = 6; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharAdvanceRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCharAdvanceRewards() { + return charAdvanceRewards; + } + + /** + * repeated .CharAdvanceRewardState CharAdvanceRewards = 6; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCharAdvanceRewards() { + bitField0_ |= 0x00010000; + return charAdvanceRewards; + } + + /** + * repeated .CharAdvanceRewardState CharAdvanceRewards = 6; + * @param value the charAdvanceRewards to add + * @return this + */ + public StateInfo addCharAdvanceRewards(final CharAdvanceRewardState value) { + bitField0_ |= 0x00010000; + charAdvanceRewards.add(value); + return this; + } + + /** + * repeated .CharAdvanceRewardState CharAdvanceRewards = 6; + * @param values the charAdvanceRewards to add + * @return this + */ + public StateInfo addAllCharAdvanceRewards(final CharAdvanceRewardState... values) { + bitField0_ |= 0x00010000; + charAdvanceRewards.addAll(values); + return this; + } + + /** + * repeated .CharAffinityRewardState CharAffinityRewards = 8; + * @return whether the charAffinityRewards field is set + */ + public boolean hasCharAffinityRewards() { + return (bitField0_ & 0x00020000) != 0; + } + + /** + * repeated .CharAffinityRewardState CharAffinityRewards = 8; + * @return this + */ + public StateInfo clearCharAffinityRewards() { + bitField0_ &= ~0x00020000; + charAffinityRewards.clear(); + return this; + } + + /** + * repeated .CharAffinityRewardState CharAffinityRewards = 8; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharAffinityRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getCharAffinityRewards() { + return charAffinityRewards; + } + + /** + * repeated .CharAffinityRewardState CharAffinityRewards = 8; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableCharAffinityRewards() { + bitField0_ |= 0x00020000; + return charAffinityRewards; + } + + /** + * repeated .CharAffinityRewardState CharAffinityRewards = 8; + * @param value the charAffinityRewards to add + * @return this + */ + public StateInfo addCharAffinityRewards(final CharAffinityRewardState value) { + bitField0_ |= 0x00020000; + charAffinityRewards.add(value); + return this; + } + + /** + * repeated .CharAffinityRewardState CharAffinityRewards = 8; + * @param values the charAffinityRewards to add + * @return this + */ + public StateInfo addAllCharAffinityRewards(final CharAffinityRewardState... values) { + bitField0_ |= 0x00020000; + charAffinityRewards.addAll(values); + return this; + } + + /** + * repeated .ActivityState Activities = 21; + * @return whether the activities field is set + */ + public boolean hasActivities() { + return (bitField0_ & 0x00040000) != 0; + } + + /** + * repeated .ActivityState Activities = 21; + * @return this + */ + public StateInfo clearActivities() { + bitField0_ &= ~0x00040000; + activities.clear(); + return this; + } + + /** + * repeated .ActivityState Activities = 21; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableActivities()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getActivities() { + return activities; + } + + /** + * repeated .ActivityState Activities = 21; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableActivities() { + bitField0_ |= 0x00040000; + return activities; + } + + /** + * repeated .ActivityState Activities = 21; + * @param value the activities to add + * @return this + */ + public StateInfo addActivities(final ActivityState value) { + bitField0_ |= 0x00040000; + activities.add(value); + return this; + } + + /** + * repeated .ActivityState Activities = 21; + * @param values the activities to add + * @return this + */ + public StateInfo addAllActivities(final ActivityState... values) { + bitField0_ |= 0x00040000; + activities.addAll(values); + return this; + } + + @Override + public StateInfo copyFrom(final StateInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + infinityTower = other.infinityTower; + friend = other.friend; + npcAffinityReward = other.npcAffinityReward; + storySet = other.storySet; + mail.copyFrom(other.mail); + battlePass.copyFrom(other.battlePass); + worldClassReward.copyFrom(other.worldClassReward); + friendEnergy.copyFrom(other.friendEnergy); + mallPackage.copyFrom(other.mallPackage); + achievement.copyFrom(other.achievement); + travelerDuelQuest.copyFrom(other.travelerDuelQuest); + travelerDuelChallengeQuest.copyFrom(other.travelerDuelChallengeQuest); + starTower.copyFrom(other.starTower); + starTowerBook.copyFrom(other.starTowerBook); + scoreBoss.copyFrom(other.scoreBoss); + nextPackage.copyFrom(other.nextPackage); + charAdvanceRewards.copyFrom(other.charAdvanceRewards); + charAffinityRewards.copyFrom(other.charAffinityRewards); + activities.copyFrom(other.activities); + } + return this; + } + + @Override + public StateInfo mergeFrom(final StateInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasInfinityTower()) { + setInfinityTower(other.infinityTower); + } + if (other.hasFriend()) { + setFriend(other.friend); + } + if (other.hasNpcAffinityReward()) { + setNpcAffinityReward(other.npcAffinityReward); + } + if (other.hasStorySet()) { + setStorySet(other.storySet); + } + if (other.hasMail()) { + getMutableMail().mergeFrom(other.mail); + } + if (other.hasBattlePass()) { + getMutableBattlePass().mergeFrom(other.battlePass); + } + if (other.hasWorldClassReward()) { + getMutableWorldClassReward().mergeFrom(other.worldClassReward); + } + if (other.hasFriendEnergy()) { + getMutableFriendEnergy().mergeFrom(other.friendEnergy); + } + if (other.hasMallPackage()) { + getMutableMallPackage().mergeFrom(other.mallPackage); + } + if (other.hasAchievement()) { + getMutableAchievement().mergeFrom(other.achievement); + } + if (other.hasTravelerDuelQuest()) { + getMutableTravelerDuelQuest().mergeFrom(other.travelerDuelQuest); + } + if (other.hasTravelerDuelChallengeQuest()) { + getMutableTravelerDuelChallengeQuest().mergeFrom(other.travelerDuelChallengeQuest); + } + if (other.hasStarTower()) { + getMutableStarTower().mergeFrom(other.starTower); + } + if (other.hasStarTowerBook()) { + getMutableStarTowerBook().mergeFrom(other.starTowerBook); + } + if (other.hasScoreBoss()) { + getMutableScoreBoss().mergeFrom(other.scoreBoss); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharAdvanceRewards()) { + getMutableCharAdvanceRewards().addAll(other.charAdvanceRewards); + } + if (other.hasCharAffinityRewards()) { + getMutableCharAffinityRewards().addAll(other.charAffinityRewards); + } + if (other.hasActivities()) { + getMutableActivities().addAll(other.activities); + } + return this; + } + + @Override + public StateInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + infinityTower = 0; + friend = false; + npcAffinityReward = false; + storySet = false; + mail.clear(); + battlePass.clear(); + worldClassReward.clear(); + friendEnergy.clear(); + mallPackage.clear(); + achievement.clear(); + travelerDuelQuest.clear(); + travelerDuelChallengeQuest.clear(); + starTower.clear(); + starTowerBook.clear(); + scoreBoss.clear(); + nextPackage.clear(); + charAdvanceRewards.clear(); + charAffinityRewards.clear(); + activities.clear(); + return this; + } + + @Override + public StateInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + mail.clearQuick(); + battlePass.clearQuick(); + worldClassReward.clearQuick(); + friendEnergy.clearQuick(); + mallPackage.clearQuick(); + achievement.clearQuick(); + travelerDuelQuest.clearQuick(); + travelerDuelChallengeQuest.clearQuick(); + starTower.clearQuick(); + starTowerBook.clearQuick(); + scoreBoss.clearQuick(); + nextPackage.clear(); + charAdvanceRewards.clearQuick(); + charAffinityRewards.clearQuick(); + activities.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StateInfo)) { + return false; + } + StateInfo other = (StateInfo) o; + return bitField0_ == other.bitField0_ + && (!hasInfinityTower() || infinityTower == other.infinityTower) + && (!hasFriend() || friend == other.friend) + && (!hasNpcAffinityReward() || npcAffinityReward == other.npcAffinityReward) + && (!hasStorySet() || storySet == other.storySet) + && (!hasMail() || mail.equals(other.mail)) + && (!hasBattlePass() || battlePass.equals(other.battlePass)) + && (!hasWorldClassReward() || worldClassReward.equals(other.worldClassReward)) + && (!hasFriendEnergy() || friendEnergy.equals(other.friendEnergy)) + && (!hasMallPackage() || mallPackage.equals(other.mallPackage)) + && (!hasAchievement() || achievement.equals(other.achievement)) + && (!hasTravelerDuelQuest() || travelerDuelQuest.equals(other.travelerDuelQuest)) + && (!hasTravelerDuelChallengeQuest() || travelerDuelChallengeQuest.equals(other.travelerDuelChallengeQuest)) + && (!hasStarTower() || starTower.equals(other.starTower)) + && (!hasStarTowerBook() || starTowerBook.equals(other.starTowerBook)) + && (!hasScoreBoss() || scoreBoss.equals(other.scoreBoss)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharAdvanceRewards() || charAdvanceRewards.equals(other.charAdvanceRewards)) + && (!hasCharAffinityRewards() || charAffinityRewards.equals(other.charAffinityRewards)) + && (!hasActivities() || activities.equals(other.activities)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(infinityTower); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(friend); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 72); + output.writeBoolNoTag(npcAffinityReward); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 432); + output.writeBoolNoTag(storySet); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(mail); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(battlePass); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(worldClassReward); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(friendEnergy); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(mallPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(achievement); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawLittleEndian16((short) 386); + output.writeMessageNoTag(travelerDuelQuest); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawLittleEndian16((short) 394); + output.writeMessageNoTag(travelerDuelChallengeQuest); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawLittleEndian16((short) 402); + output.writeMessageNoTag(starTower); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRawLittleEndian16((short) 410); + output.writeMessageNoTag(starTowerBook); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeRawLittleEndian16((short) 418); + output.writeMessageNoTag(scoreBoss); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00010000) != 0) { + for (int i = 0; i < charAdvanceRewards.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(charAdvanceRewards.get(i)); + } + } + if ((bitField0_ & 0x00020000) != 0) { + for (int i = 0; i < charAffinityRewards.length(); i++) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(charAffinityRewards.get(i)); + } + } + if ((bitField0_ & 0x00040000) != 0) { + for (int i = 0; i < activities.length(); i++) { + output.writeRawLittleEndian16((short) 426); + output.writeMessageNoTag(activities.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(infinityTower); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 3; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(mail); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(battlePass); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(worldClassReward); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(friendEnergy); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(mallPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(achievement); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(travelerDuelQuest); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(travelerDuelChallengeQuest); + } + if ((bitField0_ & 0x00001000) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(starTower); + } + if ((bitField0_ & 0x00002000) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(starTowerBook); + } + if ((bitField0_ & 0x00004000) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(scoreBoss); + } + if ((bitField0_ & 0x00008000) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00010000) != 0) { + size += (1 * charAdvanceRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charAdvanceRewards); + } + if ((bitField0_ & 0x00020000) != 0) { + size += (1 * charAffinityRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charAffinityRewards); + } + if ((bitField0_ & 0x00040000) != 0) { + size += (2 * activities.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(activities); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StateInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // infinityTower + infinityTower = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // friend + friend = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // npcAffinityReward + npcAffinityReward = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 176) { + break; + } + } + case 176: { + // storySet + storySet = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // mail + input.readMessage(mail); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // battlePass + input.readMessage(battlePass); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // worldClassReward + input.readMessage(worldClassReward); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // friendEnergy + input.readMessage(friendEnergy); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // mallPackage + input.readMessage(mallPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // achievement + input.readMessage(achievement); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 130) { + break; + } + } + case 130: { + // travelerDuelQuest + input.readMessage(travelerDuelQuest); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 138) { + break; + } + } + case 138: { + // travelerDuelChallengeQuest + input.readMessage(travelerDuelChallengeQuest); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 146) { + break; + } + } + case 146: { + // starTower + input.readMessage(starTower); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 154) { + break; + } + } + case 154: { + // starTowerBook + input.readMessage(starTowerBook); + bitField0_ |= 0x00002000; + tag = input.readTag(); + if (tag != 162) { + break; + } + } + case 162: { + // scoreBoss + input.readMessage(scoreBoss); + bitField0_ |= 0x00004000; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00008000; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // charAdvanceRewards + tag = input.readRepeatedMessage(charAdvanceRewards, tag); + bitField0_ |= 0x00010000; + if (tag != 66) { + break; + } + } + case 66: { + // charAffinityRewards + tag = input.readRepeatedMessage(charAffinityRewards, tag); + bitField0_ |= 0x00020000; + if (tag != 170) { + break; + } + } + case 170: { + // activities + tag = input.readRepeatedMessage(activities, tag); + bitField0_ |= 0x00040000; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.infinityTower, infinityTower); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.friend, friend); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.npcAffinityReward, npcAffinityReward); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.storySet, storySet); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.mail, mail); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.battlePass, battlePass); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeMessage(FieldNames.worldClassReward, worldClassReward); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeMessage(FieldNames.friendEnergy, friendEnergy); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeMessage(FieldNames.mallPackage, mallPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeMessage(FieldNames.achievement, achievement); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeMessage(FieldNames.travelerDuelQuest, travelerDuelQuest); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeMessage(FieldNames.travelerDuelChallengeQuest, travelerDuelChallengeQuest); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeMessage(FieldNames.starTower, starTower); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeMessage(FieldNames.starTowerBook, starTowerBook); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeMessage(FieldNames.scoreBoss, scoreBoss); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00010000) != 0) { + output.writeRepeatedMessage(FieldNames.charAdvanceRewards, charAdvanceRewards); + } + if ((bitField0_ & 0x00020000) != 0) { + output.writeRepeatedMessage(FieldNames.charAffinityRewards, charAffinityRewards); + } + if ((bitField0_ & 0x00040000) != 0) { + output.writeRepeatedMessage(FieldNames.activities, activities); + } + output.endObject(); + } + + @Override + public StateInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -212544095: { + if (input.isAtField(FieldNames.infinityTower)) { + if (!input.trySkipNullValue()) { + infinityTower = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2112550590: { + if (input.isAtField(FieldNames.friend)) { + if (!input.trySkipNullValue()) { + friend = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -206209128: { + if (input.isAtField(FieldNames.npcAffinityReward)) { + if (!input.trySkipNullValue()) { + npcAffinityReward = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1782386509: { + if (input.isAtField(FieldNames.storySet)) { + if (!input.trySkipNullValue()) { + storySet = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2390487: { + if (input.isAtField(FieldNames.mail)) { + if (!input.trySkipNullValue()) { + input.readMessage(mail); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -247928567: { + if (input.isAtField(FieldNames.battlePass)) { + if (!input.trySkipNullValue()) { + input.readMessage(battlePass); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 137440245: { + if (input.isAtField(FieldNames.worldClassReward)) { + if (!input.trySkipNullValue()) { + input.readMessage(worldClassReward); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -499740954: { + if (input.isAtField(FieldNames.friendEnergy)) { + if (!input.trySkipNullValue()) { + input.readMessage(friendEnergy); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -342282382: { + if (input.isAtField(FieldNames.mallPackage)) { + if (!input.trySkipNullValue()) { + input.readMessage(mallPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -879479025: { + if (input.isAtField(FieldNames.achievement)) { + if (!input.trySkipNullValue()) { + input.readMessage(achievement); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1787165987: { + if (input.isAtField(FieldNames.travelerDuelQuest)) { + if (!input.trySkipNullValue()) { + input.readMessage(travelerDuelQuest); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1732134686: { + if (input.isAtField(FieldNames.travelerDuelChallengeQuest)) { + if (!input.trySkipNullValue()) { + input.readMessage(travelerDuelChallengeQuest); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case -154061897: { + if (input.isAtField(FieldNames.starTower)) { + if (!input.trySkipNullValue()) { + input.readMessage(starTower); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -13488320: { + if (input.isAtField(FieldNames.starTowerBook)) { + if (!input.trySkipNullValue()) { + input.readMessage(starTowerBook); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -162564865: { + if (input.isAtField(FieldNames.scoreBoss)) { + if (!input.trySkipNullValue()) { + input.readMessage(scoreBoss); + bitField0_ |= 0x00004000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00008000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 484629848: { + if (input.isAtField(FieldNames.charAdvanceRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charAdvanceRewards); + bitField0_ |= 0x00010000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -889520506: { + if (input.isAtField(FieldNames.charAffinityRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charAffinityRewards); + bitField0_ |= 0x00020000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -252897267: { + if (input.isAtField(FieldNames.activities)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(activities); + bitField0_ |= 0x00040000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StateInfo clone() { + return new StateInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StateInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StateInfo(), data).checkInitialized(); + } + + public static StateInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StateInfo(), input).checkInitialized(); + } + + public static StateInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StateInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating StateInfo messages + */ + public static MessageFactory getFactory() { + return StateInfoFactory.INSTANCE; + } + + private enum StateInfoFactory implements MessageFactory { + INSTANCE; + + @Override + public StateInfo create() { + return StateInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName infinityTower = FieldName.forField("InfinityTower"); + + static final FieldName friend = FieldName.forField("Friend"); + + static final FieldName npcAffinityReward = FieldName.forField("NpcAffinityReward"); + + static final FieldName storySet = FieldName.forField("StorySet"); + + static final FieldName mail = FieldName.forField("Mail"); + + static final FieldName battlePass = FieldName.forField("BattlePass"); + + static final FieldName worldClassReward = FieldName.forField("WorldClassReward"); + + static final FieldName friendEnergy = FieldName.forField("FriendEnergy"); + + static final FieldName mallPackage = FieldName.forField("MallPackage"); + + static final FieldName achievement = FieldName.forField("Achievement"); + + static final FieldName travelerDuelQuest = FieldName.forField("TravelerDuelQuest"); + + static final FieldName travelerDuelChallengeQuest = FieldName.forField("TravelerDuelChallengeQuest"); + + static final FieldName starTower = FieldName.forField("StarTower"); + + static final FieldName starTowerBook = FieldName.forField("StarTowerBook"); + + static final FieldName scoreBoss = FieldName.forField("ScoreBoss"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charAdvanceRewards = FieldName.forField("CharAdvanceRewards"); + + static final FieldName charAffinityRewards = FieldName.forField("CharAffinityRewards"); + + static final FieldName activities = FieldName.forField("Activities"); + } + } + + /** + * Protobuf type {@code ItemTpl} + */ + public static final class ItemTpl extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 Qty = 2; + */ + private int qty; + + /** + * optional uint32 Tid = 1; + */ + private int tid; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ItemTpl() { + } + + /** + * @return a new empty instance of {@code ItemTpl} + */ + public static ItemTpl newInstance() { + return new ItemTpl(); + } + + /** + * optional int32 Qty = 2; + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 Qty = 2; + * @return this + */ + public ItemTpl clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * optional int32 Qty = 2; + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * optional int32 Qty = 2; + * @param value the qty to set + * @return this + */ + public ItemTpl setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * optional uint32 Tid = 1; + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Tid = 1; + * @return this + */ + public ItemTpl clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * optional uint32 Tid = 1; + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * optional uint32 Tid = 1; + * @param value the tid to set + * @return this + */ + public ItemTpl setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ItemTpl clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ItemTpl addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ItemTpl addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ItemTpl setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ItemTpl copyFrom(final ItemTpl other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemTpl mergeFrom(final ItemTpl other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemTpl clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public ItemTpl clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ItemTpl)) { + return false; + } + ItemTpl other = (ItemTpl) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ItemTpl mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ItemTpl mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ItemTpl clone() { + return new ItemTpl().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ItemTpl parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ItemTpl(), data).checkInitialized(); + } + + public static ItemTpl parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemTpl(), input).checkInitialized(); + } + + public static ItemTpl parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemTpl(), input).checkInitialized(); + } + + /** + * @return factory for creating ItemTpl messages + */ + public static MessageFactory getFactory() { + return ItemTplFactory.INSTANCE; + } + + private enum ItemTplFactory implements MessageFactory { + INSTANCE; + + @Override + public ItemTpl create() { + return ItemTpl.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ItemTpls} + */ + public static final class ItemTpls extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * repeated .ItemTpl Items = 1; + */ + private final RepeatedMessage items = RepeatedMessage.newEmptyInstance(ItemTpl.getFactory()); + + private ItemTpls() { + } + + /** + * @return a new empty instance of {@code ItemTpls} + */ + public static ItemTpls newInstance() { + return new ItemTpls(); + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public ItemTpls clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public ItemTpls addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public ItemTpls addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public ItemTpls setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * repeated .ItemTpl Items = 1; + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated .ItemTpl Items = 1; + * @return this + */ + public ItemTpls clearItems() { + bitField0_ &= ~0x00000002; + items.clear(); + return this; + } + + /** + * repeated .ItemTpl Items = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getItems() { + return items; + } + + /** + * repeated .ItemTpl Items = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableItems() { + bitField0_ |= 0x00000002; + return items; + } + + /** + * repeated .ItemTpl Items = 1; + * @param value the items to add + * @return this + */ + public ItemTpls addItems(final ItemTpl value) { + bitField0_ |= 0x00000002; + items.add(value); + return this; + } + + /** + * repeated .ItemTpl Items = 1; + * @param values the items to add + * @return this + */ + public ItemTpls addAllItems(final ItemTpl... values) { + bitField0_ |= 0x00000002; + items.addAll(values); + return this; + } + + @Override + public ItemTpls copyFrom(final ItemTpls other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public ItemTpls mergeFrom(final ItemTpls other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public ItemTpls clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public ItemTpls clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ItemTpls)) { + return false; + } + ItemTpls other = (ItemTpls) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ItemTpls mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public ItemTpls mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ItemTpls clone() { + return new ItemTpls().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ItemTpls parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ItemTpls(), data).checkInitialized(); + } + + public static ItemTpls parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemTpls(), input).checkInitialized(); + } + + public static ItemTpls parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemTpls(), input).checkInitialized(); + } + + /** + * @return factory for creating ItemTpls messages + */ + public static MessageFactory getFactory() { + return ItemTplsFactory.INSTANCE; + } + + private enum ItemTplsFactory implements MessageFactory { + INSTANCE; + + @Override + public ItemTpls create() { + return ItemTpls.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } + + /** + * Protobuf type {@code Item} + */ + public static final class Item extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int64 Expire = 4; + */ + private long expire; + + /** + * optional uint64 Id = 1; + */ + private long id; + + /** + * optional int32 Qty = 3; + */ + private int qty; + + /** + * optional uint32 Tid = 2; + */ + private int tid; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Item() { + } + + /** + * @return a new empty instance of {@code Item} + */ + public static Item newInstance() { + return new Item(); + } + + /** + * optional int64 Expire = 4; + * @return whether the expire field is set + */ + public boolean hasExpire() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int64 Expire = 4; + * @return this + */ + public Item clearExpire() { + bitField0_ &= ~0x00000001; + expire = 0L; + return this; + } + + /** + * optional int64 Expire = 4; + * @return the expire + */ + public long getExpire() { + return expire; + } + + /** + * optional int64 Expire = 4; + * @param value the expire to set + * @return this + */ + public Item setExpire(final long value) { + bitField0_ |= 0x00000001; + expire = value; + return this; + } + + /** + * optional uint64 Id = 1; + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint64 Id = 1; + * @return this + */ + public Item clearId() { + bitField0_ &= ~0x00000002; + id = 0L; + return this; + } + + /** + * optional uint64 Id = 1; + * @return the id + */ + public long getId() { + return id; + } + + /** + * optional uint64 Id = 1; + * @param value the id to set + * @return this + */ + public Item setId(final long value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * optional int32 Qty = 3; + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional int32 Qty = 3; + * @return this + */ + public Item clearQty() { + bitField0_ &= ~0x00000004; + qty = 0; + return this; + } + + /** + * optional int32 Qty = 3; + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * optional int32 Qty = 3; + * @param value the qty to set + * @return this + */ + public Item setQty(final int value) { + bitField0_ |= 0x00000004; + qty = value; + return this; + } + + /** + * optional uint32 Tid = 2; + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional uint32 Tid = 2; + * @return this + */ + public Item clearTid() { + bitField0_ &= ~0x00000008; + tid = 0; + return this; + } + + /** + * optional uint32 Tid = 2; + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * optional uint32 Tid = 2; + * @param value the tid to set + * @return this + */ + public Item setTid(final int value) { + bitField0_ |= 0x00000008; + tid = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Item clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Item addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Item addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Item setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Item copyFrom(final Item other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + expire = other.expire; + id = other.id; + qty = other.qty; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Item mergeFrom(final Item other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExpire()) { + setExpire(other.expire); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Item clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + expire = 0L; + id = 0L; + qty = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public Item clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Item)) { + return false; + } + Item other = (Item) o; + return bitField0_ == other.bitField0_ + && (!hasExpire() || expire == other.expire) + && (!hasId() || id == other.id) + && (!hasQty() || qty == other.qty) + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeInt64NoTag(expire); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(expire); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Item mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // expire + expire = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.expire, expire); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Item mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2089675071: { + if (input.isAtField(FieldNames.expire)) { + if (!input.trySkipNullValue()) { + expire = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Item clone() { + return new Item().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Item parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Item(), data).checkInitialized(); + } + + public static Item parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Item(), input).checkInitialized(); + } + + public static Item parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Item(), input).checkInitialized(); + } + + /** + * @return factory for creating Item messages + */ + public static MessageFactory getFactory() { + return ItemFactory.INSTANCE; + } + + private enum ItemFactory implements MessageFactory { + INSTANCE; + + @Override + public Item create() { + return Item.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName expire = FieldName.forField("Expire"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Res} + */ + public static final class Res extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional int32 Qty = 2; + */ + private int qty; + + /** + * optional uint32 Tid = 1; + */ + private int tid; + + /** + * optional bytes NextPackage = 2047; + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Res() { + } + + /** + * @return a new empty instance of {@code Res} + */ + public static Res newInstance() { + return new Res(); + } + + /** + * optional int32 Qty = 2; + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional int32 Qty = 2; + * @return this + */ + public Res clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * optional int32 Qty = 2; + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * optional int32 Qty = 2; + * @param value the qty to set + * @return this + */ + public Res setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * optional uint32 Tid = 1; + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 Tid = 1; + * @return this + */ + public Res clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * optional uint32 Tid = 1; + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * optional uint32 Tid = 1; + * @param value the tid to set + * @return this + */ + public Res setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional bytes NextPackage = 2047; + * @return this + */ + public Res clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * optional bytes NextPackage = 2047; + * @param value the nextPackage to add + * @return this + */ + public Res addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to add + * @return this + */ + public Res addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * optional bytes NextPackage = 2047; + * @param values the nextPackage to set + * @return this + */ + public Res setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Res copyFrom(final Res other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Res mergeFrom(final Res other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Res clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public Res clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Res)) { + return false; + } + Res other = (Res) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Res mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Res mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Res clone() { + return new Res().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Res parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Res(), data).checkInitialized(); + } + + public static Res parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Res(), input).checkInitialized(); + } + + public static Res parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Res(), input).checkInitialized(); + } + + /** + * @return factory for creating Res messages + */ + public static MessageFactory getFactory() { + return ResFactory.INSTANCE; + } + + private enum ResFactory implements MessageFactory { + INSTANCE; + + @Override + public Res create() { + return Res.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Title} + */ + public static final class Title extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 TitleId = 1;</code> + */ + private int titleId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Title() { + } + + /** + * @return a new empty instance of {@code Title} + */ + public static Title newInstance() { + return new Title(); + } + + /** + * <code>optional uint32 TitleId = 1;</code> + * @return whether the titleId field is set + */ + public boolean hasTitleId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 TitleId = 1;</code> + * @return this + */ + public Title clearTitleId() { + bitField0_ &= ~0x00000001; + titleId = 0; + return this; + } + + /** + * <code>optional uint32 TitleId = 1;</code> + * @return the titleId + */ + public int getTitleId() { + return titleId; + } + + /** + * <code>optional uint32 TitleId = 1;</code> + * @param value the titleId to set + * @return this + */ + public Title setTitleId(final int value) { + bitField0_ |= 0x00000001; + titleId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Title clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Title addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Title addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Title setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Title copyFrom(final Title other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + titleId = other.titleId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Title mergeFrom(final Title other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTitleId()) { + setTitleId(other.titleId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Title clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + titleId = 0; + nextPackage.clear(); + return this; + } + + @Override + public Title clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Title)) { + return false; + } + Title other = (Title) o; + return bitField0_ == other.bitField0_ + && (!hasTitleId() || titleId == other.titleId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(titleId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titleId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Title mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // titleId + titleId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.titleId, titleId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Title mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 357404019: { + if (input.isAtField(FieldNames.titleId)) { + if (!input.trySkipNullValue()) { + titleId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Title clone() { + return new Title().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Title parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Title(), data).checkInitialized(); + } + + public static Title parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Title(), input).checkInitialized(); + } + + public static Title parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Title(), input).checkInitialized(); + } + + /** + * @return factory for creating Title messages + */ + public static MessageFactory<Title> getFactory() { + return TitleFactory.INSTANCE; + } + + private enum TitleFactory implements MessageFactory<Title> { + INSTANCE; + + @Override + public Title create() { + return Title.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName titleId = FieldName.forField("TitleId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Char} + */ + public static final class Char extends ProtoMessage<Char> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 CreateTime = 127;</code> + */ + private long createTime; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional uint32 Exp = 2;</code> + */ + private int exp; + + /** + * <code>optional uint32 Level = 9;</code> + */ + private int level; + + /** + * <code>optional uint32 Skin = 12;</code> + */ + private int skin; + + /** + * <code>optional uint32 AffinityLevel = 13;</code> + */ + private int affinityLevel; + + /** + * <code>optional uint32 AffinityExp = 14;</code> + */ + private int affinityExp; + + /** + * <code>optional uint32 Advance = 15;</code> + */ + private int advance; + + /** + * <code>optional uint32 TalentBackground = 21;</code> + */ + private int talentBackground; + + /** + * <code>optional .Quests AffinityQuests = 17;</code> + */ + private final Quests affinityQuests = Quests.newInstance(); + + /** + * <code>optional .CharGemPresets CharGemPresets = 23;</code> + */ + private final CharGemPresets charGemPresets = CharGemPresets.newInstance(); + + /** + * <code>optional bytes TalentNodes = 19;</code> + */ + private final RepeatedByte talentNodes = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 EquipmentIds = 6;</code> + */ + private final RepeatedLong equipmentIds = RepeatedLong.newEmptyInstance(); + + /** + * <code>repeated uint32 DatingLandmarkIds = 3;</code> + */ + private final RepeatedInt datingLandmarkIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 DatingEventIds = 4;</code> + */ + private final RepeatedInt datingEventIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 DatingEventRewardIds = 5;</code> + */ + private final RepeatedInt datingEventRewardIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 SkillLvs = 10;</code> + */ + private final RepeatedInt skillLvs = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 Plots = 16;</code> + */ + private final RepeatedInt plots = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 ArchiveRewardIds = 20;</code> + */ + private final RepeatedInt archiveRewardIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .CharGemSlot CharGemSlots = 22;</code> + */ + private final RepeatedMessage<CharGemSlot> charGemSlots = RepeatedMessage.newEmptyInstance(CharGemSlot.getFactory()); + + private Char() { + } + + /** + * @return a new empty instance of {@code Char} + */ + public static Char newInstance() { + return new Char(); + } + + /** + * <code>optional int64 CreateTime = 127;</code> + * @return whether the createTime field is set + */ + public boolean hasCreateTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 CreateTime = 127;</code> + * @return this + */ + public Char clearCreateTime() { + bitField0_ &= ~0x00000001; + createTime = 0L; + return this; + } + + /** + * <code>optional int64 CreateTime = 127;</code> + * @return the createTime + */ + public long getCreateTime() { + return createTime; + } + + /** + * <code>optional int64 CreateTime = 127;</code> + * @param value the createTime to set + * @return this + */ + public Char setCreateTime(final long value) { + bitField0_ |= 0x00000001; + createTime = value; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public Char clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public Char setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return this + */ + public Char clearExp() { + bitField0_ &= ~0x00000004; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @param value the exp to set + * @return this + */ + public Char setExp(final int value) { + bitField0_ |= 0x00000004; + exp = value; + return this; + } + + /** + * <code>optional uint32 Level = 9;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Level = 9;</code> + * @return this + */ + public Char clearLevel() { + bitField0_ &= ~0x00000008; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 9;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 9;</code> + * @param value the level to set + * @return this + */ + public Char setLevel(final int value) { + bitField0_ |= 0x00000008; + level = value; + return this; + } + + /** + * <code>optional uint32 Skin = 12;</code> + * @return whether the skin field is set + */ + public boolean hasSkin() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 Skin = 12;</code> + * @return this + */ + public Char clearSkin() { + bitField0_ &= ~0x00000010; + skin = 0; + return this; + } + + /** + * <code>optional uint32 Skin = 12;</code> + * @return the skin + */ + public int getSkin() { + return skin; + } + + /** + * <code>optional uint32 Skin = 12;</code> + * @param value the skin to set + * @return this + */ + public Char setSkin(final int value) { + bitField0_ |= 0x00000010; + skin = value; + return this; + } + + /** + * <code>optional uint32 AffinityLevel = 13;</code> + * @return whether the affinityLevel field is set + */ + public boolean hasAffinityLevel() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 AffinityLevel = 13;</code> + * @return this + */ + public Char clearAffinityLevel() { + bitField0_ &= ~0x00000020; + affinityLevel = 0; + return this; + } + + /** + * <code>optional uint32 AffinityLevel = 13;</code> + * @return the affinityLevel + */ + public int getAffinityLevel() { + return affinityLevel; + } + + /** + * <code>optional uint32 AffinityLevel = 13;</code> + * @param value the affinityLevel to set + * @return this + */ + public Char setAffinityLevel(final int value) { + bitField0_ |= 0x00000020; + affinityLevel = value; + return this; + } + + /** + * <code>optional uint32 AffinityExp = 14;</code> + * @return whether the affinityExp field is set + */ + public boolean hasAffinityExp() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 AffinityExp = 14;</code> + * @return this + */ + public Char clearAffinityExp() { + bitField0_ &= ~0x00000040; + affinityExp = 0; + return this; + } + + /** + * <code>optional uint32 AffinityExp = 14;</code> + * @return the affinityExp + */ + public int getAffinityExp() { + return affinityExp; + } + + /** + * <code>optional uint32 AffinityExp = 14;</code> + * @param value the affinityExp to set + * @return this + */ + public Char setAffinityExp(final int value) { + bitField0_ |= 0x00000040; + affinityExp = value; + return this; + } + + /** + * <code>optional uint32 Advance = 15;</code> + * @return whether the advance field is set + */ + public boolean hasAdvance() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional uint32 Advance = 15;</code> + * @return this + */ + public Char clearAdvance() { + bitField0_ &= ~0x00000080; + advance = 0; + return this; + } + + /** + * <code>optional uint32 Advance = 15;</code> + * @return the advance + */ + public int getAdvance() { + return advance; + } + + /** + * <code>optional uint32 Advance = 15;</code> + * @param value the advance to set + * @return this + */ + public Char setAdvance(final int value) { + bitField0_ |= 0x00000080; + advance = value; + return this; + } + + /** + * <code>optional uint32 TalentBackground = 21;</code> + * @return whether the talentBackground field is set + */ + public boolean hasTalentBackground() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional uint32 TalentBackground = 21;</code> + * @return this + */ + public Char clearTalentBackground() { + bitField0_ &= ~0x00000100; + talentBackground = 0; + return this; + } + + /** + * <code>optional uint32 TalentBackground = 21;</code> + * @return the talentBackground + */ + public int getTalentBackground() { + return talentBackground; + } + + /** + * <code>optional uint32 TalentBackground = 21;</code> + * @param value the talentBackground to set + * @return this + */ + public Char setTalentBackground(final int value) { + bitField0_ |= 0x00000100; + talentBackground = value; + return this; + } + + /** + * <code>optional .Quests AffinityQuests = 17;</code> + * @return whether the affinityQuests field is set + */ + public boolean hasAffinityQuests() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional .Quests AffinityQuests = 17;</code> + * @return this + */ + public Char clearAffinityQuests() { + bitField0_ &= ~0x00000200; + affinityQuests.clear(); + return this; + } + + /** + * <code>optional .Quests AffinityQuests = 17;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAffinityQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Quests getAffinityQuests() { + return affinityQuests; + } + + /** + * <code>optional .Quests AffinityQuests = 17;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Quests getMutableAffinityQuests() { + bitField0_ |= 0x00000200; + return affinityQuests; + } + + /** + * <code>optional .Quests AffinityQuests = 17;</code> + * @param value the affinityQuests to set + * @return this + */ + public Char setAffinityQuests(final Quests value) { + bitField0_ |= 0x00000200; + affinityQuests.copyFrom(value); + return this; + } + + /** + * <code>optional .CharGemPresets CharGemPresets = 23;</code> + * @return whether the charGemPresets field is set + */ + public boolean hasCharGemPresets() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>optional .CharGemPresets CharGemPresets = 23;</code> + * @return this + */ + public Char clearCharGemPresets() { + bitField0_ &= ~0x00000400; + charGemPresets.clear(); + return this; + } + + /** + * <code>optional .CharGemPresets CharGemPresets = 23;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGemPresets()} if you want to modify it. + * + * @return internal storage object for reading + */ + public CharGemPresets getCharGemPresets() { + return charGemPresets; + } + + /** + * <code>optional .CharGemPresets CharGemPresets = 23;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public CharGemPresets getMutableCharGemPresets() { + bitField0_ |= 0x00000400; + return charGemPresets; + } + + /** + * <code>optional .CharGemPresets CharGemPresets = 23;</code> + * @param value the charGemPresets to set + * @return this + */ + public Char setCharGemPresets(final CharGemPresets value) { + bitField0_ |= 0x00000400; + charGemPresets.copyFrom(value); + return this; + } + + /** + * <code>optional bytes TalentNodes = 19;</code> + * @return whether the talentNodes field is set + */ + public boolean hasTalentNodes() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>optional bytes TalentNodes = 19;</code> + * @return this + */ + public Char clearTalentNodes() { + bitField0_ &= ~0x00000800; + talentNodes.clear(); + return this; + } + + /** + * <code>optional bytes TalentNodes = 19;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTalentNodes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getTalentNodes() { + return talentNodes; + } + + /** + * <code>optional bytes TalentNodes = 19;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableTalentNodes() { + bitField0_ |= 0x00000800; + return talentNodes; + } + + /** + * <code>optional bytes TalentNodes = 19;</code> + * @param value the talentNodes to add + * @return this + */ + public Char addTalentNodes(final byte value) { + bitField0_ |= 0x00000800; + talentNodes.add(value); + return this; + } + + /** + * <code>optional bytes TalentNodes = 19;</code> + * @param values the talentNodes to add + * @return this + */ + public Char addAllTalentNodes(final byte... values) { + bitField0_ |= 0x00000800; + talentNodes.addAll(values); + return this; + } + + /** + * <code>optional bytes TalentNodes = 19;</code> + * @param values the talentNodes to set + * @return this + */ + public Char setTalentNodes(final byte... values) { + bitField0_ |= 0x00000800; + talentNodes.copyFrom(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Char clearNextPackage() { + bitField0_ &= ~0x00001000; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00001000; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Char addNextPackage(final byte value) { + bitField0_ |= 0x00001000; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Char addAllNextPackage(final byte... values) { + bitField0_ |= 0x00001000; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Char setNextPackage(final byte... values) { + bitField0_ |= 0x00001000; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 EquipmentIds = 6;</code> + * @return whether the equipmentIds field is set + */ + public boolean hasEquipmentIds() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * <code>repeated uint64 EquipmentIds = 6;</code> + * @return this + */ + public Char clearEquipmentIds() { + bitField0_ &= ~0x00002000; + equipmentIds.clear(); + return this; + } + + /** + * <code>repeated uint64 EquipmentIds = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEquipmentIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getEquipmentIds() { + return equipmentIds; + } + + /** + * <code>repeated uint64 EquipmentIds = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableEquipmentIds() { + bitField0_ |= 0x00002000; + return equipmentIds; + } + + /** + * <code>repeated uint64 EquipmentIds = 6;</code> + * @param value the equipmentIds to add + * @return this + */ + public Char addEquipmentIds(final long value) { + bitField0_ |= 0x00002000; + equipmentIds.add(value); + return this; + } + + /** + * <code>repeated uint64 EquipmentIds = 6;</code> + * @param values the equipmentIds to add + * @return this + */ + public Char addAllEquipmentIds(final long... values) { + bitField0_ |= 0x00002000; + equipmentIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 DatingLandmarkIds = 3;</code> + * @return whether the datingLandmarkIds field is set + */ + public boolean hasDatingLandmarkIds() { + return (bitField0_ & 0x00004000) != 0; + } + + /** + * <code>repeated uint32 DatingLandmarkIds = 3;</code> + * @return this + */ + public Char clearDatingLandmarkIds() { + bitField0_ &= ~0x00004000; + datingLandmarkIds.clear(); + return this; + } + + /** + * <code>repeated uint32 DatingLandmarkIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDatingLandmarkIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDatingLandmarkIds() { + return datingLandmarkIds; + } + + /** + * <code>repeated uint32 DatingLandmarkIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDatingLandmarkIds() { + bitField0_ |= 0x00004000; + return datingLandmarkIds; + } + + /** + * <code>repeated uint32 DatingLandmarkIds = 3;</code> + * @param value the datingLandmarkIds to add + * @return this + */ + public Char addDatingLandmarkIds(final int value) { + bitField0_ |= 0x00004000; + datingLandmarkIds.add(value); + return this; + } + + /** + * <code>repeated uint32 DatingLandmarkIds = 3;</code> + * @param values the datingLandmarkIds to add + * @return this + */ + public Char addAllDatingLandmarkIds(final int... values) { + bitField0_ |= 0x00004000; + datingLandmarkIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 DatingEventIds = 4;</code> + * @return whether the datingEventIds field is set + */ + public boolean hasDatingEventIds() { + return (bitField0_ & 0x00008000) != 0; + } + + /** + * <code>repeated uint32 DatingEventIds = 4;</code> + * @return this + */ + public Char clearDatingEventIds() { + bitField0_ &= ~0x00008000; + datingEventIds.clear(); + return this; + } + + /** + * <code>repeated uint32 DatingEventIds = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDatingEventIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDatingEventIds() { + return datingEventIds; + } + + /** + * <code>repeated uint32 DatingEventIds = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDatingEventIds() { + bitField0_ |= 0x00008000; + return datingEventIds; + } + + /** + * <code>repeated uint32 DatingEventIds = 4;</code> + * @param value the datingEventIds to add + * @return this + */ + public Char addDatingEventIds(final int value) { + bitField0_ |= 0x00008000; + datingEventIds.add(value); + return this; + } + + /** + * <code>repeated uint32 DatingEventIds = 4;</code> + * @param values the datingEventIds to add + * @return this + */ + public Char addAllDatingEventIds(final int... values) { + bitField0_ |= 0x00008000; + datingEventIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 DatingEventRewardIds = 5;</code> + * @return whether the datingEventRewardIds field is set + */ + public boolean hasDatingEventRewardIds() { + return (bitField0_ & 0x00010000) != 0; + } + + /** + * <code>repeated uint32 DatingEventRewardIds = 5;</code> + * @return this + */ + public Char clearDatingEventRewardIds() { + bitField0_ &= ~0x00010000; + datingEventRewardIds.clear(); + return this; + } + + /** + * <code>repeated uint32 DatingEventRewardIds = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDatingEventRewardIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDatingEventRewardIds() { + return datingEventRewardIds; + } + + /** + * <code>repeated uint32 DatingEventRewardIds = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDatingEventRewardIds() { + bitField0_ |= 0x00010000; + return datingEventRewardIds; + } + + /** + * <code>repeated uint32 DatingEventRewardIds = 5;</code> + * @param value the datingEventRewardIds to add + * @return this + */ + public Char addDatingEventRewardIds(final int value) { + bitField0_ |= 0x00010000; + datingEventRewardIds.add(value); + return this; + } + + /** + * <code>repeated uint32 DatingEventRewardIds = 5;</code> + * @param values the datingEventRewardIds to add + * @return this + */ + public Char addAllDatingEventRewardIds(final int... values) { + bitField0_ |= 0x00010000; + datingEventRewardIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 SkillLvs = 10;</code> + * @return whether the skillLvs field is set + */ + public boolean hasSkillLvs() { + return (bitField0_ & 0x00020000) != 0; + } + + /** + * <code>repeated uint32 SkillLvs = 10;</code> + * @return this + */ + public Char clearSkillLvs() { + bitField0_ &= ~0x00020000; + skillLvs.clear(); + return this; + } + + /** + * <code>repeated uint32 SkillLvs = 10;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSkillLvs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getSkillLvs() { + return skillLvs; + } + + /** + * <code>repeated uint32 SkillLvs = 10;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableSkillLvs() { + bitField0_ |= 0x00020000; + return skillLvs; + } + + /** + * <code>repeated uint32 SkillLvs = 10;</code> + * @param value the skillLvs to add + * @return this + */ + public Char addSkillLvs(final int value) { + bitField0_ |= 0x00020000; + skillLvs.add(value); + return this; + } + + /** + * <code>repeated uint32 SkillLvs = 10;</code> + * @param values the skillLvs to add + * @return this + */ + public Char addAllSkillLvs(final int... values) { + bitField0_ |= 0x00020000; + skillLvs.addAll(values); + return this; + } + + /** + * <code>repeated uint32 Plots = 16;</code> + * @return whether the plots field is set + */ + public boolean hasPlots() { + return (bitField0_ & 0x00040000) != 0; + } + + /** + * <code>repeated uint32 Plots = 16;</code> + * @return this + */ + public Char clearPlots() { + bitField0_ &= ~0x00040000; + plots.clear(); + return this; + } + + /** + * <code>repeated uint32 Plots = 16;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePlots()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getPlots() { + return plots; + } + + /** + * <code>repeated uint32 Plots = 16;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutablePlots() { + bitField0_ |= 0x00040000; + return plots; + } + + /** + * <code>repeated uint32 Plots = 16;</code> + * @param value the plots to add + * @return this + */ + public Char addPlots(final int value) { + bitField0_ |= 0x00040000; + plots.add(value); + return this; + } + + /** + * <code>repeated uint32 Plots = 16;</code> + * @param values the plots to add + * @return this + */ + public Char addAllPlots(final int... values) { + bitField0_ |= 0x00040000; + plots.addAll(values); + return this; + } + + /** + * <code>repeated uint32 ArchiveRewardIds = 20;</code> + * @return whether the archiveRewardIds field is set + */ + public boolean hasArchiveRewardIds() { + return (bitField0_ & 0x00080000) != 0; + } + + /** + * <code>repeated uint32 ArchiveRewardIds = 20;</code> + * @return this + */ + public Char clearArchiveRewardIds() { + bitField0_ &= ~0x00080000; + archiveRewardIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ArchiveRewardIds = 20;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableArchiveRewardIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getArchiveRewardIds() { + return archiveRewardIds; + } + + /** + * <code>repeated uint32 ArchiveRewardIds = 20;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableArchiveRewardIds() { + bitField0_ |= 0x00080000; + return archiveRewardIds; + } + + /** + * <code>repeated uint32 ArchiveRewardIds = 20;</code> + * @param value the archiveRewardIds to add + * @return this + */ + public Char addArchiveRewardIds(final int value) { + bitField0_ |= 0x00080000; + archiveRewardIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ArchiveRewardIds = 20;</code> + * @param values the archiveRewardIds to add + * @return this + */ + public Char addAllArchiveRewardIds(final int... values) { + bitField0_ |= 0x00080000; + archiveRewardIds.addAll(values); + return this; + } + + /** + * <code>repeated .CharGemSlot CharGemSlots = 22;</code> + * @return whether the charGemSlots field is set + */ + public boolean hasCharGemSlots() { + return (bitField0_ & 0x00100000) != 0; + } + + /** + * <code>repeated .CharGemSlot CharGemSlots = 22;</code> + * @return this + */ + public Char clearCharGemSlots() { + bitField0_ &= ~0x00100000; + charGemSlots.clear(); + return this; + } + + /** + * <code>repeated .CharGemSlot CharGemSlots = 22;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGemSlots()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<CharGemSlot> getCharGemSlots() { + return charGemSlots; + } + + /** + * <code>repeated .CharGemSlot CharGemSlots = 22;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<CharGemSlot> getMutableCharGemSlots() { + bitField0_ |= 0x00100000; + return charGemSlots; + } + + /** + * <code>repeated .CharGemSlot CharGemSlots = 22;</code> + * @param value the charGemSlots to add + * @return this + */ + public Char addCharGemSlots(final CharGemSlot value) { + bitField0_ |= 0x00100000; + charGemSlots.add(value); + return this; + } + + /** + * <code>repeated .CharGemSlot CharGemSlots = 22;</code> + * @param values the charGemSlots to add + * @return this + */ + public Char addAllCharGemSlots(final CharGemSlot... values) { + bitField0_ |= 0x00100000; + charGemSlots.addAll(values); + return this; + } + + @Override + public Char copyFrom(final Char other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + createTime = other.createTime; + tid = other.tid; + exp = other.exp; + level = other.level; + skin = other.skin; + affinityLevel = other.affinityLevel; + affinityExp = other.affinityExp; + advance = other.advance; + talentBackground = other.talentBackground; + affinityQuests.copyFrom(other.affinityQuests); + charGemPresets.copyFrom(other.charGemPresets); + talentNodes.copyFrom(other.talentNodes); + nextPackage.copyFrom(other.nextPackage); + equipmentIds.copyFrom(other.equipmentIds); + datingLandmarkIds.copyFrom(other.datingLandmarkIds); + datingEventIds.copyFrom(other.datingEventIds); + datingEventRewardIds.copyFrom(other.datingEventRewardIds); + skillLvs.copyFrom(other.skillLvs); + plots.copyFrom(other.plots); + archiveRewardIds.copyFrom(other.archiveRewardIds); + charGemSlots.copyFrom(other.charGemSlots); + } + return this; + } + + @Override + public Char mergeFrom(final Char other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCreateTime()) { + setCreateTime(other.createTime); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasSkin()) { + setSkin(other.skin); + } + if (other.hasAffinityLevel()) { + setAffinityLevel(other.affinityLevel); + } + if (other.hasAffinityExp()) { + setAffinityExp(other.affinityExp); + } + if (other.hasAdvance()) { + setAdvance(other.advance); + } + if (other.hasTalentBackground()) { + setTalentBackground(other.talentBackground); + } + if (other.hasAffinityQuests()) { + getMutableAffinityQuests().mergeFrom(other.affinityQuests); + } + if (other.hasCharGemPresets()) { + getMutableCharGemPresets().mergeFrom(other.charGemPresets); + } + if (other.hasTalentNodes()) { + getMutableTalentNodes().copyFrom(other.talentNodes); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEquipmentIds()) { + getMutableEquipmentIds().addAll(other.equipmentIds); + } + if (other.hasDatingLandmarkIds()) { + getMutableDatingLandmarkIds().addAll(other.datingLandmarkIds); + } + if (other.hasDatingEventIds()) { + getMutableDatingEventIds().addAll(other.datingEventIds); + } + if (other.hasDatingEventRewardIds()) { + getMutableDatingEventRewardIds().addAll(other.datingEventRewardIds); + } + if (other.hasSkillLvs()) { + getMutableSkillLvs().addAll(other.skillLvs); + } + if (other.hasPlots()) { + getMutablePlots().addAll(other.plots); + } + if (other.hasArchiveRewardIds()) { + getMutableArchiveRewardIds().addAll(other.archiveRewardIds); + } + if (other.hasCharGemSlots()) { + getMutableCharGemSlots().addAll(other.charGemSlots); + } + return this; + } + + @Override + public Char clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + createTime = 0L; + tid = 0; + exp = 0; + level = 0; + skin = 0; + affinityLevel = 0; + affinityExp = 0; + advance = 0; + talentBackground = 0; + affinityQuests.clear(); + charGemPresets.clear(); + talentNodes.clear(); + nextPackage.clear(); + equipmentIds.clear(); + datingLandmarkIds.clear(); + datingEventIds.clear(); + datingEventRewardIds.clear(); + skillLvs.clear(); + plots.clear(); + archiveRewardIds.clear(); + charGemSlots.clear(); + return this; + } + + @Override + public Char clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + affinityQuests.clearQuick(); + charGemPresets.clearQuick(); + talentNodes.clear(); + nextPackage.clear(); + equipmentIds.clear(); + datingLandmarkIds.clear(); + datingEventIds.clear(); + datingEventRewardIds.clear(); + skillLvs.clear(); + plots.clear(); + archiveRewardIds.clear(); + charGemSlots.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Char)) { + return false; + } + Char other = (Char) o; + return bitField0_ == other.bitField0_ + && (!hasCreateTime() || createTime == other.createTime) + && (!hasTid() || tid == other.tid) + && (!hasExp() || exp == other.exp) + && (!hasLevel() || level == other.level) + && (!hasSkin() || skin == other.skin) + && (!hasAffinityLevel() || affinityLevel == other.affinityLevel) + && (!hasAffinityExp() || affinityExp == other.affinityExp) + && (!hasAdvance() || advance == other.advance) + && (!hasTalentBackground() || talentBackground == other.talentBackground) + && (!hasAffinityQuests() || affinityQuests.equals(other.affinityQuests)) + && (!hasCharGemPresets() || charGemPresets.equals(other.charGemPresets)) + && (!hasTalentNodes() || talentNodes.equals(other.talentNodes)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEquipmentIds() || equipmentIds.equals(other.equipmentIds)) + && (!hasDatingLandmarkIds() || datingLandmarkIds.equals(other.datingLandmarkIds)) + && (!hasDatingEventIds() || datingEventIds.equals(other.datingEventIds)) + && (!hasDatingEventRewardIds() || datingEventRewardIds.equals(other.datingEventRewardIds)) + && (!hasSkillLvs() || skillLvs.equals(other.skillLvs)) + && (!hasPlots() || plots.equals(other.plots)) + && (!hasArchiveRewardIds() || archiveRewardIds.equals(other.archiveRewardIds)) + && (!hasCharGemSlots() || charGemSlots.equals(other.charGemSlots)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 2040); + output.writeInt64NoTag(createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(skin); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 104); + output.writeUInt32NoTag(affinityLevel); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(affinityExp); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(advance); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 424); + output.writeUInt32NoTag(talentBackground); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawLittleEndian16((short) 394); + output.writeMessageNoTag(affinityQuests); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawLittleEndian16((short) 442); + output.writeMessageNoTag(charGemPresets); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawLittleEndian16((short) 410); + output.writeBytesNoTag(talentNodes); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00002000) != 0) { + for (int i = 0; i < equipmentIds.length(); i++) { + output.writeRawByte((byte) 48); + output.writeUInt64NoTag(equipmentIds.array()[i]); + } + } + if ((bitField0_ & 0x00004000) != 0) { + for (int i = 0; i < datingLandmarkIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(datingLandmarkIds.array()[i]); + } + } + if ((bitField0_ & 0x00008000) != 0) { + for (int i = 0; i < datingEventIds.length(); i++) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(datingEventIds.array()[i]); + } + } + if ((bitField0_ & 0x00010000) != 0) { + for (int i = 0; i < datingEventRewardIds.length(); i++) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(datingEventRewardIds.array()[i]); + } + } + if ((bitField0_ & 0x00020000) != 0) { + for (int i = 0; i < skillLvs.length(); i++) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(skillLvs.array()[i]); + } + } + if ((bitField0_ & 0x00040000) != 0) { + for (int i = 0; i < plots.length(); i++) { + output.writeRawLittleEndian16((short) 384); + output.writeUInt32NoTag(plots.array()[i]); + } + } + if ((bitField0_ & 0x00080000) != 0) { + for (int i = 0; i < archiveRewardIds.length(); i++) { + output.writeRawLittleEndian16((short) 416); + output.writeUInt32NoTag(archiveRewardIds.array()[i]); + } + } + if ((bitField0_ & 0x00100000) != 0) { + for (int i = 0; i < charGemSlots.length(); i++) { + output.writeRawLittleEndian16((short) 434); + output.writeMessageNoTag(charGemSlots.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeInt64SizeNoTag(createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skin); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinityLevel); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinityExp); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(advance); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeUInt32SizeNoTag(talentBackground); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(affinityQuests); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 2 + ProtoSink.computeMessageSizeNoTag(charGemPresets); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(talentNodes); + } + if ((bitField0_ & 0x00001000) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00002000) != 0) { + size += (1 * equipmentIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(equipmentIds); + } + if ((bitField0_ & 0x00004000) != 0) { + size += (1 * datingLandmarkIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(datingLandmarkIds); + } + if ((bitField0_ & 0x00008000) != 0) { + size += (1 * datingEventIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(datingEventIds); + } + if ((bitField0_ & 0x00010000) != 0) { + size += (1 * datingEventRewardIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(datingEventRewardIds); + } + if ((bitField0_ & 0x00020000) != 0) { + size += (1 * skillLvs.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(skillLvs); + } + if ((bitField0_ & 0x00040000) != 0) { + size += (2 * plots.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(plots); + } + if ((bitField0_ & 0x00080000) != 0) { + size += (2 * archiveRewardIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(archiveRewardIds); + } + if ((bitField0_ & 0x00100000) != 0) { + size += (2 * charGemSlots.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charGemSlots); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Char mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 1016: { + // createTime + createTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 96) { + break; + } + } + case 96: { + // skin + skin = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 104) { + break; + } + } + case 104: { + // affinityLevel + affinityLevel = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // affinityExp + affinityExp = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // advance + advance = input.readUInt32(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 168) { + break; + } + } + case 168: { + // talentBackground + talentBackground = input.readUInt32(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 138) { + break; + } + } + case 138: { + // affinityQuests + input.readMessage(affinityQuests); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 186) { + break; + } + } + case 186: { + // charGemPresets + input.readMessage(charGemPresets); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 154) { + break; + } + } + case 154: { + // talentNodes + input.readBytes(talentNodes); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // equipmentIds [packed=true] + input.readPackedUInt64(equipmentIds, tag); + bitField0_ |= 0x00002000; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // datingLandmarkIds [packed=true] + input.readPackedUInt32(datingLandmarkIds, tag); + bitField0_ |= 0x00004000; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // datingEventIds [packed=true] + input.readPackedUInt32(datingEventIds, tag); + bitField0_ |= 0x00008000; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // datingEventRewardIds [packed=true] + input.readPackedUInt32(datingEventRewardIds, tag); + bitField0_ |= 0x00010000; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // skillLvs [packed=true] + input.readPackedUInt32(skillLvs, tag); + bitField0_ |= 0x00020000; + tag = input.readTag(); + if (tag != 130) { + break; + } + } + case 130: { + // plots [packed=true] + input.readPackedUInt32(plots, tag); + bitField0_ |= 0x00040000; + tag = input.readTag(); + if (tag != 162) { + break; + } + } + case 162: { + // archiveRewardIds [packed=true] + input.readPackedUInt32(archiveRewardIds, tag); + bitField0_ |= 0x00080000; + tag = input.readTag(); + if (tag != 178) { + break; + } + } + case 178: { + // charGemSlots + tag = input.readRepeatedMessage(charGemSlots, tag); + bitField0_ |= 0x00100000; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 48: { + // equipmentIds [packed=false] + tag = input.readRepeatedUInt64(equipmentIds, tag); + bitField0_ |= 0x00002000; + break; + } + case 24: { + // datingLandmarkIds [packed=false] + tag = input.readRepeatedUInt32(datingLandmarkIds, tag); + bitField0_ |= 0x00004000; + break; + } + case 32: { + // datingEventIds [packed=false] + tag = input.readRepeatedUInt32(datingEventIds, tag); + bitField0_ |= 0x00008000; + break; + } + case 40: { + // datingEventRewardIds [packed=false] + tag = input.readRepeatedUInt32(datingEventRewardIds, tag); + bitField0_ |= 0x00010000; + break; + } + case 80: { + // skillLvs [packed=false] + tag = input.readRepeatedUInt32(skillLvs, tag); + bitField0_ |= 0x00020000; + break; + } + case 128: { + // plots [packed=false] + tag = input.readRepeatedUInt32(plots, tag); + bitField0_ |= 0x00040000; + break; + } + case 160: { + // archiveRewardIds [packed=false] + tag = input.readRepeatedUInt32(archiveRewardIds, tag); + bitField0_ |= 0x00080000; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.createTime, createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.skin, skin); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.affinityLevel, affinityLevel); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.affinityExp, affinityExp); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeUInt32(FieldNames.advance, advance); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeUInt32(FieldNames.talentBackground, talentBackground); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeMessage(FieldNames.affinityQuests, affinityQuests); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeMessage(FieldNames.charGemPresets, charGemPresets); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeBytes(FieldNames.talentNodes, talentNodes); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRepeatedUInt64(FieldNames.equipmentIds, equipmentIds); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeRepeatedUInt32(FieldNames.datingLandmarkIds, datingLandmarkIds); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeRepeatedUInt32(FieldNames.datingEventIds, datingEventIds); + } + if ((bitField0_ & 0x00010000) != 0) { + output.writeRepeatedUInt32(FieldNames.datingEventRewardIds, datingEventRewardIds); + } + if ((bitField0_ & 0x00020000) != 0) { + output.writeRepeatedUInt32(FieldNames.skillLvs, skillLvs); + } + if ((bitField0_ & 0x00040000) != 0) { + output.writeRepeatedUInt32(FieldNames.plots, plots); + } + if ((bitField0_ & 0x00080000) != 0) { + output.writeRepeatedUInt32(FieldNames.archiveRewardIds, archiveRewardIds); + } + if ((bitField0_ & 0x00100000) != 0) { + output.writeRepeatedMessage(FieldNames.charGemSlots, charGemSlots); + } + output.endObject(); + } + + @Override + public Char mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -932289015: { + if (input.isAtField(FieldNames.createTime)) { + if (!input.trySkipNullValue()) { + createTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2578845: { + if (input.isAtField(FieldNames.skin)) { + if (!input.trySkipNullValue()) { + skin = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1094331164: { + if (input.isAtField(FieldNames.affinityLevel)) { + if (!input.trySkipNullValue()) { + affinityLevel = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1185488821: { + if (input.isAtField(FieldNames.affinityExp)) { + if (!input.trySkipNullValue()) { + affinityExp = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 533086306: { + if (input.isAtField(FieldNames.advance)) { + if (!input.trySkipNullValue()) { + advance = input.readUInt32(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1621290842: { + if (input.isAtField(FieldNames.talentBackground)) { + if (!input.trySkipNullValue()) { + talentBackground = input.readUInt32(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -278042823: { + if (input.isAtField(FieldNames.affinityQuests)) { + if (!input.trySkipNullValue()) { + input.readMessage(affinityQuests); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82576187: { + if (input.isAtField(FieldNames.charGemPresets)) { + if (!input.trySkipNullValue()) { + input.readMessage(charGemPresets); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2029178117: { + if (input.isAtField(FieldNames.talentNodes)) { + if (!input.trySkipNullValue()) { + input.readBytes(talentNodes); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -325125526: { + if (input.isAtField(FieldNames.equipmentIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(equipmentIds); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 346678869: { + if (input.isAtField(FieldNames.datingLandmarkIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(datingLandmarkIds); + bitField0_ |= 0x00004000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1604297751: { + if (input.isAtField(FieldNames.datingEventIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(datingEventIds); + bitField0_ |= 0x00008000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -220649094: { + if (input.isAtField(FieldNames.datingEventRewardIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(datingEventRewardIds); + bitField0_ |= 0x00010000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2087888840: { + if (input.isAtField(FieldNames.skillLvs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(skillLvs); + bitField0_ |= 0x00020000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 77209490: { + if (input.isAtField(FieldNames.plots)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(plots); + bitField0_ |= 0x00040000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1858210439: { + if (input.isAtField(FieldNames.archiveRewardIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(archiveRewardIds); + bitField0_ |= 0x00080000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2084461124: { + if (input.isAtField(FieldNames.charGemSlots)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charGemSlots); + bitField0_ |= 0x00100000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Char clone() { + return new Char().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Char parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Char(), data).checkInitialized(); + } + + public static Char parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Char(), input).checkInitialized(); + } + + public static Char parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Char(), input).checkInitialized(); + } + + /** + * @return factory for creating Char messages + */ + public static MessageFactory<Char> getFactory() { + return CharFactory.INSTANCE; + } + + private enum CharFactory implements MessageFactory<Char> { + INSTANCE; + + @Override + public Char create() { + return Char.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName createTime = FieldName.forField("CreateTime"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName skin = FieldName.forField("Skin"); + + static final FieldName affinityLevel = FieldName.forField("AffinityLevel"); + + static final FieldName affinityExp = FieldName.forField("AffinityExp"); + + static final FieldName advance = FieldName.forField("Advance"); + + static final FieldName talentBackground = FieldName.forField("TalentBackground"); + + static final FieldName affinityQuests = FieldName.forField("AffinityQuests"); + + static final FieldName charGemPresets = FieldName.forField("CharGemPresets"); + + static final FieldName talentNodes = FieldName.forField("TalentNodes"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName equipmentIds = FieldName.forField("EquipmentIds"); + + static final FieldName datingLandmarkIds = FieldName.forField("DatingLandmarkIds"); + + static final FieldName datingEventIds = FieldName.forField("DatingEventIds"); + + static final FieldName datingEventRewardIds = FieldName.forField("DatingEventRewardIds"); + + static final FieldName skillLvs = FieldName.forField("SkillLvs"); + + static final FieldName plots = FieldName.forField("Plots"); + + static final FieldName archiveRewardIds = FieldName.forField("ArchiveRewardIds"); + + static final FieldName charGemSlots = FieldName.forField("CharGemSlots"); + } + } + + /** + * Protobuf type {@code Energy} + */ + public static final class Energy extends ProtoMessage<Energy> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 UpdateTime = 4;</code> + */ + private long updateTime; + + /** + * <code>optional int64 NextDuration = 5;</code> + */ + private long nextDuration; + + /** + * <code>optional uint32 Primary = 1;</code> + */ + private int primary; + + /** + * <code>optional uint32 Secondary = 2;</code> + */ + private int secondary; + + /** + * <code>optional bool IsPrimary = 3;</code> + */ + private boolean isPrimary; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Energy() { + } + + /** + * @return a new empty instance of {@code Energy} + */ + public static Energy newInstance() { + return new Energy(); + } + + /** + * <code>optional int64 UpdateTime = 4;</code> + * @return whether the updateTime field is set + */ + public boolean hasUpdateTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 UpdateTime = 4;</code> + * @return this + */ + public Energy clearUpdateTime() { + bitField0_ &= ~0x00000001; + updateTime = 0L; + return this; + } + + /** + * <code>optional int64 UpdateTime = 4;</code> + * @return the updateTime + */ + public long getUpdateTime() { + return updateTime; + } + + /** + * <code>optional int64 UpdateTime = 4;</code> + * @param value the updateTime to set + * @return this + */ + public Energy setUpdateTime(final long value) { + bitField0_ |= 0x00000001; + updateTime = value; + return this; + } + + /** + * <code>optional int64 NextDuration = 5;</code> + * @return whether the nextDuration field is set + */ + public boolean hasNextDuration() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional int64 NextDuration = 5;</code> + * @return this + */ + public Energy clearNextDuration() { + bitField0_ &= ~0x00000002; + nextDuration = 0L; + return this; + } + + /** + * <code>optional int64 NextDuration = 5;</code> + * @return the nextDuration + */ + public long getNextDuration() { + return nextDuration; + } + + /** + * <code>optional int64 NextDuration = 5;</code> + * @param value the nextDuration to set + * @return this + */ + public Energy setNextDuration(final long value) { + bitField0_ |= 0x00000002; + nextDuration = value; + return this; + } + + /** + * <code>optional uint32 Primary = 1;</code> + * @return whether the primary field is set + */ + public boolean hasPrimary() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Primary = 1;</code> + * @return this + */ + public Energy clearPrimary() { + bitField0_ &= ~0x00000004; + primary = 0; + return this; + } + + /** + * <code>optional uint32 Primary = 1;</code> + * @return the primary + */ + public int getPrimary() { + return primary; + } + + /** + * <code>optional uint32 Primary = 1;</code> + * @param value the primary to set + * @return this + */ + public Energy setPrimary(final int value) { + bitField0_ |= 0x00000004; + primary = value; + return this; + } + + /** + * <code>optional uint32 Secondary = 2;</code> + * @return whether the secondary field is set + */ + public boolean hasSecondary() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Secondary = 2;</code> + * @return this + */ + public Energy clearSecondary() { + bitField0_ &= ~0x00000008; + secondary = 0; + return this; + } + + /** + * <code>optional uint32 Secondary = 2;</code> + * @return the secondary + */ + public int getSecondary() { + return secondary; + } + + /** + * <code>optional uint32 Secondary = 2;</code> + * @param value the secondary to set + * @return this + */ + public Energy setSecondary(final int value) { + bitField0_ |= 0x00000008; + secondary = value; + return this; + } + + /** + * <code>optional bool IsPrimary = 3;</code> + * @return whether the isPrimary field is set + */ + public boolean hasIsPrimary() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bool IsPrimary = 3;</code> + * @return this + */ + public Energy clearIsPrimary() { + bitField0_ &= ~0x00000010; + isPrimary = false; + return this; + } + + /** + * <code>optional bool IsPrimary = 3;</code> + * @return the isPrimary + */ + public boolean getIsPrimary() { + return isPrimary; + } + + /** + * <code>optional bool IsPrimary = 3;</code> + * @param value the isPrimary to set + * @return this + */ + public Energy setIsPrimary(final boolean value) { + bitField0_ |= 0x00000010; + isPrimary = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Energy clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Energy addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Energy addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Energy setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Energy copyFrom(final Energy other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + updateTime = other.updateTime; + nextDuration = other.nextDuration; + primary = other.primary; + secondary = other.secondary; + isPrimary = other.isPrimary; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Energy mergeFrom(final Energy other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasUpdateTime()) { + setUpdateTime(other.updateTime); + } + if (other.hasNextDuration()) { + setNextDuration(other.nextDuration); + } + if (other.hasPrimary()) { + setPrimary(other.primary); + } + if (other.hasSecondary()) { + setSecondary(other.secondary); + } + if (other.hasIsPrimary()) { + setIsPrimary(other.isPrimary); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Energy clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + updateTime = 0L; + nextDuration = 0L; + primary = 0; + secondary = 0; + isPrimary = false; + nextPackage.clear(); + return this; + } + + @Override + public Energy clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Energy)) { + return false; + } + Energy other = (Energy) o; + return bitField0_ == other.bitField0_ + && (!hasUpdateTime() || updateTime == other.updateTime) + && (!hasNextDuration() || nextDuration == other.nextDuration) + && (!hasPrimary() || primary == other.primary) + && (!hasSecondary() || secondary == other.secondary) + && (!hasIsPrimary() || isPrimary == other.isPrimary) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeInt64NoTag(updateTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 40); + output.writeInt64NoTag(nextDuration); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(primary); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(secondary); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(isPrimary); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(updateTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(nextDuration); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(primary); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(secondary); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Energy mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // updateTime + updateTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // nextDuration + nextDuration = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // primary + primary = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // secondary + secondary = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // isPrimary + isPrimary = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.updateTime, updateTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.nextDuration, nextDuration); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.primary, primary); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.secondary, secondary); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.isPrimary, isPrimary); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Energy mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1697533782: { + if (input.isAtField(FieldNames.updateTime)) { + if (!input.trySkipNullValue()) { + updateTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1424551367: { + if (input.isAtField(FieldNames.nextDuration)) { + if (!input.trySkipNullValue()) { + nextDuration = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1349887458: { + if (input.isAtField(FieldNames.primary)) { + if (!input.trySkipNullValue()) { + primary = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1186369876: { + if (input.isAtField(FieldNames.secondary)) { + if (!input.trySkipNullValue()) { + secondary = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1109423448: { + if (input.isAtField(FieldNames.isPrimary)) { + if (!input.trySkipNullValue()) { + isPrimary = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Energy clone() { + return new Energy().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Energy parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Energy(), data).checkInitialized(); + } + + public static Energy parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Energy(), input).checkInitialized(); + } + + public static Energy parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Energy(), input).checkInitialized(); + } + + /** + * @return factory for creating Energy messages + */ + public static MessageFactory<Energy> getFactory() { + return EnergyFactory.INSTANCE; + } + + private enum EnergyFactory implements MessageFactory<Energy> { + INSTANCE; + + @Override + public Energy create() { + return Energy.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName updateTime = FieldName.forField("UpdateTime"); + + static final FieldName nextDuration = FieldName.forField("NextDuration"); + + static final FieldName primary = FieldName.forField("Primary"); + + static final FieldName secondary = FieldName.forField("Secondary"); + + static final FieldName isPrimary = FieldName.forField("IsPrimary"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code WorldClass} + */ + public static final class WorldClass extends ProtoMessage<WorldClass> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 ExpChange = 2;</code> + */ + private int expChange; + + /** + * <code>optional uint32 AddClass = 1;</code> + */ + private int addClass; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private WorldClass() { + } + + /** + * @return a new empty instance of {@code WorldClass} + */ + public static WorldClass newInstance() { + return new WorldClass(); + } + + /** + * <code>optional int32 ExpChange = 2;</code> + * @return whether the expChange field is set + */ + public boolean hasExpChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 ExpChange = 2;</code> + * @return this + */ + public WorldClass clearExpChange() { + bitField0_ &= ~0x00000001; + expChange = 0; + return this; + } + + /** + * <code>optional int32 ExpChange = 2;</code> + * @return the expChange + */ + public int getExpChange() { + return expChange; + } + + /** + * <code>optional int32 ExpChange = 2;</code> + * @param value the expChange to set + * @return this + */ + public WorldClass setExpChange(final int value) { + bitField0_ |= 0x00000001; + expChange = value; + return this; + } + + /** + * <code>optional uint32 AddClass = 1;</code> + * @return whether the addClass field is set + */ + public boolean hasAddClass() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 AddClass = 1;</code> + * @return this + */ + public WorldClass clearAddClass() { + bitField0_ &= ~0x00000002; + addClass = 0; + return this; + } + + /** + * <code>optional uint32 AddClass = 1;</code> + * @return the addClass + */ + public int getAddClass() { + return addClass; + } + + /** + * <code>optional uint32 AddClass = 1;</code> + * @param value the addClass to set + * @return this + */ + public WorldClass setAddClass(final int value) { + bitField0_ |= 0x00000002; + addClass = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public WorldClass clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public WorldClass addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public WorldClass addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public WorldClass setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public WorldClass copyFrom(final WorldClass other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + expChange = other.expChange; + addClass = other.addClass; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClass mergeFrom(final WorldClass other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExpChange()) { + setExpChange(other.expChange); + } + if (other.hasAddClass()) { + setAddClass(other.addClass); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClass clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + expChange = 0; + addClass = 0; + nextPackage.clear(); + return this; + } + + @Override + public WorldClass clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WorldClass)) { + return false; + } + WorldClass other = (WorldClass) o; + return bitField0_ == other.bitField0_ + && (!hasExpChange() || expChange == other.expChange) + && (!hasAddClass() || addClass == other.addClass) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(expChange); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(addClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(expChange); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(addClass); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WorldClass mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // expChange + expChange = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // addClass + addClass = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.expChange, expChange); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.addClass, addClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public WorldClass mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1156898829: { + if (input.isAtField(FieldNames.expChange)) { + if (!input.trySkipNullValue()) { + expChange = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1197285001: { + if (input.isAtField(FieldNames.addClass)) { + if (!input.trySkipNullValue()) { + addClass = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WorldClass clone() { + return new WorldClass().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WorldClass parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WorldClass(), data).checkInitialized(); + } + + public static WorldClass parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClass(), input).checkInitialized(); + } + + public static WorldClass parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClass(), input).checkInitialized(); + } + + /** + * @return factory for creating WorldClass messages + */ + public static MessageFactory<WorldClass> getFactory() { + return WorldClassFactory.INSTANCE; + } + + private enum WorldClassFactory implements MessageFactory<WorldClass> { + INSTANCE; + + @Override + public WorldClass create() { + return WorldClass.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName expChange = FieldName.forField("ExpChange"); + + static final FieldName addClass = FieldName.forField("AddClass"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Equipment} + */ + public static final class Equipment extends ProtoMessage<Equipment> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Qty = 2;</code> + */ + private int qty; + + /** + * <code>optional .EquipmentInfo Info = 1;</code> + */ + private final EquipmentInfo info = EquipmentInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Equipment() { + } + + /** + * @return a new empty instance of {@code Equipment} + */ + public static Equipment newInstance() { + return new Equipment(); + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return this + */ + public Equipment clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @param value the qty to set + * @return this + */ + public Equipment setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * <code>optional .EquipmentInfo Info = 1;</code> + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .EquipmentInfo Info = 1;</code> + * @return this + */ + public Equipment clearInfo() { + bitField0_ &= ~0x00000002; + info.clear(); + return this; + } + + /** + * <code>optional .EquipmentInfo Info = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public EquipmentInfo getInfo() { + return info; + } + + /** + * <code>optional .EquipmentInfo Info = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public EquipmentInfo getMutableInfo() { + bitField0_ |= 0x00000002; + return info; + } + + /** + * <code>optional .EquipmentInfo Info = 1;</code> + * @param value the info to set + * @return this + */ + public Equipment setInfo(final EquipmentInfo value) { + bitField0_ |= 0x00000002; + info.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Equipment clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Equipment addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Equipment addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Equipment setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Equipment copyFrom(final Equipment other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + info.copyFrom(other.info); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Equipment mergeFrom(final Equipment other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Equipment clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + info.clear(); + nextPackage.clear(); + return this; + } + + @Override + public Equipment clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Equipment)) { + return false; + } + Equipment other = (Equipment) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasInfo() || info.equals(other.info)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Equipment mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // info + input.readMessage(info); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Equipment mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Equipment clone() { + return new Equipment().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Equipment parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Equipment(), data).checkInitialized(); + } + + public static Equipment parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Equipment(), input).checkInitialized(); + } + + public static Equipment parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Equipment(), input).checkInitialized(); + } + + /** + * @return factory for creating Equipment messages + */ + public static MessageFactory<Equipment> getFactory() { + return EquipmentFactory.INSTANCE; + } + + private enum EquipmentFactory implements MessageFactory<Equipment> { + INSTANCE; + + @Override + public Equipment create() { + return Equipment.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName info = FieldName.forField("Info"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Disc} + */ + public static final class Disc extends ProtoMessage<Disc> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 CreateTime = 15;</code> + */ + private long createTime; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional uint32 Exp = 3;</code> + */ + private int exp; + + /** + * <code>optional uint32 Phase = 4;</code> + */ + private int phase; + + /** + * <code>optional uint32 Star = 5;</code> + */ + private int star; + + /** + * <code>optional bool Read = 6;</code> + */ + private boolean read; + + /** + * <code>optional bool Avg = 7;</code> + */ + private boolean avg; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Disc() { + } + + /** + * @return a new empty instance of {@code Disc} + */ + public static Disc newInstance() { + return new Disc(); + } + + /** + * <code>optional int64 CreateTime = 15;</code> + * @return whether the createTime field is set + */ + public boolean hasCreateTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 CreateTime = 15;</code> + * @return this + */ + public Disc clearCreateTime() { + bitField0_ &= ~0x00000001; + createTime = 0L; + return this; + } + + /** + * <code>optional int64 CreateTime = 15;</code> + * @return the createTime + */ + public long getCreateTime() { + return createTime; + } + + /** + * <code>optional int64 CreateTime = 15;</code> + * @param value the createTime to set + * @return this + */ + public Disc setCreateTime(final long value) { + bitField0_ |= 0x00000001; + createTime = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public Disc clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public Disc setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return this + */ + public Disc clearLevel() { + bitField0_ &= ~0x00000004; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public Disc setLevel(final int value) { + bitField0_ |= 0x00000004; + level = value; + return this; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @return this + */ + public Disc clearExp() { + bitField0_ &= ~0x00000008; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @param value the exp to set + * @return this + */ + public Disc setExp(final int value) { + bitField0_ |= 0x00000008; + exp = value; + return this; + } + + /** + * <code>optional uint32 Phase = 4;</code> + * @return whether the phase field is set + */ + public boolean hasPhase() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 Phase = 4;</code> + * @return this + */ + public Disc clearPhase() { + bitField0_ &= ~0x00000010; + phase = 0; + return this; + } + + /** + * <code>optional uint32 Phase = 4;</code> + * @return the phase + */ + public int getPhase() { + return phase; + } + + /** + * <code>optional uint32 Phase = 4;</code> + * @param value the phase to set + * @return this + */ + public Disc setPhase(final int value) { + bitField0_ |= 0x00000010; + phase = value; + return this; + } + + /** + * <code>optional uint32 Star = 5;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 Star = 5;</code> + * @return this + */ + public Disc clearStar() { + bitField0_ &= ~0x00000020; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 5;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 5;</code> + * @param value the star to set + * @return this + */ + public Disc setStar(final int value) { + bitField0_ |= 0x00000020; + star = value; + return this; + } + + /** + * <code>optional bool Read = 6;</code> + * @return whether the read field is set + */ + public boolean hasRead() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional bool Read = 6;</code> + * @return this + */ + public Disc clearRead() { + bitField0_ &= ~0x00000040; + read = false; + return this; + } + + /** + * <code>optional bool Read = 6;</code> + * @return the read + */ + public boolean getRead() { + return read; + } + + /** + * <code>optional bool Read = 6;</code> + * @param value the read to set + * @return this + */ + public Disc setRead(final boolean value) { + bitField0_ |= 0x00000040; + read = value; + return this; + } + + /** + * <code>optional bool Avg = 7;</code> + * @return whether the avg field is set + */ + public boolean hasAvg() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional bool Avg = 7;</code> + * @return this + */ + public Disc clearAvg() { + bitField0_ &= ~0x00000080; + avg = false; + return this; + } + + /** + * <code>optional bool Avg = 7;</code> + * @return the avg + */ + public boolean getAvg() { + return avg; + } + + /** + * <code>optional bool Avg = 7;</code> + * @param value the avg to set + * @return this + */ + public Disc setAvg(final boolean value) { + bitField0_ |= 0x00000080; + avg = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Disc clearNextPackage() { + bitField0_ &= ~0x00000100; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000100; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Disc addNextPackage(final byte value) { + bitField0_ |= 0x00000100; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Disc addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Disc setNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Disc copyFrom(final Disc other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + createTime = other.createTime; + id = other.id; + level = other.level; + exp = other.exp; + phase = other.phase; + star = other.star; + read = other.read; + avg = other.avg; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Disc mergeFrom(final Disc other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCreateTime()) { + setCreateTime(other.createTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasPhase()) { + setPhase(other.phase); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasRead()) { + setRead(other.read); + } + if (other.hasAvg()) { + setAvg(other.avg); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Disc clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + createTime = 0L; + id = 0; + level = 0; + exp = 0; + phase = 0; + star = 0; + read = false; + avg = false; + nextPackage.clear(); + return this; + } + + @Override + public Disc clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Disc)) { + return false; + } + Disc other = (Disc) o; + return bitField0_ == other.bitField0_ + && (!hasCreateTime() || createTime == other.createTime) + && (!hasId() || id == other.id) + && (!hasLevel() || level == other.level) + && (!hasExp() || exp == other.exp) + && (!hasPhase() || phase == other.phase) + && (!hasStar() || star == other.star) + && (!hasRead() || read == other.read) + && (!hasAvg() || avg == other.avg) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 120); + output.writeInt64NoTag(createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(phase); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 48); + output.writeBoolNoTag(read); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(avg); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(phase); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Disc mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 120: { + // createTime + createTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // phase + phase = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // read + read = input.readBool(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // avg + avg = input.readBool(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.createTime, createTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.phase, phase); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBool(FieldNames.read, read); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBool(FieldNames.avg, avg); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Disc mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -932289015: { + if (input.isAtField(FieldNames.createTime)) { + if (!input.trySkipNullValue()) { + createTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 77076827: { + if (input.isAtField(FieldNames.phase)) { + if (!input.trySkipNullValue()) { + phase = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2543030: { + if (input.isAtField(FieldNames.read)) { + if (!input.trySkipNullValue()) { + read = input.readBool(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66226: { + if (input.isAtField(FieldNames.avg)) { + if (!input.trySkipNullValue()) { + avg = input.readBool(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Disc clone() { + return new Disc().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Disc parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Disc(), data).checkInitialized(); + } + + public static Disc parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Disc(), input).checkInitialized(); + } + + public static Disc parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Disc(), input).checkInitialized(); + } + + /** + * @return factory for creating Disc messages + */ + public static MessageFactory<Disc> getFactory() { + return DiscFactory.INSTANCE; + } + + private enum DiscFactory implements MessageFactory<Disc> { + INSTANCE; + + @Override + public Disc create() { + return Disc.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName createTime = FieldName.forField("CreateTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName phase = FieldName.forField("Phase"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName read = FieldName.forField("Read"); + + static final FieldName avg = FieldName.forField("Avg"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Transform} + */ + public static final class Transform extends ProtoMessage<Transform> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Src = 1;</code> + */ + private final RepeatedMessage<ItemTpl> src = RepeatedMessage.newEmptyInstance(ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl Dst = 2;</code> + */ + private final RepeatedMessage<ItemTpl> dst = RepeatedMessage.newEmptyInstance(ItemTpl.getFactory()); + + private Transform() { + } + + /** + * @return a new empty instance of {@code Transform} + */ + public static Transform newInstance() { + return new Transform(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Transform clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Transform addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Transform addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Transform setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Src = 1;</code> + * @return whether the src field is set + */ + public boolean hasSrc() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .ItemTpl Src = 1;</code> + * @return this + */ + public Transform clearSrc() { + bitField0_ &= ~0x00000002; + src.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Src = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSrc()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ItemTpl> getSrc() { + return src; + } + + /** + * <code>repeated .ItemTpl Src = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ItemTpl> getMutableSrc() { + bitField0_ |= 0x00000002; + return src; + } + + /** + * <code>repeated .ItemTpl Src = 1;</code> + * @param value the src to add + * @return this + */ + public Transform addSrc(final ItemTpl value) { + bitField0_ |= 0x00000002; + src.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Src = 1;</code> + * @param values the src to add + * @return this + */ + public Transform addAllSrc(final ItemTpl... values) { + bitField0_ |= 0x00000002; + src.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl Dst = 2;</code> + * @return whether the dst field is set + */ + public boolean hasDst() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl Dst = 2;</code> + * @return this + */ + public Transform clearDst() { + bitField0_ &= ~0x00000004; + dst.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Dst = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDst()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ItemTpl> getDst() { + return dst; + } + + /** + * <code>repeated .ItemTpl Dst = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ItemTpl> getMutableDst() { + bitField0_ |= 0x00000004; + return dst; + } + + /** + * <code>repeated .ItemTpl Dst = 2;</code> + * @param value the dst to add + * @return this + */ + public Transform addDst(final ItemTpl value) { + bitField0_ |= 0x00000004; + dst.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Dst = 2;</code> + * @param values the dst to add + * @return this + */ + public Transform addAllDst(final ItemTpl... values) { + bitField0_ |= 0x00000004; + dst.addAll(values); + return this; + } + + @Override + public Transform copyFrom(final Transform other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + src.copyFrom(other.src); + dst.copyFrom(other.dst); + } + return this; + } + + @Override + public Transform mergeFrom(final Transform other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSrc()) { + getMutableSrc().addAll(other.src); + } + if (other.hasDst()) { + getMutableDst().addAll(other.dst); + } + return this; + } + + @Override + public Transform clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + src.clear(); + dst.clear(); + return this; + } + + @Override + public Transform clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + src.clearQuick(); + dst.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Transform)) { + return false; + } + Transform other = (Transform) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSrc() || src.equals(other.src)) + && (!hasDst() || dst.equals(other.dst)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < src.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(src.get(i)); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < dst.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(dst.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * src.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(src); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * dst.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dst); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Transform mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // src + tag = input.readRepeatedMessage(src, tag); + bitField0_ |= 0x00000002; + if (tag != 18) { + break; + } + } + case 18: { + // dst + tag = input.readRepeatedMessage(dst, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.src, src); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.dst, dst); + } + output.endObject(); + } + + @Override + public Transform mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 83396: { + if (input.isAtField(FieldNames.src)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(src); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 69029: { + if (input.isAtField(FieldNames.dst)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(dst); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Transform clone() { + return new Transform().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Transform parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Transform(), data).checkInitialized(); + } + + public static Transform parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Transform(), input).checkInitialized(); + } + + public static Transform parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Transform(), input).checkInitialized(); + } + + /** + * @return factory for creating Transform messages + */ + public static MessageFactory<Transform> getFactory() { + return TransformFactory.INSTANCE; + } + + private enum TransformFactory implements MessageFactory<Transform> { + INSTANCE; + + @Override + public Transform create() { + return Transform.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName src = FieldName.forField("Src"); + + static final FieldName dst = FieldName.forField("Dst"); + } + } + + /** + * Protobuf type {@code HeadIcon} + */ + public static final class HeadIcon extends ProtoMessage<HeadIcon> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private HeadIcon() { + } + + /** + * @return a new empty instance of {@code HeadIcon} + */ + public static HeadIcon newInstance() { + return new HeadIcon(); + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public HeadIcon clearTid() { + bitField0_ &= ~0x00000001; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public HeadIcon setTid(final int value) { + bitField0_ |= 0x00000001; + tid = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public HeadIcon clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public HeadIcon addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public HeadIcon addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public HeadIcon setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public HeadIcon copyFrom(final HeadIcon other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HeadIcon mergeFrom(final HeadIcon other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HeadIcon clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public HeadIcon clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof HeadIcon)) { + return false; + } + HeadIcon other = (HeadIcon) o; + return bitField0_ == other.bitField0_ + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public HeadIcon mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public HeadIcon mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public HeadIcon clone() { + return new HeadIcon().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static HeadIcon parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new HeadIcon(), data).checkInitialized(); + } + + public static HeadIcon parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new HeadIcon(), input).checkInitialized(); + } + + public static HeadIcon parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new HeadIcon(), input).checkInitialized(); + } + + /** + * @return factory for creating HeadIcon messages + */ + public static MessageFactory<HeadIcon> getFactory() { + return HeadIconFactory.INSTANCE; + } + + private enum HeadIconFactory implements MessageFactory<HeadIcon> { + INSTANCE; + + @Override + public HeadIcon create() { + return HeadIcon.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code AcqInfo} + */ + public static final class AcqInfo extends ProtoMessage<AcqInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional uint32 Begin = 2;</code> + */ + private int begin; + + /** + * <code>optional uint32 Count = 3;</code> + */ + private int count; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private AcqInfo() { + } + + /** + * @return a new empty instance of {@code AcqInfo} + */ + public static AcqInfo newInstance() { + return new AcqInfo(); + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public AcqInfo clearTid() { + bitField0_ &= ~0x00000001; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public AcqInfo setTid(final int value) { + bitField0_ |= 0x00000001; + tid = value; + return this; + } + + /** + * <code>optional uint32 Begin = 2;</code> + * @return whether the begin field is set + */ + public boolean hasBegin() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Begin = 2;</code> + * @return this + */ + public AcqInfo clearBegin() { + bitField0_ &= ~0x00000002; + begin = 0; + return this; + } + + /** + * <code>optional uint32 Begin = 2;</code> + * @return the begin + */ + public int getBegin() { + return begin; + } + + /** + * <code>optional uint32 Begin = 2;</code> + * @param value the begin to set + * @return this + */ + public AcqInfo setBegin(final int value) { + bitField0_ |= 0x00000002; + begin = value; + return this; + } + + /** + * <code>optional uint32 Count = 3;</code> + * @return whether the count field is set + */ + public boolean hasCount() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Count = 3;</code> + * @return this + */ + public AcqInfo clearCount() { + bitField0_ &= ~0x00000004; + count = 0; + return this; + } + + /** + * <code>optional uint32 Count = 3;</code> + * @return the count + */ + public int getCount() { + return count; + } + + /** + * <code>optional uint32 Count = 3;</code> + * @param value the count to set + * @return this + */ + public AcqInfo setCount(final int value) { + bitField0_ |= 0x00000004; + count = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public AcqInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public AcqInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public AcqInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public AcqInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public AcqInfo copyFrom(final AcqInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + tid = other.tid; + begin = other.begin; + count = other.count; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AcqInfo mergeFrom(final AcqInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasBegin()) { + setBegin(other.begin); + } + if (other.hasCount()) { + setCount(other.count); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public AcqInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + tid = 0; + begin = 0; + count = 0; + nextPackage.clear(); + return this; + } + + @Override + public AcqInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AcqInfo)) { + return false; + } + AcqInfo other = (AcqInfo) o; + return bitField0_ == other.bitField0_ + && (!hasTid() || tid == other.tid) + && (!hasBegin() || begin == other.begin) + && (!hasCount() || count == other.count) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(begin); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(count); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(begin); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(count); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AcqInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // begin + begin = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // count + count = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.begin, begin); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.count, count); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public AcqInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64063625: { + if (input.isAtField(FieldNames.begin)) { + if (!input.trySkipNullValue()) { + begin = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65298671: { + if (input.isAtField(FieldNames.count)) { + if (!input.trySkipNullValue()) { + count = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AcqInfo clone() { + return new AcqInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AcqInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AcqInfo(), data).checkInitialized(); + } + + public static AcqInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AcqInfo(), input).checkInitialized(); + } + + public static AcqInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AcqInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating AcqInfo messages + */ + public static MessageFactory<AcqInfo> getFactory() { + return AcqInfoFactory.INSTANCE; + } + + private enum AcqInfoFactory implements MessageFactory<AcqInfo> { + INSTANCE; + + @Override + public AcqInfo create() { + return AcqInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName begin = FieldName.forField("Begin"); + + static final FieldName count = FieldName.forField("Count"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Acquire} + */ + public static final class Acquire extends ProtoMessage<Acquire> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .AcqInfo List = 1;</code> + */ + private final RepeatedMessage<AcqInfo> list = RepeatedMessage.newEmptyInstance(AcqInfo.getFactory()); + + private Acquire() { + } + + /** + * @return a new empty instance of {@code Acquire} + */ + public static Acquire newInstance() { + return new Acquire(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Acquire clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Acquire addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Acquire addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Acquire setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .AcqInfo List = 1;</code> + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .AcqInfo List = 1;</code> + * @return this + */ + public Acquire clearList() { + bitField0_ &= ~0x00000002; + list.clear(); + return this; + } + + /** + * <code>repeated .AcqInfo List = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<AcqInfo> getList() { + return list; + } + + /** + * <code>repeated .AcqInfo List = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<AcqInfo> getMutableList() { + bitField0_ |= 0x00000002; + return list; + } + + /** + * <code>repeated .AcqInfo List = 1;</code> + * @param value the list to add + * @return this + */ + public Acquire addList(final AcqInfo value) { + bitField0_ |= 0x00000002; + list.add(value); + return this; + } + + /** + * <code>repeated .AcqInfo List = 1;</code> + * @param values the list to add + * @return this + */ + public Acquire addAllList(final AcqInfo... values) { + bitField0_ |= 0x00000002; + list.addAll(values); + return this; + } + + @Override + public Acquire copyFrom(final Acquire other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + list.copyFrom(other.list); + } + return this; + } + + @Override + public Acquire mergeFrom(final Acquire other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public Acquire clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clear(); + return this; + } + + @Override + public Acquire clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Acquire)) { + return false; + } + Acquire other = (Acquire) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Acquire mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public Acquire mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Acquire clone() { + return new Acquire().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Acquire parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Acquire(), data).checkInitialized(); + } + + public static Acquire parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Acquire(), input).checkInitialized(); + } + + public static Acquire parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Acquire(), input).checkInitialized(); + } + + /** + * @return factory for creating Acquire messages + */ + public static MessageFactory<Acquire> getFactory() { + return AcquireFactory.INSTANCE; + } + + private enum AcquireFactory implements MessageFactory<Acquire> { + INSTANCE; + + @Override + public Acquire create() { + return Acquire.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code Honor} + */ + public static final class Honor extends ProtoMessage<Honor> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 NewId = 1;</code> + */ + private int newId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Honor() { + } + + /** + * @return a new empty instance of {@code Honor} + */ + public static Honor newInstance() { + return new Honor(); + } + + /** + * <code>optional uint32 NewId = 1;</code> + * @return whether the newId field is set + */ + public boolean hasNewId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 NewId = 1;</code> + * @return this + */ + public Honor clearNewId() { + bitField0_ &= ~0x00000001; + newId = 0; + return this; + } + + /** + * <code>optional uint32 NewId = 1;</code> + * @return the newId + */ + public int getNewId() { + return newId; + } + + /** + * <code>optional uint32 NewId = 1;</code> + * @param value the newId to set + * @return this + */ + public Honor setNewId(final int value) { + bitField0_ |= 0x00000001; + newId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Honor clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Honor addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Honor addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Honor setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Honor copyFrom(final Honor other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + newId = other.newId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Honor mergeFrom(final Honor other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNewId()) { + setNewId(other.newId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Honor clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + newId = 0; + nextPackage.clear(); + return this; + } + + @Override + public Honor clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Honor)) { + return false; + } + Honor other = (Honor) o; + return bitField0_ == other.bitField0_ + && (!hasNewId() || newId == other.newId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(newId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(newId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Honor mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // newId + newId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.newId, newId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Honor mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 75160251: { + if (input.isAtField(FieldNames.newId)) { + if (!input.trySkipNullValue()) { + newId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Honor clone() { + return new Honor().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Honor parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Honor(), data).checkInitialized(); + } + + public static Honor parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Honor(), input).checkInitialized(); + } + + public static Honor parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Honor(), input).checkInitialized(); + } + + /** + * @return factory for creating Honor messages + */ + public static MessageFactory<Honor> getFactory() { + return HonorFactory.INSTANCE; + } + + private enum HonorFactory implements MessageFactory<Honor> { + INSTANCE; + + @Override + public Honor create() { + return Honor.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName newId = FieldName.forField("NewId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ChangeInfo} + */ + public static final class ChangeInfo extends ProtoMessage<ChangeInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .Any Props = 1;</code> + */ + private final RepeatedMessage<AnyOuterClass.Any> props = RepeatedMessage.newEmptyInstance(AnyOuterClass.Any.getFactory()); + + private ChangeInfo() { + } + + /** + * @return a new empty instance of {@code ChangeInfo} + */ + public static ChangeInfo newInstance() { + return new ChangeInfo(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ChangeInfo clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ChangeInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ChangeInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ChangeInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .Any Props = 1;</code> + * @return whether the props field is set + */ + public boolean hasProps() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .Any Props = 1;</code> + * @return this + */ + public ChangeInfo clearProps() { + bitField0_ &= ~0x00000002; + props.clear(); + return this; + } + + /** + * <code>repeated .Any Props = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableProps()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<AnyOuterClass.Any> getProps() { + return props; + } + + /** + * <code>repeated .Any Props = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<AnyOuterClass.Any> getMutableProps() { + bitField0_ |= 0x00000002; + return props; + } + + /** + * <code>repeated .Any Props = 1;</code> + * @param value the props to add + * @return this + */ + public ChangeInfo addProps(final AnyOuterClass.Any value) { + bitField0_ |= 0x00000002; + props.add(value); + return this; + } + + /** + * <code>repeated .Any Props = 1;</code> + * @param values the props to add + * @return this + */ + public ChangeInfo addAllProps(final AnyOuterClass.Any... values) { + bitField0_ |= 0x00000002; + props.addAll(values); + return this; + } + + @Override + public ChangeInfo copyFrom(final ChangeInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + props.copyFrom(other.props); + } + return this; + } + + @Override + public ChangeInfo mergeFrom(final ChangeInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasProps()) { + getMutableProps().addAll(other.props); + } + return this; + } + + @Override + public ChangeInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + props.clear(); + return this; + } + + @Override + public ChangeInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + props.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ChangeInfo)) { + return false; + } + ChangeInfo other = (ChangeInfo) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasProps() || props.equals(other.props)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < props.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(props.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * props.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(props); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ChangeInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // props + tag = input.readRepeatedMessage(props, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.props, props); + } + output.endObject(); + } + + @Override + public ChangeInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 77388112: { + if (input.isAtField(FieldNames.props)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(props); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ChangeInfo clone() { + return new ChangeInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ChangeInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ChangeInfo(), data).checkInitialized(); + } + + public static ChangeInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ChangeInfo(), input).checkInitialized(); + } + + public static ChangeInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ChangeInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating ChangeInfo messages + */ + public static MessageFactory<ChangeInfo> getFactory() { + return ChangeInfoFactory.INSTANCE; + } + + private enum ChangeInfoFactory implements MessageFactory<ChangeInfo> { + INSTANCE; + + @Override + public ChangeInfo create() { + return ChangeInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName props = FieldName.forField("Props"); + } + } + + /** + * Protobuf type {@code FormationInfo} + */ + public static final class FormationInfo extends ProtoMessage<FormationInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Number = 1;</code> + */ + private int number; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 CharIds = 2;</code> + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 DiscIds = 3;</code> + */ + private final RepeatedInt discIds = RepeatedInt.newEmptyInstance(); + + private FormationInfo() { + } + + /** + * @return a new empty instance of {@code FormationInfo} + */ + public static FormationInfo newInstance() { + return new FormationInfo(); + } + + /** + * <code>optional uint32 Number = 1;</code> + * @return whether the number field is set + */ + public boolean hasNumber() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Number = 1;</code> + * @return this + */ + public FormationInfo clearNumber() { + bitField0_ &= ~0x00000001; + number = 0; + return this; + } + + /** + * <code>optional uint32 Number = 1;</code> + * @return the number + */ + public int getNumber() { + return number; + } + + /** + * <code>optional uint32 Number = 1;</code> + * @param value the number to set + * @return this + */ + public FormationInfo setNumber(final int value) { + bitField0_ |= 0x00000001; + number = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public FormationInfo clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public FormationInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public FormationInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public FormationInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 CharIds = 2;</code> + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 CharIds = 2;</code> + * @return this + */ + public FormationInfo clearCharIds() { + bitField0_ &= ~0x00000004; + charIds.clear(); + return this; + } + + /** + * <code>repeated uint32 CharIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * <code>repeated uint32 CharIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000004; + return charIds; + } + + /** + * <code>repeated uint32 CharIds = 2;</code> + * @param value the charIds to add + * @return this + */ + public FormationInfo addCharIds(final int value) { + bitField0_ |= 0x00000004; + charIds.add(value); + return this; + } + + /** + * <code>repeated uint32 CharIds = 2;</code> + * @param values the charIds to add + * @return this + */ + public FormationInfo addAllCharIds(final int... values) { + bitField0_ |= 0x00000004; + charIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 DiscIds = 3;</code> + * @return whether the discIds field is set + */ + public boolean hasDiscIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 DiscIds = 3;</code> + * @return this + */ + public FormationInfo clearDiscIds() { + bitField0_ &= ~0x00000008; + discIds.clear(); + return this; + } + + /** + * <code>repeated uint32 DiscIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDiscIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDiscIds() { + return discIds; + } + + /** + * <code>repeated uint32 DiscIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDiscIds() { + bitField0_ |= 0x00000008; + return discIds; + } + + /** + * <code>repeated uint32 DiscIds = 3;</code> + * @param value the discIds to add + * @return this + */ + public FormationInfo addDiscIds(final int value) { + bitField0_ |= 0x00000008; + discIds.add(value); + return this; + } + + /** + * <code>repeated uint32 DiscIds = 3;</code> + * @param values the discIds to add + * @return this + */ + public FormationInfo addAllDiscIds(final int... values) { + bitField0_ |= 0x00000008; + discIds.addAll(values); + return this; + } + + @Override + public FormationInfo copyFrom(final FormationInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + number = other.number; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + discIds.copyFrom(other.discIds); + } + return this; + } + + @Override + public FormationInfo mergeFrom(final FormationInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNumber()) { + setNumber(other.number); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + if (other.hasDiscIds()) { + getMutableDiscIds().addAll(other.discIds); + } + return this; + } + + @Override + public FormationInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + number = 0; + nextPackage.clear(); + charIds.clear(); + discIds.clear(); + return this; + } + + @Override + public FormationInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + discIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FormationInfo)) { + return false; + } + FormationInfo other = (FormationInfo) o; + return bitField0_ == other.bitField0_ + && (!hasNumber() || number == other.number) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)) + && (!hasDiscIds() || discIds.equals(other.discIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(number); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < discIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(discIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(number); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * discIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(discIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FormationInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // number + number = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // discIds [packed=true] + input.readPackedUInt32(discIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000004; + break; + } + case 24: { + // discIds [packed=false] + tag = input.readRepeatedUInt32(discIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.number, number); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.discIds, discIds); + } + output.endObject(); + } + + @Override + public FormationInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1950496919: { + if (input.isAtField(FieldNames.number)) { + if (!input.trySkipNullValue()) { + number = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -958970685: { + if (input.isAtField(FieldNames.discIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(discIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FormationInfo clone() { + return new FormationInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FormationInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FormationInfo(), data).checkInitialized(); + } + + public static FormationInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FormationInfo(), input).checkInitialized(); + } + + public static FormationInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FormationInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating FormationInfo messages + */ + public static MessageFactory<FormationInfo> getFactory() { + return FormationInfoFactory.INSTANCE; + } + + private enum FormationInfoFactory implements MessageFactory<FormationInfo> { + INSTANCE; + + @Override + public FormationInfo create() { + return FormationInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName number = FieldName.forField("Number"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + + static final FieldName discIds = FieldName.forField("DiscIds"); + } + } + + /** + * Protobuf type {@code FormationRecord} + */ + public static final class FormationRecord extends ProtoMessage<FormationRecord> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 GroupId = 1;</code> + */ + private int groupId; + + /** + * <code>optional uint32 Number = 2;</code> + */ + private int number; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FormationRecord() { + } + + /** + * @return a new empty instance of {@code FormationRecord} + */ + public static FormationRecord newInstance() { + return new FormationRecord(); + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @return whether the groupId field is set + */ + public boolean hasGroupId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @return this + */ + public FormationRecord clearGroupId() { + bitField0_ &= ~0x00000001; + groupId = 0; + return this; + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @return the groupId + */ + public int getGroupId() { + return groupId; + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @param value the groupId to set + * @return this + */ + public FormationRecord setGroupId(final int value) { + bitField0_ |= 0x00000001; + groupId = value; + return this; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return whether the number field is set + */ + public boolean hasNumber() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return this + */ + public FormationRecord clearNumber() { + bitField0_ &= ~0x00000002; + number = 0; + return this; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return the number + */ + public int getNumber() { + return number; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @param value the number to set + * @return this + */ + public FormationRecord setNumber(final int value) { + bitField0_ |= 0x00000002; + number = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public FormationRecord clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public FormationRecord addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public FormationRecord addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public FormationRecord setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FormationRecord copyFrom(final FormationRecord other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + groupId = other.groupId; + number = other.number; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FormationRecord mergeFrom(final FormationRecord other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGroupId()) { + setGroupId(other.groupId); + } + if (other.hasNumber()) { + setNumber(other.number); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FormationRecord clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + groupId = 0; + number = 0; + nextPackage.clear(); + return this; + } + + @Override + public FormationRecord clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FormationRecord)) { + return false; + } + FormationRecord other = (FormationRecord) o; + return bitField0_ == other.bitField0_ + && (!hasGroupId() || groupId == other.groupId) + && (!hasNumber() || number == other.number) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(number); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(number); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FormationRecord mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // groupId + groupId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // number + number = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.groupId, groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.number, number); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FormationRecord mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1958081498: { + if (input.isAtField(FieldNames.groupId)) { + if (!input.trySkipNullValue()) { + groupId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1950496919: { + if (input.isAtField(FieldNames.number)) { + if (!input.trySkipNullValue()) { + number = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FormationRecord clone() { + return new FormationRecord().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FormationRecord parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FormationRecord(), data).checkInitialized(); + } + + public static FormationRecord parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FormationRecord(), input).checkInitialized(); + } + + public static FormationRecord parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FormationRecord(), input).checkInitialized(); + } + + /** + * @return factory for creating FormationRecord messages + */ + public static MessageFactory<FormationRecord> getFactory() { + return FormationRecordFactory.INSTANCE; + } + + private enum FormationRecordFactory implements MessageFactory<FormationRecord> { + INSTANCE; + + @Override + public FormationRecord create() { + return FormationRecord.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName groupId = FieldName.forField("GroupId"); + + static final FieldName number = FieldName.forField("Number"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TowerFormation} + */ + public static final class TowerFormation extends ProtoMessage<TowerFormation> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .FormationInfo Info = 1;</code> + */ + private final RepeatedMessage<FormationInfo> info = RepeatedMessage.newEmptyInstance(FormationInfo.getFactory()); + + /** + * <code>repeated .FormationRecord Record = 2;</code> + */ + private final RepeatedMessage<FormationRecord> record = RepeatedMessage.newEmptyInstance(FormationRecord.getFactory()); + + private TowerFormation() { + } + + /** + * @return a new empty instance of {@code TowerFormation} + */ + public static TowerFormation newInstance() { + return new TowerFormation(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerFormation clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerFormation addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerFormation addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerFormation setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .FormationInfo Info = 1;</code> + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .FormationInfo Info = 1;</code> + * @return this + */ + public TowerFormation clearInfo() { + bitField0_ &= ~0x00000002; + info.clear(); + return this; + } + + /** + * <code>repeated .FormationInfo Info = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<FormationInfo> getInfo() { + return info; + } + + /** + * <code>repeated .FormationInfo Info = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<FormationInfo> getMutableInfo() { + bitField0_ |= 0x00000002; + return info; + } + + /** + * <code>repeated .FormationInfo Info = 1;</code> + * @param value the info to add + * @return this + */ + public TowerFormation addInfo(final FormationInfo value) { + bitField0_ |= 0x00000002; + info.add(value); + return this; + } + + /** + * <code>repeated .FormationInfo Info = 1;</code> + * @param values the info to add + * @return this + */ + public TowerFormation addAllInfo(final FormationInfo... values) { + bitField0_ |= 0x00000002; + info.addAll(values); + return this; + } + + /** + * <code>repeated .FormationRecord Record = 2;</code> + * @return whether the record field is set + */ + public boolean hasRecord() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .FormationRecord Record = 2;</code> + * @return this + */ + public TowerFormation clearRecord() { + bitField0_ &= ~0x00000004; + record.clear(); + return this; + } + + /** + * <code>repeated .FormationRecord Record = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecord()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<FormationRecord> getRecord() { + return record; + } + + /** + * <code>repeated .FormationRecord Record = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<FormationRecord> getMutableRecord() { + bitField0_ |= 0x00000004; + return record; + } + + /** + * <code>repeated .FormationRecord Record = 2;</code> + * @param value the record to add + * @return this + */ + public TowerFormation addRecord(final FormationRecord value) { + bitField0_ |= 0x00000004; + record.add(value); + return this; + } + + /** + * <code>repeated .FormationRecord Record = 2;</code> + * @param values the record to add + * @return this + */ + public TowerFormation addAllRecord(final FormationRecord... values) { + bitField0_ |= 0x00000004; + record.addAll(values); + return this; + } + + @Override + public TowerFormation copyFrom(final TowerFormation other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + info.copyFrom(other.info); + record.copyFrom(other.record); + } + return this; + } + + @Override + public TowerFormation mergeFrom(final TowerFormation other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfo()) { + getMutableInfo().addAll(other.info); + } + if (other.hasRecord()) { + getMutableRecord().addAll(other.record); + } + return this; + } + + @Override + public TowerFormation clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + info.clear(); + record.clear(); + return this; + } + + @Override + public TowerFormation clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + info.clearQuick(); + record.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerFormation)) { + return false; + } + TowerFormation other = (TowerFormation) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfo() || info.equals(other.info)) + && (!hasRecord() || record.equals(other.record)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < info.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(info.get(i)); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < record.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(record.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * info.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * record.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(record); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerFormation mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // info + tag = input.readRepeatedMessage(info, tag); + bitField0_ |= 0x00000002; + if (tag != 18) { + break; + } + } + case 18: { + // record + tag = input.readRepeatedMessage(record, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.record, record); + } + output.endObject(); + } + + @Override + public TowerFormation mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(info); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851041679: { + if (input.isAtField(FieldNames.record)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(record); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerFormation clone() { + return new TowerFormation().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerFormation parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerFormation(), data).checkInitialized(); + } + + public static TowerFormation parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerFormation(), input).checkInitialized(); + } + + public static TowerFormation parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerFormation(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerFormation messages + */ + public static MessageFactory<TowerFormation> getFactory() { + return TowerFormationFactory.INSTANCE; + } + + private enum TowerFormationFactory implements MessageFactory<TowerFormation> { + INSTANCE; + + @Override + public TowerFormation create() { + return TowerFormation.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName info = FieldName.forField("Info"); + + static final FieldName record = FieldName.forField("Record"); + } + } + + /** + * Protobuf type {@code StoryChoice} + */ + public static final class StoryChoice extends ProtoMessage<StoryChoice> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Group = 1;</code> + */ + private int group; + + /** + * <code>optional uint32 Value = 2;</code> + */ + private int value_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StoryChoice() { + } + + /** + * @return a new empty instance of {@code StoryChoice} + */ + public static StoryChoice newInstance() { + return new StoryChoice(); + } + + /** + * <code>optional uint32 Group = 1;</code> + * @return whether the group field is set + */ + public boolean hasGroup() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Group = 1;</code> + * @return this + */ + public StoryChoice clearGroup() { + bitField0_ &= ~0x00000001; + group = 0; + return this; + } + + /** + * <code>optional uint32 Group = 1;</code> + * @return the group + */ + public int getGroup() { + return group; + } + + /** + * <code>optional uint32 Group = 1;</code> + * @param value the group to set + * @return this + */ + public StoryChoice setGroup(final int value) { + bitField0_ |= 0x00000001; + group = value; + return this; + } + + /** + * <code>optional uint32 Value = 2;</code> + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Value = 2;</code> + * @return this + */ + public StoryChoice clearValue() { + bitField0_ &= ~0x00000002; + value_ = 0; + return this; + } + + /** + * <code>optional uint32 Value = 2;</code> + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * <code>optional uint32 Value = 2;</code> + * @param value the value_ to set + * @return this + */ + public StoryChoice setValue(final int value) { + bitField0_ |= 0x00000002; + value_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StoryChoice clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StoryChoice addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StoryChoice addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StoryChoice setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StoryChoice copyFrom(final StoryChoice other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + group = other.group; + value_ = other.value_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StoryChoice mergeFrom(final StoryChoice other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGroup()) { + setGroup(other.group); + } + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StoryChoice clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + group = 0; + value_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public StoryChoice clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StoryChoice)) { + return false; + } + StoryChoice other = (StoryChoice) o; + return bitField0_ == other.bitField0_ + && (!hasGroup() || group == other.group) + && (!hasValue() || value_ == other.value_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(group); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(value_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(group); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(value_); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StoryChoice mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // group + group = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // value_ + value_ = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.group, group); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StoryChoice mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 69076575: { + if (input.isAtField(FieldNames.group)) { + if (!input.trySkipNullValue()) { + group = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StoryChoice clone() { + return new StoryChoice().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StoryChoice parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StoryChoice(), data).checkInitialized(); + } + + public static StoryChoice parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryChoice(), input).checkInitialized(); + } + + public static StoryChoice parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryChoice(), input).checkInitialized(); + } + + /** + * @return factory for creating StoryChoice messages + */ + public static MessageFactory<StoryChoice> getFactory() { + return StoryChoiceFactory.INSTANCE; + } + + private enum StoryChoiceFactory implements MessageFactory<StoryChoice> { + INSTANCE; + + @Override + public StoryChoice create() { + return StoryChoice.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName group = FieldName.forField("Group"); + + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Story} + */ + public static final class Story extends ProtoMessage<Story> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Idx = 1;</code> + */ + private int idx; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StoryChoice Major = 2;</code> + */ + private final RepeatedMessage<StoryChoice> major = RepeatedMessage.newEmptyInstance(StoryChoice.getFactory()); + + /** + * <code>repeated .StoryChoice Personality = 3;</code> + */ + private final RepeatedMessage<StoryChoice> personality = RepeatedMessage.newEmptyInstance(StoryChoice.getFactory()); + + private Story() { + } + + /** + * @return a new empty instance of {@code Story} + */ + public static Story newInstance() { + return new Story(); + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return whether the idx field is set + */ + public boolean hasIdx() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return this + */ + public Story clearIdx() { + bitField0_ &= ~0x00000001; + idx = 0; + return this; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return the idx + */ + public int getIdx() { + return idx; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @param value the idx to set + * @return this + */ + public Story setIdx(final int value) { + bitField0_ |= 0x00000001; + idx = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Story clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Story addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Story addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Story setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StoryChoice Major = 2;</code> + * @return whether the major field is set + */ + public boolean hasMajor() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .StoryChoice Major = 2;</code> + * @return this + */ + public Story clearMajor() { + bitField0_ &= ~0x00000004; + major.clear(); + return this; + } + + /** + * <code>repeated .StoryChoice Major = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMajor()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StoryChoice> getMajor() { + return major; + } + + /** + * <code>repeated .StoryChoice Major = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StoryChoice> getMutableMajor() { + bitField0_ |= 0x00000004; + return major; + } + + /** + * <code>repeated .StoryChoice Major = 2;</code> + * @param value the major to add + * @return this + */ + public Story addMajor(final StoryChoice value) { + bitField0_ |= 0x00000004; + major.add(value); + return this; + } + + /** + * <code>repeated .StoryChoice Major = 2;</code> + * @param values the major to add + * @return this + */ + public Story addAllMajor(final StoryChoice... values) { + bitField0_ |= 0x00000004; + major.addAll(values); + return this; + } + + /** + * <code>repeated .StoryChoice Personality = 3;</code> + * @return whether the personality field is set + */ + public boolean hasPersonality() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .StoryChoice Personality = 3;</code> + * @return this + */ + public Story clearPersonality() { + bitField0_ &= ~0x00000008; + personality.clear(); + return this; + } + + /** + * <code>repeated .StoryChoice Personality = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePersonality()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StoryChoice> getPersonality() { + return personality; + } + + /** + * <code>repeated .StoryChoice Personality = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StoryChoice> getMutablePersonality() { + bitField0_ |= 0x00000008; + return personality; + } + + /** + * <code>repeated .StoryChoice Personality = 3;</code> + * @param value the personality to add + * @return this + */ + public Story addPersonality(final StoryChoice value) { + bitField0_ |= 0x00000008; + personality.add(value); + return this; + } + + /** + * <code>repeated .StoryChoice Personality = 3;</code> + * @param values the personality to add + * @return this + */ + public Story addAllPersonality(final StoryChoice... values) { + bitField0_ |= 0x00000008; + personality.addAll(values); + return this; + } + + @Override + public Story copyFrom(final Story other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + idx = other.idx; + nextPackage.copyFrom(other.nextPackage); + major.copyFrom(other.major); + personality.copyFrom(other.personality); + } + return this; + } + + @Override + public Story mergeFrom(final Story other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasIdx()) { + setIdx(other.idx); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasMajor()) { + getMutableMajor().addAll(other.major); + } + if (other.hasPersonality()) { + getMutablePersonality().addAll(other.personality); + } + return this; + } + + @Override + public Story clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + idx = 0; + nextPackage.clear(); + major.clear(); + personality.clear(); + return this; + } + + @Override + public Story clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + major.clearQuick(); + personality.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Story)) { + return false; + } + Story other = (Story) o; + return bitField0_ == other.bitField0_ + && (!hasIdx() || idx == other.idx) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasMajor() || major.equals(other.major)) + && (!hasPersonality() || personality.equals(other.personality)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(idx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < major.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(major.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < personality.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(personality.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(idx); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * major.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(major); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * personality.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(personality); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Story mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // idx + idx = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // major + tag = input.readRepeatedMessage(major, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // personality + tag = input.readRepeatedMessage(personality, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.idx, idx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.major, major); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.personality, personality); + } + output.endObject(); + } + + @Override + public Story mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73373: { + if (input.isAtField(FieldNames.idx)) { + if (!input.trySkipNullValue()) { + idx = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 74106265: { + if (input.isAtField(FieldNames.major)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(major); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1243902542: { + if (input.isAtField(FieldNames.personality)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(personality); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Story clone() { + return new Story().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Story parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Story(), data).checkInitialized(); + } + + public static Story parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Story(), input).checkInitialized(); + } + + public static Story parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Story(), input).checkInitialized(); + } + + /** + * @return factory for creating Story messages + */ + public static MessageFactory<Story> getFactory() { + return StoryFactory.INSTANCE; + } + + private enum StoryFactory implements MessageFactory<Story> { + INSTANCE; + + @Override + public Story create() { + return Story.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName idx = FieldName.forField("Idx"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName major = FieldName.forField("Major"); + + static final FieldName personality = FieldName.forField("Personality"); + } + } + + /** + * Protobuf type {@code StoryInfo} + */ + public static final class StoryInfo extends ProtoMessage<StoryInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 3;</code> + */ + private long buildId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Evidences = 1;</code> + */ + private final RepeatedInt evidences = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .Story Stories = 2;</code> + */ + private final RepeatedMessage<Story> stories = RepeatedMessage.newEmptyInstance(Story.getFactory()); + + private StoryInfo() { + } + + /** + * @return a new empty instance of {@code StoryInfo} + */ + public static StoryInfo newInstance() { + return new StoryInfo(); + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return this + */ + public StoryInfo clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @param value the buildId to set + * @return this + */ + public StoryInfo setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StoryInfo clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StoryInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StoryInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StoryInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Evidences = 1;</code> + * @return whether the evidences field is set + */ + public boolean hasEvidences() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Evidences = 1;</code> + * @return this + */ + public StoryInfo clearEvidences() { + bitField0_ &= ~0x00000004; + evidences.clear(); + return this; + } + + /** + * <code>repeated uint32 Evidences = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvidences()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getEvidences() { + return evidences; + } + + /** + * <code>repeated uint32 Evidences = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableEvidences() { + bitField0_ |= 0x00000004; + return evidences; + } + + /** + * <code>repeated uint32 Evidences = 1;</code> + * @param value the evidences to add + * @return this + */ + public StoryInfo addEvidences(final int value) { + bitField0_ |= 0x00000004; + evidences.add(value); + return this; + } + + /** + * <code>repeated uint32 Evidences = 1;</code> + * @param values the evidences to add + * @return this + */ + public StoryInfo addAllEvidences(final int... values) { + bitField0_ |= 0x00000004; + evidences.addAll(values); + return this; + } + + /** + * <code>repeated .Story Stories = 2;</code> + * @return whether the stories field is set + */ + public boolean hasStories() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .Story Stories = 2;</code> + * @return this + */ + public StoryInfo clearStories() { + bitField0_ &= ~0x00000008; + stories.clear(); + return this; + } + + /** + * <code>repeated .Story Stories = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStories()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Story> getStories() { + return stories; + } + + /** + * <code>repeated .Story Stories = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Story> getMutableStories() { + bitField0_ |= 0x00000008; + return stories; + } + + /** + * <code>repeated .Story Stories = 2;</code> + * @param value the stories to add + * @return this + */ + public StoryInfo addStories(final Story value) { + bitField0_ |= 0x00000008; + stories.add(value); + return this; + } + + /** + * <code>repeated .Story Stories = 2;</code> + * @param values the stories to add + * @return this + */ + public StoryInfo addAllStories(final Story... values) { + bitField0_ |= 0x00000008; + stories.addAll(values); + return this; + } + + @Override + public StoryInfo copyFrom(final StoryInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + nextPackage.copyFrom(other.nextPackage); + evidences.copyFrom(other.evidences); + stories.copyFrom(other.stories); + } + return this; + } + + @Override + public StoryInfo mergeFrom(final StoryInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEvidences()) { + getMutableEvidences().addAll(other.evidences); + } + if (other.hasStories()) { + getMutableStories().addAll(other.stories); + } + return this; + } + + @Override + public StoryInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + nextPackage.clear(); + evidences.clear(); + stories.clear(); + return this; + } + + @Override + public StoryInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + evidences.clear(); + stories.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StoryInfo)) { + return false; + } + StoryInfo other = (StoryInfo) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEvidences() || evidences.equals(other.evidences)) + && (!hasStories() || stories.equals(other.stories)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < evidences.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(evidences.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < stories.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(stories.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * evidences.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(evidences); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * stories.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(stories); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StoryInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // evidences [packed=true] + input.readPackedUInt32(evidences, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // stories + tag = input.readRepeatedMessage(stories, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // evidences [packed=false] + tag = input.readRepeatedUInt32(evidences, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.evidences, evidences); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.stories, stories); + } + output.endObject(); + } + + @Override + public StoryInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 991055068: { + if (input.isAtField(FieldNames.evidences)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(evidences); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -219613133: { + if (input.isAtField(FieldNames.stories)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(stories); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StoryInfo clone() { + return new StoryInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StoryInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StoryInfo(), data).checkInitialized(); + } + + public static StoryInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryInfo(), input).checkInitialized(); + } + + public static StoryInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating StoryInfo messages + */ + public static MessageFactory<StoryInfo> getFactory() { + return StoryInfoFactory.INSTANCE; + } + + private enum StoryInfoFactory implements MessageFactory<StoryInfo> { + INSTANCE; + + @Override + public StoryInfo create() { + return StoryInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName evidences = FieldName.forField("Evidences"); + + static final FieldName stories = FieldName.forField("Stories"); + } + } + + /** + * Protobuf type {@code RoomRestored} + */ + public static final class RoomRestored extends ProtoMessage<RoomRestored> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 RoomId = 1;</code> + */ + private int roomId; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final ChangeInfo change = ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private RoomRestored() { + } + + /** + * @return a new empty instance of {@code RoomRestored} + */ + public static RoomRestored newInstance() { + return new RoomRestored(); + } + + /** + * <code>optional uint32 RoomId = 1;</code> + * @return whether the roomId field is set + */ + public boolean hasRoomId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 RoomId = 1;</code> + * @return this + */ + public RoomRestored clearRoomId() { + bitField0_ &= ~0x00000001; + roomId = 0; + return this; + } + + /** + * <code>optional uint32 RoomId = 1;</code> + * @return the roomId + */ + public int getRoomId() { + return roomId; + } + + /** + * <code>optional uint32 RoomId = 1;</code> + * @param value the roomId to set + * @return this + */ + public RoomRestored setRoomId(final int value) { + bitField0_ |= 0x00000001; + roomId = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public RoomRestored clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public RoomRestored setChange(final ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RoomRestored clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RoomRestored addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RoomRestored addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RoomRestored setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public RoomRestored copyFrom(final RoomRestored other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + roomId = other.roomId; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RoomRestored mergeFrom(final RoomRestored other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRoomId()) { + setRoomId(other.roomId); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RoomRestored clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + roomId = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public RoomRestored clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RoomRestored)) { + return false; + } + RoomRestored other = (RoomRestored) o; + return bitField0_ == other.bitField0_ + && (!hasRoomId() || roomId == other.roomId) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(roomId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(roomId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RoomRestored mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // roomId + roomId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.roomId, roomId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public RoomRestored mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1841452170: { + if (input.isAtField(FieldNames.roomId)) { + if (!input.trySkipNullValue()) { + roomId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RoomRestored clone() { + return new RoomRestored().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RoomRestored parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RoomRestored(), data).checkInitialized(); + } + + public static RoomRestored parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RoomRestored(), input).checkInitialized(); + } + + public static RoomRestored parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RoomRestored(), input).checkInitialized(); + } + + /** + * @return factory for creating RoomRestored messages + */ + public static MessageFactory<RoomRestored> getFactory() { + return RoomRestoredFactory.INSTANCE; + } + + private enum RoomRestoredFactory implements MessageFactory<RoomRestored> { + INSTANCE; + + @Override + public RoomRestored create() { + return RoomRestored.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName roomId = FieldName.forField("RoomId"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DropPkg} + */ + public static final class DropPkg extends ProtoMessage<DropPkg> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Drops = 1;</code> + */ + private final RepeatedMessage<ItemTpl> drops = RepeatedMessage.newEmptyInstance(ItemTpl.getFactory()); + + private DropPkg() { + } + + /** + * @return a new empty instance of {@code DropPkg} + */ + public static DropPkg newInstance() { + return new DropPkg(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public DropPkg clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public DropPkg addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public DropPkg addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public DropPkg setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Drops = 1;</code> + * @return whether the drops field is set + */ + public boolean hasDrops() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .ItemTpl Drops = 1;</code> + * @return this + */ + public DropPkg clearDrops() { + bitField0_ &= ~0x00000002; + drops.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Drops = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDrops()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ItemTpl> getDrops() { + return drops; + } + + /** + * <code>repeated .ItemTpl Drops = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ItemTpl> getMutableDrops() { + bitField0_ |= 0x00000002; + return drops; + } + + /** + * <code>repeated .ItemTpl Drops = 1;</code> + * @param value the drops to add + * @return this + */ + public DropPkg addDrops(final ItemTpl value) { + bitField0_ |= 0x00000002; + drops.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Drops = 1;</code> + * @param values the drops to add + * @return this + */ + public DropPkg addAllDrops(final ItemTpl... values) { + bitField0_ |= 0x00000002; + drops.addAll(values); + return this; + } + + @Override + public DropPkg copyFrom(final DropPkg other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + drops.copyFrom(other.drops); + } + return this; + } + + @Override + public DropPkg mergeFrom(final DropPkg other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasDrops()) { + getMutableDrops().addAll(other.drops); + } + return this; + } + + @Override + public DropPkg clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + drops.clear(); + return this; + } + + @Override + public DropPkg clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + drops.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DropPkg)) { + return false; + } + DropPkg other = (DropPkg) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasDrops() || drops.equals(other.drops)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < drops.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(drops.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * drops.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(drops); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DropPkg mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // drops + tag = input.readRepeatedMessage(drops, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.drops, drops); + } + output.endObject(); + } + + @Override + public DropPkg mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66305860: { + if (input.isAtField(FieldNames.drops)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(drops); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DropPkg clone() { + return new DropPkg().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DropPkg parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DropPkg(), data).checkInitialized(); + } + + public static DropPkg parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DropPkg(), input).checkInitialized(); + } + + public static DropPkg parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DropPkg(), input).checkInitialized(); + } + + /** + * @return factory for creating DropPkg messages + */ + public static MessageFactory<DropPkg> getFactory() { + return DropPkgFactory.INSTANCE; + } + + private enum DropPkgFactory implements MessageFactory<DropPkg> { + INSTANCE; + + @Override + public DropPkg create() { + return DropPkg.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName drops = FieldName.forField("Drops"); + } + } + + /** + * Protobuf type {@code MonsterDrop} + */ + public static final class MonsterDrop extends ProtoMessage<MonsterDrop> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 MonsterIndex = 1;</code> + */ + private int monsterIndex; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .DropPkg DropPkgs = 2;</code> + */ + private final RepeatedMessage<DropPkg> dropPkgs = RepeatedMessage.newEmptyInstance(DropPkg.getFactory()); + + private MonsterDrop() { + } + + /** + * @return a new empty instance of {@code MonsterDrop} + */ + public static MonsterDrop newInstance() { + return new MonsterDrop(); + } + + /** + * <code>optional uint32 MonsterIndex = 1;</code> + * @return whether the monsterIndex field is set + */ + public boolean hasMonsterIndex() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 MonsterIndex = 1;</code> + * @return this + */ + public MonsterDrop clearMonsterIndex() { + bitField0_ &= ~0x00000001; + monsterIndex = 0; + return this; + } + + /** + * <code>optional uint32 MonsterIndex = 1;</code> + * @return the monsterIndex + */ + public int getMonsterIndex() { + return monsterIndex; + } + + /** + * <code>optional uint32 MonsterIndex = 1;</code> + * @param value the monsterIndex to set + * @return this + */ + public MonsterDrop setMonsterIndex(final int value) { + bitField0_ |= 0x00000001; + monsterIndex = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MonsterDrop clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MonsterDrop addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MonsterDrop addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MonsterDrop setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .DropPkg DropPkgs = 2;</code> + * @return whether the dropPkgs field is set + */ + public boolean hasDropPkgs() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .DropPkg DropPkgs = 2;</code> + * @return this + */ + public MonsterDrop clearDropPkgs() { + bitField0_ &= ~0x00000004; + dropPkgs.clear(); + return this; + } + + /** + * <code>repeated .DropPkg DropPkgs = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDropPkgs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<DropPkg> getDropPkgs() { + return dropPkgs; + } + + /** + * <code>repeated .DropPkg DropPkgs = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<DropPkg> getMutableDropPkgs() { + bitField0_ |= 0x00000004; + return dropPkgs; + } + + /** + * <code>repeated .DropPkg DropPkgs = 2;</code> + * @param value the dropPkgs to add + * @return this + */ + public MonsterDrop addDropPkgs(final DropPkg value) { + bitField0_ |= 0x00000004; + dropPkgs.add(value); + return this; + } + + /** + * <code>repeated .DropPkg DropPkgs = 2;</code> + * @param values the dropPkgs to add + * @return this + */ + public MonsterDrop addAllDropPkgs(final DropPkg... values) { + bitField0_ |= 0x00000004; + dropPkgs.addAll(values); + return this; + } + + @Override + public MonsterDrop copyFrom(final MonsterDrop other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + monsterIndex = other.monsterIndex; + nextPackage.copyFrom(other.nextPackage); + dropPkgs.copyFrom(other.dropPkgs); + } + return this; + } + + @Override + public MonsterDrop mergeFrom(final MonsterDrop other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMonsterIndex()) { + setMonsterIndex(other.monsterIndex); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasDropPkgs()) { + getMutableDropPkgs().addAll(other.dropPkgs); + } + return this; + } + + @Override + public MonsterDrop clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + monsterIndex = 0; + nextPackage.clear(); + dropPkgs.clear(); + return this; + } + + @Override + public MonsterDrop clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + dropPkgs.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MonsterDrop)) { + return false; + } + MonsterDrop other = (MonsterDrop) o; + return bitField0_ == other.bitField0_ + && (!hasMonsterIndex() || monsterIndex == other.monsterIndex) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasDropPkgs() || dropPkgs.equals(other.dropPkgs)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(monsterIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < dropPkgs.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(dropPkgs.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(monsterIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * dropPkgs.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dropPkgs); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MonsterDrop mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // monsterIndex + monsterIndex = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // dropPkgs + tag = input.readRepeatedMessage(dropPkgs, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.monsterIndex, monsterIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.dropPkgs, dropPkgs); + } + output.endObject(); + } + + @Override + public MonsterDrop mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 696458552: { + if (input.isAtField(FieldNames.monsterIndex)) { + if (!input.trySkipNullValue()) { + monsterIndex = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -368017450: { + if (input.isAtField(FieldNames.dropPkgs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(dropPkgs); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MonsterDrop clone() { + return new MonsterDrop().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MonsterDrop parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MonsterDrop(), data).checkInitialized(); + } + + public static MonsterDrop parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MonsterDrop(), input).checkInitialized(); + } + + public static MonsterDrop parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MonsterDrop(), input).checkInitialized(); + } + + /** + * @return factory for creating MonsterDrop messages + */ + public static MessageFactory<MonsterDrop> getFactory() { + return MonsterDropFactory.INSTANCE; + } + + private enum MonsterDropFactory implements MessageFactory<MonsterDrop> { + INSTANCE; + + @Override + public MonsterDrop create() { + return MonsterDrop.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName monsterIndex = FieldName.forField("MonsterIndex"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName dropPkgs = FieldName.forField("DropPkgs"); + } + } + + /** + * Protobuf type {@code WorldClassUpdate} + */ + public static final class WorldClassUpdate extends ProtoMessage<WorldClassUpdate> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Cur = 1;</code> + */ + private int cur; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final ChangeInfo change = ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private WorldClassUpdate() { + } + + /** + * @return a new empty instance of {@code WorldClassUpdate} + */ + public static WorldClassUpdate newInstance() { + return new WorldClassUpdate(); + } + + /** + * <code>optional uint32 Cur = 1;</code> + * @return whether the cur field is set + */ + public boolean hasCur() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Cur = 1;</code> + * @return this + */ + public WorldClassUpdate clearCur() { + bitField0_ &= ~0x00000001; + cur = 0; + return this; + } + + /** + * <code>optional uint32 Cur = 1;</code> + * @return the cur + */ + public int getCur() { + return cur; + } + + /** + * <code>optional uint32 Cur = 1;</code> + * @param value the cur to set + * @return this + */ + public WorldClassUpdate setCur(final int value) { + bitField0_ |= 0x00000001; + cur = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public WorldClassUpdate clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public WorldClassUpdate setChange(final ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public WorldClassUpdate clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public WorldClassUpdate addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public WorldClassUpdate addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public WorldClassUpdate setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public WorldClassUpdate copyFrom(final WorldClassUpdate other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + cur = other.cur; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClassUpdate mergeFrom(final WorldClassUpdate other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCur()) { + setCur(other.cur); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WorldClassUpdate clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + cur = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public WorldClassUpdate clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WorldClassUpdate)) { + return false; + } + WorldClassUpdate other = (WorldClassUpdate) o; + return bitField0_ == other.bitField0_ + && (!hasCur() || cur == other.cur) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(cur); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(cur); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WorldClassUpdate mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // cur + cur = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.cur, cur); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public WorldClassUpdate mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 68128: { + if (input.isAtField(FieldNames.cur)) { + if (!input.trySkipNullValue()) { + cur = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WorldClassUpdate clone() { + return new WorldClassUpdate().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WorldClassUpdate parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WorldClassUpdate(), data).checkInitialized(); + } + + public static WorldClassUpdate parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClassUpdate(), input).checkInitialized(); + } + + public static WorldClassUpdate parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WorldClassUpdate(), input).checkInitialized(); + } + + /** + * @return factory for creating WorldClassUpdate messages + */ + public static MessageFactory<WorldClassUpdate> getFactory() { + return WorldClassUpdateFactory.INSTANCE; + } + + private enum WorldClassUpdateFactory implements MessageFactory<WorldClassUpdate> { + INSTANCE; + + @Override + public WorldClassUpdate create() { + return WorldClassUpdate.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName cur = FieldName.forField("Cur"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ItemInfo} + */ + public static final class ItemInfo extends ProtoMessage<ItemInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 Id = 1;</code> + */ + private long id; + + /** + * <code>optional uint32 Tid = 2;</code> + */ + private int tid; + + /** + * <code>optional uint32 Qty = 3;</code> + */ + private int qty; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ItemInfo() { + } + + /** + * @return a new empty instance of {@code ItemInfo} + */ + public static ItemInfo newInstance() { + return new ItemInfo(); + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return this + */ + public ItemInfo clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return the id + */ + public long getId() { + return id; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ItemInfo setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @return this + */ + public ItemInfo clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @param value the tid to set + * @return this + */ + public ItemInfo setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * <code>optional uint32 Qty = 3;</code> + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Qty = 3;</code> + * @return this + */ + public ItemInfo clearQty() { + bitField0_ &= ~0x00000004; + qty = 0; + return this; + } + + /** + * <code>optional uint32 Qty = 3;</code> + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * <code>optional uint32 Qty = 3;</code> + * @param value the qty to set + * @return this + */ + public ItemInfo setQty(final int value) { + bitField0_ |= 0x00000004; + qty = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ItemInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ItemInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ItemInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ItemInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ItemInfo copyFrom(final ItemInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + tid = other.tid; + qty = other.qty; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemInfo mergeFrom(final ItemInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ItemInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + tid = 0; + qty = 0; + nextPackage.clear(); + return this; + } + + @Override + public ItemInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ItemInfo)) { + return false; + } + ItemInfo other = (ItemInfo) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTid() || tid == other.tid) + && (!hasQty() || qty == other.qty) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(qty); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ItemInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // qty + qty = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ItemInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ItemInfo clone() { + return new ItemInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ItemInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ItemInfo(), data).checkInitialized(); + } + + public static ItemInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemInfo(), input).checkInitialized(); + } + + public static ItemInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ItemInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating ItemInfo messages + */ + public static MessageFactory<ItemInfo> getFactory() { + return ItemInfoFactory.INSTANCE; + } + + private enum ItemInfoFactory implements MessageFactory<ItemInfo> { + INSTANCE; + + @Override + public ItemInfo create() { + return ItemInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code RegionBossLevel} + */ + public static final class RegionBossLevel extends ProtoMessage<RegionBossLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 5;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional bool First = 3;</code> + */ + private boolean first; + + /** + * <code>optional bool ThreeStar = 4;</code> + */ + private boolean threeStar; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private RegionBossLevel() { + } + + /** + * @return a new empty instance of {@code RegionBossLevel} + */ + public static RegionBossLevel newInstance() { + return new RegionBossLevel(); + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return this + */ + public RegionBossLevel clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @param value the buildId to set + * @return this + */ + public RegionBossLevel setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public RegionBossLevel clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public RegionBossLevel setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public RegionBossLevel clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public RegionBossLevel setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional bool First = 3;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool First = 3;</code> + * @return this + */ + public RegionBossLevel clearFirst() { + bitField0_ &= ~0x00000008; + first = false; + return this; + } + + /** + * <code>optional bool First = 3;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 3;</code> + * @param value the first to set + * @return this + */ + public RegionBossLevel setFirst(final boolean value) { + bitField0_ |= 0x00000008; + first = value; + return this; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return whether the threeStar field is set + */ + public boolean hasThreeStar() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return this + */ + public RegionBossLevel clearThreeStar() { + bitField0_ &= ~0x00000010; + threeStar = false; + return this; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return the threeStar + */ + public boolean getThreeStar() { + return threeStar; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @param value the threeStar to set + * @return this + */ + public RegionBossLevel setThreeStar(final boolean value) { + bitField0_ |= 0x00000010; + threeStar = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RegionBossLevel clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RegionBossLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RegionBossLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RegionBossLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public RegionBossLevel copyFrom(final RegionBossLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + star = other.star; + first = other.first; + threeStar = other.threeStar; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevel mergeFrom(final RegionBossLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasThreeStar()) { + setThreeStar(other.threeStar); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + star = 0; + first = false; + threeStar = false; + nextPackage.clear(); + return this; + } + + @Override + public RegionBossLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RegionBossLevel)) { + return false; + } + RegionBossLevel other = (RegionBossLevel) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasFirst() || first == other.first) + && (!hasThreeStar() || threeStar == other.threeStar) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(threeStar); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RegionBossLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // first + first = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // threeStar + threeStar = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.threeStar, threeStar); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public RegionBossLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 444940528: { + if (input.isAtField(FieldNames.threeStar)) { + if (!input.trySkipNullValue()) { + threeStar = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RegionBossLevel clone() { + return new RegionBossLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RegionBossLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RegionBossLevel(), data).checkInitialized(); + } + + public static RegionBossLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevel(), input).checkInitialized(); + } + + public static RegionBossLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating RegionBossLevel messages + */ + public static MessageFactory<RegionBossLevel> getFactory() { + return RegionBossLevelFactory.INSTANCE; + } + + private enum RegionBossLevelFactory implements MessageFactory<RegionBossLevel> { + INSTANCE; + + @Override + public RegionBossLevel create() { + return RegionBossLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName threeStar = FieldName.forField("ThreeStar"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Friend} + */ + public static final class Friend extends ProtoMessage<Friend> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 LastLoginTime = 5;</code> + */ + private long lastLoginTime; + + /** + * <code>optional uint64 Id = 1;</code> + */ + private long id; + + /** + * <code>optional uint32 Hashtag = 3;</code> + */ + private int hashtag; + + /** + * <code>optional uint32 HeadIcon = 4;</code> + */ + private int headIcon; + + /** + * <code>optional uint32 WorldClass = 6;</code> + */ + private int worldClass; + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + */ + private int titlePrefix; + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + */ + private int titleSuffix; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string NickName = 2;</code> + */ + private final Utf8String nickName = Utf8String.newEmptyInstance(); + + /** + * <code>optional string Signature = 9;</code> + */ + private final Utf8String signature = Utf8String.newEmptyInstance(); + + /** + * <code>repeated .CharShow CharShows = 10;</code> + */ + private final RepeatedMessage<CharShow> charShows = RepeatedMessage.newEmptyInstance(CharShow.getFactory()); + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + */ + private final RepeatedMessage<HonorInfo> honors = RepeatedMessage.newEmptyInstance(HonorInfo.getFactory()); + + private Friend() { + } + + /** + * @return a new empty instance of {@code Friend} + */ + public static Friend newInstance() { + return new Friend(); + } + + /** + * <code>optional int64 LastLoginTime = 5;</code> + * @return whether the lastLoginTime field is set + */ + public boolean hasLastLoginTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 LastLoginTime = 5;</code> + * @return this + */ + public Friend clearLastLoginTime() { + bitField0_ &= ~0x00000001; + lastLoginTime = 0L; + return this; + } + + /** + * <code>optional int64 LastLoginTime = 5;</code> + * @return the lastLoginTime + */ + public long getLastLoginTime() { + return lastLoginTime; + } + + /** + * <code>optional int64 LastLoginTime = 5;</code> + * @param value the lastLoginTime to set + * @return this + */ + public Friend setLastLoginTime(final long value) { + bitField0_ |= 0x00000001; + lastLoginTime = value; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return this + */ + public Friend clearId() { + bitField0_ &= ~0x00000002; + id = 0L; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return the id + */ + public long getId() { + return id; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @param value the id to set + * @return this + */ + public Friend setId(final long value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Hashtag = 3;</code> + * @return whether the hashtag field is set + */ + public boolean hasHashtag() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Hashtag = 3;</code> + * @return this + */ + public Friend clearHashtag() { + bitField0_ &= ~0x00000004; + hashtag = 0; + return this; + } + + /** + * <code>optional uint32 Hashtag = 3;</code> + * @return the hashtag + */ + public int getHashtag() { + return hashtag; + } + + /** + * <code>optional uint32 Hashtag = 3;</code> + * @param value the hashtag to set + * @return this + */ + public Friend setHashtag(final int value) { + bitField0_ |= 0x00000004; + hashtag = value; + return this; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return whether the headIcon field is set + */ + public boolean hasHeadIcon() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return this + */ + public Friend clearHeadIcon() { + bitField0_ &= ~0x00000008; + headIcon = 0; + return this; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return the headIcon + */ + public int getHeadIcon() { + return headIcon; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @param value the headIcon to set + * @return this + */ + public Friend setHeadIcon(final int value) { + bitField0_ |= 0x00000008; + headIcon = value; + return this; + } + + /** + * <code>optional uint32 WorldClass = 6;</code> + * @return whether the worldClass field is set + */ + public boolean hasWorldClass() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 WorldClass = 6;</code> + * @return this + */ + public Friend clearWorldClass() { + bitField0_ &= ~0x00000010; + worldClass = 0; + return this; + } + + /** + * <code>optional uint32 WorldClass = 6;</code> + * @return the worldClass + */ + public int getWorldClass() { + return worldClass; + } + + /** + * <code>optional uint32 WorldClass = 6;</code> + * @param value the worldClass to set + * @return this + */ + public Friend setWorldClass(final int value) { + bitField0_ |= 0x00000010; + worldClass = value; + return this; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @return whether the titlePrefix field is set + */ + public boolean hasTitlePrefix() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @return this + */ + public Friend clearTitlePrefix() { + bitField0_ &= ~0x00000020; + titlePrefix = 0; + return this; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @return the titlePrefix + */ + public int getTitlePrefix() { + return titlePrefix; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @param value the titlePrefix to set + * @return this + */ + public Friend setTitlePrefix(final int value) { + bitField0_ |= 0x00000020; + titlePrefix = value; + return this; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @return whether the titleSuffix field is set + */ + public boolean hasTitleSuffix() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @return this + */ + public Friend clearTitleSuffix() { + bitField0_ &= ~0x00000040; + titleSuffix = 0; + return this; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @return the titleSuffix + */ + public int getTitleSuffix() { + return titleSuffix; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @param value the titleSuffix to set + * @return this + */ + public Friend setTitleSuffix(final int value) { + bitField0_ |= 0x00000040; + titleSuffix = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Friend clearNextPackage() { + bitField0_ &= ~0x00000080; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000080; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Friend addNextPackage(final byte value) { + bitField0_ |= 0x00000080; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Friend addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Friend setNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @return whether the nickName field is set + */ + public boolean hasNickName() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional string NickName = 2;</code> + * @return this + */ + public Friend clearNickName() { + bitField0_ &= ~0x00000100; + nickName.clear(); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @return the nickName + */ + public java.lang.String getNickName() { + return nickName.getString(); + } + + /** + * <code>optional string NickName = 2;</code> + * @return internal {@code Utf8String} representation of nickName for reading + */ + public Utf8String getNickNameBytes() { + return this.nickName; + } + + /** + * <code>optional string NickName = 2;</code> + * @return internal {@code Utf8String} representation of nickName for modifications + */ + public Utf8String getMutableNickNameBytes() { + bitField0_ |= 0x00000100; + return this.nickName; + } + + /** + * <code>optional string NickName = 2;</code> + * @param value the nickName to set + * @return this + */ + public Friend setNickName(final CharSequence value) { + bitField0_ |= 0x00000100; + nickName.copyFrom(value); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @param value the nickName to set + * @return this + */ + public Friend setNickName(final Utf8String value) { + bitField0_ |= 0x00000100; + nickName.copyFrom(value); + return this; + } + + /** + * <code>optional string Signature = 9;</code> + * @return whether the signature field is set + */ + public boolean hasSignature() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional string Signature = 9;</code> + * @return this + */ + public Friend clearSignature() { + bitField0_ &= ~0x00000200; + signature.clear(); + return this; + } + + /** + * <code>optional string Signature = 9;</code> + * @return the signature + */ + public java.lang.String getSignature() { + return signature.getString(); + } + + /** + * <code>optional string Signature = 9;</code> + * @return internal {@code Utf8String} representation of signature for reading + */ + public Utf8String getSignatureBytes() { + return this.signature; + } + + /** + * <code>optional string Signature = 9;</code> + * @return internal {@code Utf8String} representation of signature for modifications + */ + public Utf8String getMutableSignatureBytes() { + bitField0_ |= 0x00000200; + return this.signature; + } + + /** + * <code>optional string Signature = 9;</code> + * @param value the signature to set + * @return this + */ + public Friend setSignature(final CharSequence value) { + bitField0_ |= 0x00000200; + signature.copyFrom(value); + return this; + } + + /** + * <code>optional string Signature = 9;</code> + * @param value the signature to set + * @return this + */ + public Friend setSignature(final Utf8String value) { + bitField0_ |= 0x00000200; + signature.copyFrom(value); + return this; + } + + /** + * <code>repeated .CharShow CharShows = 10;</code> + * @return whether the charShows field is set + */ + public boolean hasCharShows() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>repeated .CharShow CharShows = 10;</code> + * @return this + */ + public Friend clearCharShows() { + bitField0_ &= ~0x00000400; + charShows.clear(); + return this; + } + + /** + * <code>repeated .CharShow CharShows = 10;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharShows()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<CharShow> getCharShows() { + return charShows; + } + + /** + * <code>repeated .CharShow CharShows = 10;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<CharShow> getMutableCharShows() { + bitField0_ |= 0x00000400; + return charShows; + } + + /** + * <code>repeated .CharShow CharShows = 10;</code> + * @param value the charShows to add + * @return this + */ + public Friend addCharShows(final CharShow value) { + bitField0_ |= 0x00000400; + charShows.add(value); + return this; + } + + /** + * <code>repeated .CharShow CharShows = 10;</code> + * @param values the charShows to add + * @return this + */ + public Friend addAllCharShows(final CharShow... values) { + bitField0_ |= 0x00000400; + charShows.addAll(values); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @return whether the honors field is set + */ + public boolean hasHonors() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @return this + */ + public Friend clearHonors() { + bitField0_ &= ~0x00000800; + honors.clear(); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHonors()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<HonorInfo> getHonors() { + return honors; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<HonorInfo> getMutableHonors() { + bitField0_ |= 0x00000800; + return honors; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @param value the honors to add + * @return this + */ + public Friend addHonors(final HonorInfo value) { + bitField0_ |= 0x00000800; + honors.add(value); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @param values the honors to add + * @return this + */ + public Friend addAllHonors(final HonorInfo... values) { + bitField0_ |= 0x00000800; + honors.addAll(values); + return this; + } + + @Override + public Friend copyFrom(final Friend other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lastLoginTime = other.lastLoginTime; + id = other.id; + hashtag = other.hashtag; + headIcon = other.headIcon; + worldClass = other.worldClass; + titlePrefix = other.titlePrefix; + titleSuffix = other.titleSuffix; + nextPackage.copyFrom(other.nextPackage); + nickName.copyFrom(other.nickName); + signature.copyFrom(other.signature); + charShows.copyFrom(other.charShows); + honors.copyFrom(other.honors); + } + return this; + } + + @Override + public Friend mergeFrom(final Friend other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLastLoginTime()) { + setLastLoginTime(other.lastLoginTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasHashtag()) { + setHashtag(other.hashtag); + } + if (other.hasHeadIcon()) { + setHeadIcon(other.headIcon); + } + if (other.hasWorldClass()) { + setWorldClass(other.worldClass); + } + if (other.hasTitlePrefix()) { + setTitlePrefix(other.titlePrefix); + } + if (other.hasTitleSuffix()) { + setTitleSuffix(other.titleSuffix); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNickName()) { + getMutableNickNameBytes().copyFrom(other.nickName); + } + if (other.hasSignature()) { + getMutableSignatureBytes().copyFrom(other.signature); + } + if (other.hasCharShows()) { + getMutableCharShows().addAll(other.charShows); + } + if (other.hasHonors()) { + getMutableHonors().addAll(other.honors); + } + return this; + } + + @Override + public Friend clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lastLoginTime = 0L; + id = 0L; + hashtag = 0; + headIcon = 0; + worldClass = 0; + titlePrefix = 0; + titleSuffix = 0; + nextPackage.clear(); + nickName.clear(); + signature.clear(); + charShows.clear(); + honors.clear(); + return this; + } + + @Override + public Friend clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + nickName.clear(); + signature.clear(); + charShows.clearQuick(); + honors.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Friend)) { + return false; + } + Friend other = (Friend) o; + return bitField0_ == other.bitField0_ + && (!hasLastLoginTime() || lastLoginTime == other.lastLoginTime) + && (!hasId() || id == other.id) + && (!hasHashtag() || hashtag == other.hashtag) + && (!hasHeadIcon() || headIcon == other.headIcon) + && (!hasWorldClass() || worldClass == other.worldClass) + && (!hasTitlePrefix() || titlePrefix == other.titlePrefix) + && (!hasTitleSuffix() || titleSuffix == other.titleSuffix) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNickName() || nickName.equals(other.nickName)) + && (!hasSignature() || signature.equals(other.signature)) + && (!hasCharShows() || charShows.equals(other.charShows)) + && (!hasHonors() || honors.equals(other.honors)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeInt64NoTag(lastLoginTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(hashtag); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(headIcon); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(worldClass); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 74); + output.writeStringNoTag(signature); + } + if ((bitField0_ & 0x00000400) != 0) { + for (int i = 0; i < charShows.length(); i++) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(charShows.get(i)); + } + } + if ((bitField0_ & 0x00000800) != 0) { + for (int i = 0; i < honors.length(); i++) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(honors.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(lastLoginTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(hashtag); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(worldClass); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(signature); + } + if ((bitField0_ & 0x00000400) != 0) { + size += (1 * charShows.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charShows); + } + if ((bitField0_ & 0x00000800) != 0) { + size += (1 * honors.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(honors); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Friend mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // lastLoginTime + lastLoginTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // hashtag + hashtag = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // headIcon + headIcon = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // worldClass + worldClass = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // titlePrefix + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // titleSuffix + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // nickName + input.readString(nickName); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // signature + input.readString(signature); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // charShows + tag = input.readRepeatedMessage(charShows, tag); + bitField0_ |= 0x00000400; + if (tag != 122) { + break; + } + } + case 122: { + // honors + tag = input.readRepeatedMessage(honors, tag); + bitField0_ |= 0x00000800; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.lastLoginTime, lastLoginTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.hashtag, hashtag); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.headIcon, headIcon); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.worldClass, worldClass); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.titlePrefix, titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.titleSuffix, titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeString(FieldNames.nickName, nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeString(FieldNames.signature, signature); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRepeatedMessage(FieldNames.charShows, charShows); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRepeatedMessage(FieldNames.honors, honors); + } + output.endObject(); + } + + @Override + public Friend mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1580277696: { + if (input.isAtField(FieldNames.lastLoginTime)) { + if (!input.trySkipNullValue()) { + lastLoginTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1932766292: { + if (input.isAtField(FieldNames.hashtag)) { + if (!input.trySkipNullValue()) { + hashtag = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1051463015: { + if (input.isAtField(FieldNames.headIcon)) { + if (!input.trySkipNullValue()) { + headIcon = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1869617882: { + if (input.isAtField(FieldNames.worldClass)) { + if (!input.trySkipNullValue()) { + worldClass = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2096776938: { + if (input.isAtField(FieldNames.titlePrefix)) { + if (!input.trySkipNullValue()) { + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2109502551: { + if (input.isAtField(FieldNames.titleSuffix)) { + if (!input.trySkipNullValue()) { + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 134381742: { + if (input.isAtField(FieldNames.nickName)) { + if (!input.trySkipNullValue()) { + input.readString(nickName); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1217415016: { + if (input.isAtField(FieldNames.signature)) { + if (!input.trySkipNullValue()) { + input.readString(signature); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -739588288: { + if (input.isAtField(FieldNames.charShows)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charShows); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2127770263: { + if (input.isAtField(FieldNames.honors)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(honors); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Friend clone() { + return new Friend().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Friend parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Friend(), data).checkInitialized(); + } + + public static Friend parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Friend(), input).checkInitialized(); + } + + public static Friend parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Friend(), input).checkInitialized(); + } + + /** + * @return factory for creating Friend messages + */ + public static MessageFactory<Friend> getFactory() { + return FriendFactory.INSTANCE; + } + + private enum FriendFactory implements MessageFactory<Friend> { + INSTANCE; + + @Override + public Friend create() { + return Friend.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lastLoginTime = FieldName.forField("LastLoginTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName hashtag = FieldName.forField("Hashtag"); + + static final FieldName headIcon = FieldName.forField("HeadIcon"); + + static final FieldName worldClass = FieldName.forField("WorldClass"); + + static final FieldName titlePrefix = FieldName.forField("TitlePrefix"); + + static final FieldName titleSuffix = FieldName.forField("TitleSuffix"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nickName = FieldName.forField("NickName"); + + static final FieldName signature = FieldName.forField("Signature"); + + static final FieldName charShows = FieldName.forField("CharShows"); + + static final FieldName honors = FieldName.forField("Honors"); + } + } + + /** + * Protobuf type {@code CharShow} + */ + public static final class CharShow extends ProtoMessage<CharShow> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional uint32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional uint32 Skin = 3;</code> + */ + private int skin; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharShow() { + } + + /** + * @return a new empty instance of {@code CharShow} + */ + public static CharShow newInstance() { + return new CharShow(); + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public CharShow clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public CharShow setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return this + */ + public CharShow clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public CharShow setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * <code>optional uint32 Skin = 3;</code> + * @return whether the skin field is set + */ + public boolean hasSkin() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Skin = 3;</code> + * @return this + */ + public CharShow clearSkin() { + bitField0_ &= ~0x00000004; + skin = 0; + return this; + } + + /** + * <code>optional uint32 Skin = 3;</code> + * @return the skin + */ + public int getSkin() { + return skin; + } + + /** + * <code>optional uint32 Skin = 3;</code> + * @param value the skin to set + * @return this + */ + public CharShow setSkin(final int value) { + bitField0_ |= 0x00000004; + skin = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CharShow clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CharShow addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CharShow addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CharShow setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharShow copyFrom(final CharShow other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + level = other.level; + skin = other.skin; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharShow mergeFrom(final CharShow other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasSkin()) { + setSkin(other.skin); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharShow clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + level = 0; + skin = 0; + nextPackage.clear(); + return this; + } + + @Override + public CharShow clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharShow)) { + return false; + } + CharShow other = (CharShow) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasLevel() || level == other.level) + && (!hasSkin() || skin == other.skin) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(skin); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skin); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharShow mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // skin + skin = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.skin, skin); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharShow mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2578845: { + if (input.isAtField(FieldNames.skin)) { + if (!input.trySkipNullValue()) { + skin = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharShow clone() { + return new CharShow().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharShow parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharShow(), data).checkInitialized(); + } + + public static CharShow parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharShow(), input).checkInitialized(); + } + + public static CharShow parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharShow(), input).checkInitialized(); + } + + /** + * @return factory for creating CharShow messages + */ + public static MessageFactory<CharShow> getFactory() { + return CharShowFactory.INSTANCE; + } + + private enum CharShowFactory implements MessageFactory<CharShow> { + INSTANCE; + + @Override + public CharShow create() { + return CharShow.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName skin = FieldName.forField("Skin"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FriendDetail} + */ + public static final class FriendDetail extends ProtoMessage<FriendDetail> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 GetEnergy = 4;</code> + */ + private int getEnergy; + + /** + * <code>optional bool Star = 2;</code> + */ + private boolean star; + + /** + * <code>optional bool SendEnergy = 3;</code> + */ + private boolean sendEnergy; + + /** + * <code>optional .Friend Base = 1;</code> + */ + private final Friend base = Friend.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FriendDetail() { + } + + /** + * @return a new empty instance of {@code FriendDetail} + */ + public static FriendDetail newInstance() { + return new FriendDetail(); + } + + /** + * <code>optional uint32 GetEnergy = 4;</code> + * @return whether the getEnergy field is set + */ + public boolean hasGetEnergy() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 GetEnergy = 4;</code> + * @return this + */ + public FriendDetail clearGetEnergy() { + bitField0_ &= ~0x00000001; + getEnergy = 0; + return this; + } + + /** + * <code>optional uint32 GetEnergy = 4;</code> + * @return the getEnergy + */ + public int getGetEnergy() { + return getEnergy; + } + + /** + * <code>optional uint32 GetEnergy = 4;</code> + * @param value the getEnergy to set + * @return this + */ + public FriendDetail setGetEnergy(final int value) { + bitField0_ |= 0x00000001; + getEnergy = value; + return this; + } + + /** + * <code>optional bool Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Star = 2;</code> + * @return this + */ + public FriendDetail clearStar() { + bitField0_ &= ~0x00000002; + star = false; + return this; + } + + /** + * <code>optional bool Star = 2;</code> + * @return the star + */ + public boolean getStar() { + return star; + } + + /** + * <code>optional bool Star = 2;</code> + * @param value the star to set + * @return this + */ + public FriendDetail setStar(final boolean value) { + bitField0_ |= 0x00000002; + star = value; + return this; + } + + /** + * <code>optional bool SendEnergy = 3;</code> + * @return whether the sendEnergy field is set + */ + public boolean hasSendEnergy() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool SendEnergy = 3;</code> + * @return this + */ + public FriendDetail clearSendEnergy() { + bitField0_ &= ~0x00000004; + sendEnergy = false; + return this; + } + + /** + * <code>optional bool SendEnergy = 3;</code> + * @return the sendEnergy + */ + public boolean getSendEnergy() { + return sendEnergy; + } + + /** + * <code>optional bool SendEnergy = 3;</code> + * @param value the sendEnergy to set + * @return this + */ + public FriendDetail setSendEnergy(final boolean value) { + bitField0_ |= 0x00000004; + sendEnergy = value; + return this; + } + + /** + * <code>optional .Friend Base = 1;</code> + * @return whether the base field is set + */ + public boolean hasBase() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .Friend Base = 1;</code> + * @return this + */ + public FriendDetail clearBase() { + bitField0_ &= ~0x00000008; + base.clear(); + return this; + } + + /** + * <code>optional .Friend Base = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Friend getBase() { + return base; + } + + /** + * <code>optional .Friend Base = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Friend getMutableBase() { + bitField0_ |= 0x00000008; + return base; + } + + /** + * <code>optional .Friend Base = 1;</code> + * @param value the base to set + * @return this + */ + public FriendDetail setBase(final Friend value) { + bitField0_ |= 0x00000008; + base.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public FriendDetail clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public FriendDetail addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public FriendDetail addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public FriendDetail setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FriendDetail copyFrom(final FriendDetail other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + getEnergy = other.getEnergy; + star = other.star; + sendEnergy = other.sendEnergy; + base.copyFrom(other.base); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendDetail mergeFrom(final FriendDetail other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGetEnergy()) { + setGetEnergy(other.getEnergy); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasSendEnergy()) { + setSendEnergy(other.sendEnergy); + } + if (other.hasBase()) { + getMutableBase().mergeFrom(other.base); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FriendDetail clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + getEnergy = 0; + star = false; + sendEnergy = false; + base.clear(); + nextPackage.clear(); + return this; + } + + @Override + public FriendDetail clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + base.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FriendDetail)) { + return false; + } + FriendDetail other = (FriendDetail) o; + return bitField0_ == other.bitField0_ + && (!hasGetEnergy() || getEnergy == other.getEnergy) + && (!hasStar() || star == other.star) + && (!hasSendEnergy() || sendEnergy == other.sendEnergy) + && (!hasBase() || base.equals(other.base)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(getEnergy); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(sendEnergy); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(base); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(getEnergy); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(base); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FriendDetail mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // getEnergy + getEnergy = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // sendEnergy + sendEnergy = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // base + input.readMessage(base); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.getEnergy, getEnergy); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.star, star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.sendEnergy, sendEnergy); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.base, base); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FriendDetail mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1893698210: { + if (input.isAtField(FieldNames.getEnergy)) { + if (!input.trySkipNullValue()) { + getEnergy = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2071725136: { + if (input.isAtField(FieldNames.sendEnergy)) { + if (!input.trySkipNullValue()) { + sendEnergy = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2063089: { + if (input.isAtField(FieldNames.base)) { + if (!input.trySkipNullValue()) { + input.readMessage(base); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FriendDetail clone() { + return new FriendDetail().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FriendDetail parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FriendDetail(), data).checkInitialized(); + } + + public static FriendDetail parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendDetail(), input).checkInitialized(); + } + + public static FriendDetail parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FriendDetail(), input).checkInitialized(); + } + + /** + * @return factory for creating FriendDetail messages + */ + public static MessageFactory<FriendDetail> getFactory() { + return FriendDetailFactory.INSTANCE; + } + + private enum FriendDetailFactory implements MessageFactory<FriendDetail> { + INSTANCE; + + @Override + public FriendDetail create() { + return FriendDetail.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName getEnergy = FieldName.forField("GetEnergy"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName sendEnergy = FieldName.forField("SendEnergy"); + + static final FieldName base = FieldName.forField("Base"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code BoughtGoods} + */ + public static final class BoughtGoods extends ProtoMessage<BoughtGoods> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Number = 2;</code> + */ + private int number; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BoughtGoods() { + } + + /** + * @return a new empty instance of {@code BoughtGoods} + */ + public static BoughtGoods newInstance() { + return new BoughtGoods(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public BoughtGoods clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public BoughtGoods setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return whether the number field is set + */ + public boolean hasNumber() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return this + */ + public BoughtGoods clearNumber() { + bitField0_ &= ~0x00000002; + number = 0; + return this; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return the number + */ + public int getNumber() { + return number; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @param value the number to set + * @return this + */ + public BoughtGoods setNumber(final int value) { + bitField0_ |= 0x00000002; + number = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public BoughtGoods clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public BoughtGoods addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public BoughtGoods addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public BoughtGoods setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BoughtGoods copyFrom(final BoughtGoods other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + number = other.number; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BoughtGoods mergeFrom(final BoughtGoods other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNumber()) { + setNumber(other.number); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BoughtGoods clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + number = 0; + nextPackage.clear(); + return this; + } + + @Override + public BoughtGoods clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BoughtGoods)) { + return false; + } + BoughtGoods other = (BoughtGoods) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNumber() || number == other.number) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(number); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(number); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BoughtGoods mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // number + number = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.number, number); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BoughtGoods mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1950496919: { + if (input.isAtField(FieldNames.number)) { + if (!input.trySkipNullValue()) { + number = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BoughtGoods clone() { + return new BoughtGoods().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BoughtGoods parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BoughtGoods(), data).checkInitialized(); + } + + public static BoughtGoods parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BoughtGoods(), input).checkInitialized(); + } + + public static BoughtGoods parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BoughtGoods(), input).checkInitialized(); + } + + /** + * @return factory for creating BoughtGoods messages + */ + public static MessageFactory<BoughtGoods> getFactory() { + return BoughtGoodsFactory.INSTANCE; + } + + private enum BoughtGoodsFactory implements MessageFactory<BoughtGoods> { + INSTANCE; + + @Override + public BoughtGoods create() { + return BoughtGoods.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName number = FieldName.forField("Number"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ResidentShop} + */ + public static final class ResidentShop extends ProtoMessage<ResidentShop> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 RefreshTime = 2;</code> + */ + private long refreshTime; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .BoughtGoods Infos = 3;</code> + */ + private final RepeatedMessage<BoughtGoods> infos = RepeatedMessage.newEmptyInstance(BoughtGoods.getFactory()); + + private ResidentShop() { + } + + /** + * @return a new empty instance of {@code ResidentShop} + */ + public static ResidentShop newInstance() { + return new ResidentShop(); + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @return whether the refreshTime field is set + */ + public boolean hasRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @return this + */ + public ResidentShop clearRefreshTime() { + bitField0_ &= ~0x00000001; + refreshTime = 0L; + return this; + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @return the refreshTime + */ + public long getRefreshTime() { + return refreshTime; + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @param value the refreshTime to set + * @return this + */ + public ResidentShop setRefreshTime(final long value) { + bitField0_ |= 0x00000001; + refreshTime = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public ResidentShop clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ResidentShop setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ResidentShop clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ResidentShop addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ResidentShop addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ResidentShop setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .BoughtGoods Infos = 3;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .BoughtGoods Infos = 3;</code> + * @return this + */ + public ResidentShop clearInfos() { + bitField0_ &= ~0x00000008; + infos.clear(); + return this; + } + + /** + * <code>repeated .BoughtGoods Infos = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<BoughtGoods> getInfos() { + return infos; + } + + /** + * <code>repeated .BoughtGoods Infos = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<BoughtGoods> getMutableInfos() { + bitField0_ |= 0x00000008; + return infos; + } + + /** + * <code>repeated .BoughtGoods Infos = 3;</code> + * @param value the infos to add + * @return this + */ + public ResidentShop addInfos(final BoughtGoods value) { + bitField0_ |= 0x00000008; + infos.add(value); + return this; + } + + /** + * <code>repeated .BoughtGoods Infos = 3;</code> + * @param values the infos to add + * @return this + */ + public ResidentShop addAllInfos(final BoughtGoods... values) { + bitField0_ |= 0x00000008; + infos.addAll(values); + return this; + } + + @Override + public ResidentShop copyFrom(final ResidentShop other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + refreshTime = other.refreshTime; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public ResidentShop mergeFrom(final ResidentShop other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRefreshTime()) { + setRefreshTime(other.refreshTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public ResidentShop clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + refreshTime = 0L; + id = 0; + nextPackage.clear(); + infos.clear(); + return this; + } + + @Override + public ResidentShop clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ResidentShop)) { + return false; + } + ResidentShop other = (ResidentShop) o; + return bitField0_ == other.bitField0_ + && (!hasRefreshTime() || refreshTime == other.refreshTime) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ResidentShop mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // refreshTime + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.refreshTime, refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public ResidentShop mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 280566824: { + if (input.isAtField(FieldNames.refreshTime)) { + if (!input.trySkipNullValue()) { + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ResidentShop clone() { + return new ResidentShop().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ResidentShop parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ResidentShop(), data).checkInitialized(); + } + + public static ResidentShop parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShop(), input).checkInitialized(); + } + + public static ResidentShop parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShop(), input).checkInitialized(); + } + + /** + * @return factory for creating ResidentShop messages + */ + public static MessageFactory<ResidentShop> getFactory() { + return ResidentShopFactory.INSTANCE; + } + + private enum ResidentShopFactory implements MessageFactory<ResidentShop> { + INSTANCE; + + @Override + public ResidentShop create() { + return ResidentShop.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName refreshTime = FieldName.forField("RefreshTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code HandbookInfo} + */ + public static final class HandbookInfo extends ProtoMessage<HandbookInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Type = 1;</code> + */ + private int type; + + /** + * <code>optional bytes Data = 2;</code> + */ + private final RepeatedByte data = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private HandbookInfo() { + } + + /** + * @return a new empty instance of {@code HandbookInfo} + */ + public static HandbookInfo newInstance() { + return new HandbookInfo(); + } + + /** + * <code>optional uint32 Type = 1;</code> + * @return whether the type field is set + */ + public boolean hasType() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Type = 1;</code> + * @return this + */ + public HandbookInfo clearType() { + bitField0_ &= ~0x00000001; + type = 0; + return this; + } + + /** + * <code>optional uint32 Type = 1;</code> + * @return the type + */ + public int getType() { + return type; + } + + /** + * <code>optional uint32 Type = 1;</code> + * @param value the type to set + * @return this + */ + public HandbookInfo setType(final int value) { + bitField0_ |= 0x00000001; + type = value; + return this; + } + + /** + * <code>optional bytes Data = 2;</code> + * @return whether the data field is set + */ + public boolean hasData() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes Data = 2;</code> + * @return this + */ + public HandbookInfo clearData() { + bitField0_ &= ~0x00000002; + data.clear(); + return this; + } + + /** + * <code>optional bytes Data = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableData()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getData() { + return data; + } + + /** + * <code>optional bytes Data = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableData() { + bitField0_ |= 0x00000002; + return data; + } + + /** + * <code>optional bytes Data = 2;</code> + * @param value the data to add + * @return this + */ + public HandbookInfo addData(final byte value) { + bitField0_ |= 0x00000002; + data.add(value); + return this; + } + + /** + * <code>optional bytes Data = 2;</code> + * @param values the data to add + * @return this + */ + public HandbookInfo addAllData(final byte... values) { + bitField0_ |= 0x00000002; + data.addAll(values); + return this; + } + + /** + * <code>optional bytes Data = 2;</code> + * @param values the data to set + * @return this + */ + public HandbookInfo setData(final byte... values) { + bitField0_ |= 0x00000002; + data.copyFrom(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public HandbookInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public HandbookInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public HandbookInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public HandbookInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public HandbookInfo copyFrom(final HandbookInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + type = other.type; + data.copyFrom(other.data); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HandbookInfo mergeFrom(final HandbookInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasType()) { + setType(other.type); + } + if (other.hasData()) { + getMutableData().copyFrom(other.data); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HandbookInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + type = 0; + data.clear(); + nextPackage.clear(); + return this; + } + + @Override + public HandbookInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + data.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof HandbookInfo)) { + return false; + } + HandbookInfo other = (HandbookInfo) o; + return bitField0_ == other.bitField0_ + && (!hasType() || type == other.type) + && (!hasData() || data.equals(other.data)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(type); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeBytesNoTag(data); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(type); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(data); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public HandbookInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // type + type = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // data + input.readBytes(data); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.type, type); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.data, data); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public HandbookInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2622298: { + if (input.isAtField(FieldNames.type)) { + if (!input.trySkipNullValue()) { + type = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2122698: { + if (input.isAtField(FieldNames.data)) { + if (!input.trySkipNullValue()) { + input.readBytes(data); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public HandbookInfo clone() { + return new HandbookInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static HandbookInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new HandbookInfo(), data).checkInitialized(); + } + + public static HandbookInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new HandbookInfo(), input).checkInitialized(); + } + + public static HandbookInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new HandbookInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating HandbookInfo messages + */ + public static MessageFactory<HandbookInfo> getFactory() { + return HandbookInfoFactory.INSTANCE; + } + + private enum HandbookInfoFactory implements MessageFactory<HandbookInfo> { + INSTANCE; + + @Override + public HandbookInfo create() { + return HandbookInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName type = FieldName.forField("Type"); + + static final FieldName data = FieldName.forField("Data"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code QuestState} + */ + public static final class QuestState extends ProtoMessage<QuestState> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .QuestType Type = 1;</code> + */ + private int type; + + /** + * <code>optional bool New = 2;</code> + */ + private boolean new_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private QuestState() { + } + + /** + * @return a new empty instance of {@code QuestState} + */ + public static QuestState newInstance() { + return new QuestState(); + } + + /** + * <code>optional .QuestType Type = 1;</code> + * @return whether the type field is set + */ + public boolean hasType() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .QuestType Type = 1;</code> + * @return this + */ + public QuestState clearType() { + bitField0_ &= ~0x00000001; + type = 0; + return this; + } + + /** + * <code>optional .QuestType Type = 1;</code> + * @return the type + */ + public QuestType getType() { + return QuestType.forNumber(type); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link QuestState#getType()}.getNumber(). + * + * @return numeric wire representation + */ + public int getTypeValue() { + return type; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link QuestType}. Setting an invalid value + * can cause {@link QuestState#getType()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public QuestState setTypeValue(final int value) { + bitField0_ |= 0x00000001; + type = value; + return this; + } + + /** + * <code>optional .QuestType Type = 1;</code> + * @param value the type to set + * @return this + */ + public QuestState setType(final QuestType value) { + bitField0_ |= 0x00000001; + type = value.getNumber(); + return this; + } + + /** + * <code>optional bool New = 2;</code> + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool New = 2;</code> + * @return this + */ + public QuestState clearNew() { + bitField0_ &= ~0x00000002; + new_ = false; + return this; + } + + /** + * <code>optional bool New = 2;</code> + * @return the new_ + */ + public boolean getNew() { + return new_; + } + + /** + * <code>optional bool New = 2;</code> + * @param value the new_ to set + * @return this + */ + public QuestState setNew(final boolean value) { + bitField0_ |= 0x00000002; + new_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public QuestState clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public QuestState addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public QuestState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public QuestState setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public QuestState copyFrom(final QuestState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + type = other.type; + new_ = other.new_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public QuestState mergeFrom(final QuestState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasType()) { + setTypeValue(other.type); + } + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public QuestState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + type = 0; + new_ = false; + nextPackage.clear(); + return this; + } + + @Override + public QuestState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof QuestState)) { + return false; + } + QuestState other = (QuestState) o; + return bitField0_ == other.bitField0_ + && (!hasType() || type == other.type) + && (!hasNew() || new_ == other.new_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeEnumNoTag(type); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(new_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(type); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public QuestState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // type + final int value = input.readInt32(); + if (QuestType.forNumber(value) != null) { + type = value; + bitField0_ |= 0x00000001; + } + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // new_ + new_ = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeEnum(FieldNames.type, type, QuestType.converter()); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public QuestState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2622298: { + if (input.isAtField(FieldNames.type)) { + if (!input.trySkipNullValue()) { + final QuestType value = input.readEnum(QuestType.converter()); + if (value != null) { + type = value.getNumber(); + bitField0_ |= 0x00000001; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public QuestState clone() { + return new QuestState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static QuestState parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new QuestState(), data).checkInitialized(); + } + + public static QuestState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new QuestState(), input).checkInitialized(); + } + + public static QuestState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new QuestState(), input).checkInitialized(); + } + + /** + * @return factory for creating QuestState messages + */ + public static MessageFactory<QuestState> getFactory() { + return QuestStateFactory.INSTANCE; + } + + private enum QuestStateFactory implements MessageFactory<QuestState> { + INSTANCE; + + @Override + public QuestState create() { + return QuestState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName type = FieldName.forField("Type"); + + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code MallPackageState} + */ + public static final class MallPackageState extends ProtoMessage<MallPackageState> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool New = 1;</code> + */ + private boolean new_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private MallPackageState() { + } + + /** + * @return a new empty instance of {@code MallPackageState} + */ + public static MallPackageState newInstance() { + return new MallPackageState(); + } + + /** + * <code>optional bool New = 1;</code> + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool New = 1;</code> + * @return this + */ + public MallPackageState clearNew() { + bitField0_ &= ~0x00000001; + new_ = false; + return this; + } + + /** + * <code>optional bool New = 1;</code> + * @return the new_ + */ + public boolean getNew() { + return new_; + } + + /** + * <code>optional bool New = 1;</code> + * @param value the new_ to set + * @return this + */ + public MallPackageState setNew(final boolean value) { + bitField0_ |= 0x00000001; + new_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MallPackageState clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MallPackageState addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MallPackageState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MallPackageState setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public MallPackageState copyFrom(final MallPackageState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + new_ = other.new_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MallPackageState mergeFrom(final MallPackageState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MallPackageState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + new_ = false; + nextPackage.clear(); + return this; + } + + @Override + public MallPackageState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MallPackageState)) { + return false; + } + MallPackageState other = (MallPackageState) o; + return bitField0_ == other.bitField0_ + && (!hasNew() || new_ == other.new_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MallPackageState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // new_ + new_ = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public MallPackageState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MallPackageState clone() { + return new MallPackageState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MallPackageState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MallPackageState(), data).checkInitialized(); + } + + public static MallPackageState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallPackageState(), input).checkInitialized(); + } + + public static MallPackageState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MallPackageState(), input).checkInitialized(); + } + + /** + * @return factory for creating MallPackageState messages + */ + public static MessageFactory<MallPackageState> getFactory() { + return MallPackageStateFactory.INSTANCE; + } + + private enum MallPackageStateFactory implements MessageFactory<MallPackageState> { + INSTANCE; + + @Override + public MallPackageState create() { + return MallPackageState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DailyInstance} + */ + public static final class DailyInstance extends ProtoMessage<DailyInstance> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 15;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DailyInstance() { + } + + /** + * @return a new empty instance of {@code DailyInstance} + */ + public static DailyInstance newInstance() { + return new DailyInstance(); + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @return this + */ + public DailyInstance clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @param value the buildId to set + * @return this + */ + public DailyInstance setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public DailyInstance clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public DailyInstance setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public DailyInstance clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public DailyInstance setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public DailyInstance clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public DailyInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public DailyInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public DailyInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DailyInstance copyFrom(final DailyInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstance mergeFrom(final DailyInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DailyInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + star = 0; + nextPackage.clear(); + return this; + } + + @Override + public DailyInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DailyInstance)) { + return false; + } + DailyInstance other = (DailyInstance) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DailyInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 120: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DailyInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DailyInstance clone() { + return new DailyInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DailyInstance parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DailyInstance(), data).checkInitialized(); + } + + public static DailyInstance parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstance(), input).checkInitialized(); + } + + public static DailyInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DailyInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating DailyInstance messages + */ + public static MessageFactory<DailyInstance> getFactory() { + return DailyInstanceFactory.INSTANCE; + } + + private enum DailyInstanceFactory implements MessageFactory<DailyInstance> { + INSTANCE; + + @Override + public DailyInstance create() { + return DailyInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TravelerDuelBossLevel} + */ + public static final class TravelerDuelBossLevel extends ProtoMessage<TravelerDuelBossLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 3;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional uint32 Difficulty = 4;</code> + */ + private int difficulty; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TravelerDuelBossLevel() { + } + + /** + * @return a new empty instance of {@code TravelerDuelBossLevel} + */ + public static TravelerDuelBossLevel newInstance() { + return new TravelerDuelBossLevel(); + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return this + */ + public TravelerDuelBossLevel clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @param value the buildId to set + * @return this + */ + public TravelerDuelBossLevel setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public TravelerDuelBossLevel clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public TravelerDuelBossLevel setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public TravelerDuelBossLevel clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public TravelerDuelBossLevel setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional uint32 Difficulty = 4;</code> + * @return whether the difficulty field is set + */ + public boolean hasDifficulty() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Difficulty = 4;</code> + * @return this + */ + public TravelerDuelBossLevel clearDifficulty() { + bitField0_ &= ~0x00000008; + difficulty = 0; + return this; + } + + /** + * <code>optional uint32 Difficulty = 4;</code> + * @return the difficulty + */ + public int getDifficulty() { + return difficulty; + } + + /** + * <code>optional uint32 Difficulty = 4;</code> + * @param value the difficulty to set + * @return this + */ + public TravelerDuelBossLevel setDifficulty(final int value) { + bitField0_ |= 0x00000008; + difficulty = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelBossLevel clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelBossLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelBossLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelBossLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TravelerDuelBossLevel copyFrom(final TravelerDuelBossLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + star = other.star; + difficulty = other.difficulty; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelBossLevel mergeFrom(final TravelerDuelBossLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasDifficulty()) { + setDifficulty(other.difficulty); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelBossLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + star = 0; + difficulty = 0; + nextPackage.clear(); + return this; + } + + @Override + public TravelerDuelBossLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelBossLevel)) { + return false; + } + TravelerDuelBossLevel other = (TravelerDuelBossLevel) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasDifficulty() || difficulty == other.difficulty) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(difficulty); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(difficulty); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelBossLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // difficulty + difficulty = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.difficulty, difficulty); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TravelerDuelBossLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -472001573: { + if (input.isAtField(FieldNames.difficulty)) { + if (!input.trySkipNullValue()) { + difficulty = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelBossLevel clone() { + return new TravelerDuelBossLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelBossLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelBossLevel(), data).checkInitialized(); + } + + public static TravelerDuelBossLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBossLevel(), input).checkInitialized(); + } + + public static TravelerDuelBossLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBossLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelBossLevel messages + */ + public static MessageFactory<TravelerDuelBossLevel> getFactory() { + return TravelerDuelBossLevelFactory.INSTANCE; + } + + private enum TravelerDuelBossLevelFactory implements MessageFactory<TravelerDuelBossLevel> { + INSTANCE; + + @Override + public TravelerDuelBossLevel create() { + return TravelerDuelBossLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName difficulty = FieldName.forField("Difficulty"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TravelerDuelChallengeInfo} + */ + public static final class TravelerDuelChallengeInfo extends ProtoMessage<TravelerDuelChallengeInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 OpenTime = 3;</code> + */ + private long openTime; + + /** + * <code>optional int64 CloseTime = 4;</code> + */ + private long closeTime; + + /** + * <code>optional uint32 Id = 2;</code> + */ + private int id; + + /** + * <code>optional bool Unlock = 1;</code> + */ + private boolean unlock; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TravelerDuelChallengeInfo() { + } + + /** + * @return a new empty instance of {@code TravelerDuelChallengeInfo} + */ + public static TravelerDuelChallengeInfo newInstance() { + return new TravelerDuelChallengeInfo(); + } + + /** + * <code>optional int64 OpenTime = 3;</code> + * @return whether the openTime field is set + */ + public boolean hasOpenTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 OpenTime = 3;</code> + * @return this + */ + public TravelerDuelChallengeInfo clearOpenTime() { + bitField0_ &= ~0x00000001; + openTime = 0L; + return this; + } + + /** + * <code>optional int64 OpenTime = 3;</code> + * @return the openTime + */ + public long getOpenTime() { + return openTime; + } + + /** + * <code>optional int64 OpenTime = 3;</code> + * @param value the openTime to set + * @return this + */ + public TravelerDuelChallengeInfo setOpenTime(final long value) { + bitField0_ |= 0x00000001; + openTime = value; + return this; + } + + /** + * <code>optional int64 CloseTime = 4;</code> + * @return whether the closeTime field is set + */ + public boolean hasCloseTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional int64 CloseTime = 4;</code> + * @return this + */ + public TravelerDuelChallengeInfo clearCloseTime() { + bitField0_ &= ~0x00000002; + closeTime = 0L; + return this; + } + + /** + * <code>optional int64 CloseTime = 4;</code> + * @return the closeTime + */ + public long getCloseTime() { + return closeTime; + } + + /** + * <code>optional int64 CloseTime = 4;</code> + * @param value the closeTime to set + * @return this + */ + public TravelerDuelChallengeInfo setCloseTime(final long value) { + bitField0_ |= 0x00000002; + closeTime = value; + return this; + } + + /** + * <code>optional uint32 Id = 2;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Id = 2;</code> + * @return this + */ + public TravelerDuelChallengeInfo clearId() { + bitField0_ &= ~0x00000004; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 2;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 2;</code> + * @param value the id to set + * @return this + */ + public TravelerDuelChallengeInfo setId(final int value) { + bitField0_ |= 0x00000004; + id = value; + return this; + } + + /** + * <code>optional bool Unlock = 1;</code> + * @return whether the unlock field is set + */ + public boolean hasUnlock() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool Unlock = 1;</code> + * @return this + */ + public TravelerDuelChallengeInfo clearUnlock() { + bitField0_ &= ~0x00000008; + unlock = false; + return this; + } + + /** + * <code>optional bool Unlock = 1;</code> + * @return the unlock + */ + public boolean getUnlock() { + return unlock; + } + + /** + * <code>optional bool Unlock = 1;</code> + * @param value the unlock to set + * @return this + */ + public TravelerDuelChallengeInfo setUnlock(final boolean value) { + bitField0_ |= 0x00000008; + unlock = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelChallengeInfo clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelChallengeInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelChallengeInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelChallengeInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TravelerDuelChallengeInfo copyFrom(final TravelerDuelChallengeInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + openTime = other.openTime; + closeTime = other.closeTime; + id = other.id; + unlock = other.unlock; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelChallengeInfo mergeFrom(final TravelerDuelChallengeInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOpenTime()) { + setOpenTime(other.openTime); + } + if (other.hasCloseTime()) { + setCloseTime(other.closeTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasUnlock()) { + setUnlock(other.unlock); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelChallengeInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + openTime = 0L; + closeTime = 0L; + id = 0; + unlock = false; + nextPackage.clear(); + return this; + } + + @Override + public TravelerDuelChallengeInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelChallengeInfo)) { + return false; + } + TravelerDuelChallengeInfo other = (TravelerDuelChallengeInfo) o; + return bitField0_ == other.bitField0_ + && (!hasOpenTime() || openTime == other.openTime) + && (!hasCloseTime() || closeTime == other.closeTime) + && (!hasId() || id == other.id) + && (!hasUnlock() || unlock == other.unlock) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(openTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeInt64NoTag(closeTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(unlock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(openTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(closeTime); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelChallengeInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // openTime + openTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // closeTime + closeTime = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // unlock + unlock = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.openTime, openTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.closeTime, closeTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.unlock, unlock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TravelerDuelChallengeInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -440001449: { + if (input.isAtField(FieldNames.openTime)) { + if (!input.trySkipNullValue()) { + openTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1521486021: { + if (input.isAtField(FieldNames.closeTime)) { + if (!input.trySkipNullValue()) { + closeTime = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1756574876: { + if (input.isAtField(FieldNames.unlock)) { + if (!input.trySkipNullValue()) { + unlock = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelChallengeInfo clone() { + return new TravelerDuelChallengeInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelChallengeInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelChallengeInfo(), data).checkInitialized(); + } + + public static TravelerDuelChallengeInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelChallengeInfo(), input).checkInitialized(); + } + + public static TravelerDuelChallengeInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelChallengeInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelChallengeInfo messages + */ + public static MessageFactory<TravelerDuelChallengeInfo> getFactory() { + return TravelerDuelChallengeInfoFactory.INSTANCE; + } + + private enum TravelerDuelChallengeInfoFactory implements MessageFactory<TravelerDuelChallengeInfo> { + INSTANCE; + + @Override + public TravelerDuelChallengeInfo create() { + return TravelerDuelChallengeInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName openTime = FieldName.forField("OpenTime"); + + static final FieldName closeTime = FieldName.forField("CloseTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName unlock = FieldName.forField("Unlock"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Activity} + */ + public static final class Activity extends ProtoMessage<Activity> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 StartTime = 2;</code> + */ + private long startTime; + + /** + * <code>optional int64 EndTime = 3;</code> + */ + private long endTime; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private Activity() { + } + + /** + * @return a new empty instance of {@code Activity} + */ + public static Activity newInstance() { + return new Activity(); + } + + /** + * <code>optional int64 StartTime = 2;</code> + * @return whether the startTime field is set + */ + public boolean hasStartTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 StartTime = 2;</code> + * @return this + */ + public Activity clearStartTime() { + bitField0_ &= ~0x00000001; + startTime = 0L; + return this; + } + + /** + * <code>optional int64 StartTime = 2;</code> + * @return the startTime + */ + public long getStartTime() { + return startTime; + } + + /** + * <code>optional int64 StartTime = 2;</code> + * @param value the startTime to set + * @return this + */ + public Activity setStartTime(final long value) { + bitField0_ |= 0x00000001; + startTime = value; + return this; + } + + /** + * <code>optional int64 EndTime = 3;</code> + * @return whether the endTime field is set + */ + public boolean hasEndTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional int64 EndTime = 3;</code> + * @return this + */ + public Activity clearEndTime() { + bitField0_ &= ~0x00000002; + endTime = 0L; + return this; + } + + /** + * <code>optional int64 EndTime = 3;</code> + * @return the endTime + */ + public long getEndTime() { + return endTime; + } + + /** + * <code>optional int64 EndTime = 3;</code> + * @param value the endTime to set + * @return this + */ + public Activity setEndTime(final long value) { + bitField0_ |= 0x00000002; + endTime = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public Activity clearId() { + bitField0_ &= ~0x00000004; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public Activity setId(final int value) { + bitField0_ |= 0x00000004; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Activity clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Activity addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Activity addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Activity setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public Activity copyFrom(final Activity other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + startTime = other.startTime; + endTime = other.endTime; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Activity mergeFrom(final Activity other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStartTime()) { + setStartTime(other.startTime); + } + if (other.hasEndTime()) { + setEndTime(other.endTime); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public Activity clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + startTime = 0L; + endTime = 0L; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public Activity clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Activity)) { + return false; + } + Activity other = (Activity) o; + return bitField0_ == other.bitField0_ + && (!hasStartTime() || startTime == other.startTime) + && (!hasEndTime() || endTime == other.endTime) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(endTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(endTime); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Activity mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // startTime + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // endTime + endTime = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.startTime, startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.endTime, endTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public Activity mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -125326801: { + if (input.isAtField(FieldNames.startTime)) { + if (!input.trySkipNullValue()) { + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 57410088: { + if (input.isAtField(FieldNames.endTime)) { + if (!input.trySkipNullValue()) { + endTime = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Activity clone() { + return new Activity().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Activity parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Activity(), data).checkInitialized(); + } + + public static Activity parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Activity(), input).checkInitialized(); + } + + public static Activity parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Activity(), input).checkInitialized(); + } + + /** + * @return factory for creating Activity messages + */ + public static MessageFactory<Activity> getFactory() { + return ActivityFactory.INSTANCE; + } + + private enum ActivityFactory implements MessageFactory<Activity> { + INSTANCE; + + @Override + public Activity create() { + return Activity.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName startTime = FieldName.forField("StartTime"); + + static final FieldName endTime = FieldName.forField("EndTime"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityQuest} + */ + public static final class ActivityQuest extends ProtoMessage<ActivityQuest> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Status = 2;</code> + */ + private int status; + + /** + * <code>optional uint32 ActivityId = 3;</code> + */ + private int activityId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .QuestProgress Progress = 15;</code> + */ + private final RepeatedMessage<QuestProgress> progress = RepeatedMessage.newEmptyInstance(QuestProgress.getFactory()); + + private ActivityQuest() { + } + + /** + * @return a new empty instance of {@code ActivityQuest} + */ + public static ActivityQuest newInstance() { + return new ActivityQuest(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public ActivityQuest clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ActivityQuest setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Status = 2;</code> + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Status = 2;</code> + * @return this + */ + public ActivityQuest clearStatus() { + bitField0_ &= ~0x00000002; + status = 0; + return this; + } + + /** + * <code>optional uint32 Status = 2;</code> + * @return the status + */ + public int getStatus() { + return status; + } + + /** + * <code>optional uint32 Status = 2;</code> + * @param value the status to set + * @return this + */ + public ActivityQuest setStatus(final int value) { + bitField0_ |= 0x00000002; + status = value; + return this; + } + + /** + * <code>optional uint32 ActivityId = 3;</code> + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 ActivityId = 3;</code> + * @return this + */ + public ActivityQuest clearActivityId() { + bitField0_ &= ~0x00000004; + activityId = 0; + return this; + } + + /** + * <code>optional uint32 ActivityId = 3;</code> + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * <code>optional uint32 ActivityId = 3;</code> + * @param value the activityId to set + * @return this + */ + public ActivityQuest setActivityId(final int value) { + bitField0_ |= 0x00000004; + activityId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityQuest clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityQuest addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityQuest addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityQuest setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .QuestProgress Progress = 15;</code> + * @return whether the progress field is set + */ + public boolean hasProgress() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .QuestProgress Progress = 15;</code> + * @return this + */ + public ActivityQuest clearProgress() { + bitField0_ &= ~0x00000010; + progress.clear(); + return this; + } + + /** + * <code>repeated .QuestProgress Progress = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableProgress()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<QuestProgress> getProgress() { + return progress; + } + + /** + * <code>repeated .QuestProgress Progress = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<QuestProgress> getMutableProgress() { + bitField0_ |= 0x00000010; + return progress; + } + + /** + * <code>repeated .QuestProgress Progress = 15;</code> + * @param value the progress to add + * @return this + */ + public ActivityQuest addProgress(final QuestProgress value) { + bitField0_ |= 0x00000010; + progress.add(value); + return this; + } + + /** + * <code>repeated .QuestProgress Progress = 15;</code> + * @param values the progress to add + * @return this + */ + public ActivityQuest addAllProgress(final QuestProgress... values) { + bitField0_ |= 0x00000010; + progress.addAll(values); + return this; + } + + @Override + public ActivityQuest copyFrom(final ActivityQuest other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + status = other.status; + activityId = other.activityId; + nextPackage.copyFrom(other.nextPackage); + progress.copyFrom(other.progress); + } + return this; + } + + @Override + public ActivityQuest mergeFrom(final ActivityQuest other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasStatus()) { + setStatus(other.status); + } + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasProgress()) { + getMutableProgress().addAll(other.progress); + } + return this; + } + + @Override + public ActivityQuest clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + status = 0; + activityId = 0; + nextPackage.clear(); + progress.clear(); + return this; + } + + @Override + public ActivityQuest clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + progress.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityQuest)) { + return false; + } + ActivityQuest other = (ActivityQuest) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasStatus() || status == other.status) + && (!hasActivityId() || activityId == other.activityId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasProgress() || progress.equals(other.progress)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < progress.length(); i++) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(progress.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(status); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * progress.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(progress); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityQuest mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // status + status = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // progress + tag = input.readRepeatedMessage(progress, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.status, status); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.progress, progress); + } + output.endObject(); + } + + @Override + public ActivityQuest mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1808614382: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + status = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -936434099: { + if (input.isAtField(FieldNames.progress)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(progress); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityQuest clone() { + return new ActivityQuest().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityQuest parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityQuest(), data).checkInitialized(); + } + + public static ActivityQuest parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityQuest(), input).checkInitialized(); + } + + public static ActivityQuest parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityQuest(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityQuest messages + */ + public static MessageFactory<ActivityQuest> getFactory() { + return ActivityQuestFactory.INSTANCE; + } + + private enum ActivityQuestFactory implements MessageFactory<ActivityQuest> { + INSTANCE; + + @Override + public ActivityQuest create() { + return ActivityQuest.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName status = FieldName.forField("Status"); + + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName progress = FieldName.forField("Progress"); + } + } + + /** + * Protobuf type {@code ActivityPeriodic} + */ + public static final class ActivityPeriodic extends ProtoMessage<ActivityPeriodic> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ActivityId = 1;</code> + */ + private int activityId; + + /** + * <code>optional bool FinalStatus = 2;</code> + */ + private boolean finalStatus; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ActivityQuest Quests = 15;</code> + */ + private final RepeatedMessage<ActivityQuest> quests = RepeatedMessage.newEmptyInstance(ActivityQuest.getFactory()); + + private ActivityPeriodic() { + } + + /** + * @return a new empty instance of {@code ActivityPeriodic} + */ + public static ActivityPeriodic newInstance() { + return new ActivityPeriodic(); + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return this + */ + public ActivityPeriodic clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @param value the activityId to set + * @return this + */ + public ActivityPeriodic setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * <code>optional bool FinalStatus = 2;</code> + * @return whether the finalStatus field is set + */ + public boolean hasFinalStatus() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool FinalStatus = 2;</code> + * @return this + */ + public ActivityPeriodic clearFinalStatus() { + bitField0_ &= ~0x00000002; + finalStatus = false; + return this; + } + + /** + * <code>optional bool FinalStatus = 2;</code> + * @return the finalStatus + */ + public boolean getFinalStatus() { + return finalStatus; + } + + /** + * <code>optional bool FinalStatus = 2;</code> + * @param value the finalStatus to set + * @return this + */ + public ActivityPeriodic setFinalStatus(final boolean value) { + bitField0_ |= 0x00000002; + finalStatus = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityPeriodic clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityPeriodic addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityPeriodic addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityPeriodic setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 15;</code> + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .ActivityQuest Quests = 15;</code> + * @return this + */ + public ActivityPeriodic clearQuests() { + bitField0_ &= ~0x00000008; + quests.clear(); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActivityQuest> getQuests() { + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActivityQuest> getMutableQuests() { + bitField0_ |= 0x00000008; + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 15;</code> + * @param value the quests to add + * @return this + */ + public ActivityPeriodic addQuests(final ActivityQuest value) { + bitField0_ |= 0x00000008; + quests.add(value); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 15;</code> + * @param values the quests to add + * @return this + */ + public ActivityPeriodic addAllQuests(final ActivityQuest... values) { + bitField0_ |= 0x00000008; + quests.addAll(values); + return this; + } + + @Override + public ActivityPeriodic copyFrom(final ActivityPeriodic other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + finalStatus = other.finalStatus; + nextPackage.copyFrom(other.nextPackage); + quests.copyFrom(other.quests); + } + return this; + } + + @Override + public ActivityPeriodic mergeFrom(final ActivityPeriodic other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasFinalStatus()) { + setFinalStatus(other.finalStatus); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasQuests()) { + getMutableQuests().addAll(other.quests); + } + return this; + } + + @Override + public ActivityPeriodic clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + finalStatus = false; + nextPackage.clear(); + quests.clear(); + return this; + } + + @Override + public ActivityPeriodic clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + quests.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityPeriodic)) { + return false; + } + ActivityPeriodic other = (ActivityPeriodic) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasFinalStatus() || finalStatus == other.finalStatus) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasQuests() || quests.equals(other.quests)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(finalStatus); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < quests.length(); i++) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(quests.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * quests.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(quests); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityPeriodic mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // finalStatus + finalStatus = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // quests + tag = input.readRepeatedMessage(quests, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.finalStatus, finalStatus); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.quests, quests); + } + output.endObject(); + } + + @Override + public ActivityPeriodic mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -541739800: { + if (input.isAtField(FieldNames.finalStatus)) { + if (!input.trySkipNullValue()) { + finalStatus = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(quests); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityPeriodic clone() { + return new ActivityPeriodic().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityPeriodic parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityPeriodic(), data).checkInitialized(); + } + + public static ActivityPeriodic parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityPeriodic(), input).checkInitialized(); + } + + public static ActivityPeriodic parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityPeriodic(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityPeriodic messages + */ + public static MessageFactory<ActivityPeriodic> getFactory() { + return ActivityPeriodicFactory.INSTANCE; + } + + private enum ActivityPeriodicFactory implements MessageFactory<ActivityPeriodic> { + INSTANCE; + + @Override + public ActivityPeriodic create() { + return ActivityPeriodic.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName finalStatus = FieldName.forField("FinalStatus"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName quests = FieldName.forField("Quests"); + } + } + + /** + * Protobuf type {@code ActivityLogin} + */ + public static final class ActivityLogin extends ProtoMessage<ActivityLogin> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ActivityId = 1;</code> + */ + private int activityId; + + /** + * <code>optional uint32 Receive = 2;</code> + */ + private int receive; + + /** + * <code>optional uint32 Actual = 3;</code> + */ + private int actual; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityLogin() { + } + + /** + * @return a new empty instance of {@code ActivityLogin} + */ + public static ActivityLogin newInstance() { + return new ActivityLogin(); + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return this + */ + public ActivityLogin clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @param value the activityId to set + * @return this + */ + public ActivityLogin setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * <code>optional uint32 Receive = 2;</code> + * @return whether the receive field is set + */ + public boolean hasReceive() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Receive = 2;</code> + * @return this + */ + public ActivityLogin clearReceive() { + bitField0_ &= ~0x00000002; + receive = 0; + return this; + } + + /** + * <code>optional uint32 Receive = 2;</code> + * @return the receive + */ + public int getReceive() { + return receive; + } + + /** + * <code>optional uint32 Receive = 2;</code> + * @param value the receive to set + * @return this + */ + public ActivityLogin setReceive(final int value) { + bitField0_ |= 0x00000002; + receive = value; + return this; + } + + /** + * <code>optional uint32 Actual = 3;</code> + * @return whether the actual field is set + */ + public boolean hasActual() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Actual = 3;</code> + * @return this + */ + public ActivityLogin clearActual() { + bitField0_ &= ~0x00000004; + actual = 0; + return this; + } + + /** + * <code>optional uint32 Actual = 3;</code> + * @return the actual + */ + public int getActual() { + return actual; + } + + /** + * <code>optional uint32 Actual = 3;</code> + * @param value the actual to set + * @return this + */ + public ActivityLogin setActual(final int value) { + bitField0_ |= 0x00000004; + actual = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityLogin clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityLogin addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityLogin addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityLogin setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityLogin copyFrom(final ActivityLogin other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + receive = other.receive; + actual = other.actual; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLogin mergeFrom(final ActivityLogin other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasReceive()) { + setReceive(other.receive); + } + if (other.hasActual()) { + setActual(other.actual); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLogin clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + receive = 0; + actual = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityLogin clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLogin)) { + return false; + } + ActivityLogin other = (ActivityLogin) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasReceive() || receive == other.receive) + && (!hasActual() || actual == other.actual) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(receive); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(actual); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(receive); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(actual); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLogin mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // receive + receive = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // actual + actual = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.receive, receive); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.actual, actual); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityLogin mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1548023101: { + if (input.isAtField(FieldNames.receive)) { + if (!input.trySkipNullValue()) { + receive = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1955894702: { + if (input.isAtField(FieldNames.actual)) { + if (!input.trySkipNullValue()) { + actual = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLogin clone() { + return new ActivityLogin().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLogin parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLogin(), data).checkInitialized(); + } + + public static ActivityLogin parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLogin(), input).checkInitialized(); + } + + public static ActivityLogin parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLogin(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLogin messages + */ + public static MessageFactory<ActivityLogin> getFactory() { + return ActivityLoginFactory.INSTANCE; + } + + private enum ActivityLoginFactory implements MessageFactory<ActivityLogin> { + INSTANCE; + + @Override + public ActivityLogin create() { + return ActivityLogin.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName receive = FieldName.forField("Receive"); + + static final FieldName actual = FieldName.forField("Actual"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityMining} + */ + public static final class ActivityMining extends ProtoMessage<ActivityMining> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ActivityId = 1;</code> + */ + private int activityId; + + /** + * <code>optional uint32 Layer = 2;</code> + */ + private int layer; + + /** + * <code>optional uint32 Score = 3;</code> + */ + private int score; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + */ + private final RepeatedMessage<ActivityQuest> quests = RepeatedMessage.newEmptyInstance(ActivityQuest.getFactory()); + + private ActivityMining() { + } + + /** + * @return a new empty instance of {@code ActivityMining} + */ + public static ActivityMining newInstance() { + return new ActivityMining(); + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return this + */ + public ActivityMining clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @param value the activityId to set + * @return this + */ + public ActivityMining setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * <code>optional uint32 Layer = 2;</code> + * @return whether the layer field is set + */ + public boolean hasLayer() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Layer = 2;</code> + * @return this + */ + public ActivityMining clearLayer() { + bitField0_ &= ~0x00000002; + layer = 0; + return this; + } + + /** + * <code>optional uint32 Layer = 2;</code> + * @return the layer + */ + public int getLayer() { + return layer; + } + + /** + * <code>optional uint32 Layer = 2;</code> + * @param value the layer to set + * @return this + */ + public ActivityMining setLayer(final int value) { + bitField0_ |= 0x00000002; + layer = value; + return this; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @return this + */ + public ActivityMining clearScore() { + bitField0_ &= ~0x00000004; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @param value the score to set + * @return this + */ + public ActivityMining setScore(final int value) { + bitField0_ |= 0x00000004; + score = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityMining clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityMining addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityMining addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityMining setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @return this + */ + public ActivityMining clearQuests() { + bitField0_ &= ~0x00000010; + quests.clear(); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActivityQuest> getQuests() { + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActivityQuest> getMutableQuests() { + bitField0_ |= 0x00000010; + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @param value the quests to add + * @return this + */ + public ActivityMining addQuests(final ActivityQuest value) { + bitField0_ |= 0x00000010; + quests.add(value); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @param values the quests to add + * @return this + */ + public ActivityMining addAllQuests(final ActivityQuest... values) { + bitField0_ |= 0x00000010; + quests.addAll(values); + return this; + } + + @Override + public ActivityMining copyFrom(final ActivityMining other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + layer = other.layer; + score = other.score; + nextPackage.copyFrom(other.nextPackage); + quests.copyFrom(other.quests); + } + return this; + } + + @Override + public ActivityMining mergeFrom(final ActivityMining other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasLayer()) { + setLayer(other.layer); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasQuests()) { + getMutableQuests().addAll(other.quests); + } + return this; + } + + @Override + public ActivityMining clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + layer = 0; + score = 0; + nextPackage.clear(); + quests.clear(); + return this; + } + + @Override + public ActivityMining clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + quests.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityMining)) { + return false; + } + ActivityMining other = (ActivityMining) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasLayer() || layer == other.layer) + && (!hasScore() || score == other.score) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasQuests() || quests.equals(other.quests)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(layer); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < quests.length(); i++) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(quests.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(layer); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * quests.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(quests); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityMining mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // layer + layer = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 90) { + break; + } + } + case 90: { + // quests + tag = input.readRepeatedMessage(quests, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.layer, layer); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.quests, quests); + } + output.endObject(); + } + + @Override + public ActivityMining mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73196849: { + if (input.isAtField(FieldNames.layer)) { + if (!input.trySkipNullValue()) { + layer = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(quests); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityMining clone() { + return new ActivityMining().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityMining parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityMining(), data).checkInitialized(); + } + + public static ActivityMining parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMining(), input).checkInitialized(); + } + + public static ActivityMining parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityMining(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityMining messages + */ + public static MessageFactory<ActivityMining> getFactory() { + return ActivityMiningFactory.INSTANCE; + } + + private enum ActivityMiningFactory implements MessageFactory<ActivityMining> { + INSTANCE; + + @Override + public ActivityMining create() { + return ActivityMining.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName layer = FieldName.forField("Layer"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName quests = FieldName.forField("Quests"); + } + } + + /** + * Protobuf type {@code ActivityCookieLevel} + */ + public static final class ActivityCookieLevel extends ProtoMessage<ActivityCookieLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ActivityId = 1;</code> + */ + private int activityId; + + /** + * <code>optional uint32 LevelId = 2;</code> + */ + private int levelId; + + /** + * <code>optional uint32 MaxScore = 3;</code> + */ + private int maxScore; + + /** + * <code>optional bool FirstComplete = 4;</code> + */ + private boolean firstComplete; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityCookieLevel() { + } + + /** + * @return a new empty instance of {@code ActivityCookieLevel} + */ + public static ActivityCookieLevel newInstance() { + return new ActivityCookieLevel(); + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return this + */ + public ActivityCookieLevel clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @param value the activityId to set + * @return this + */ + public ActivityCookieLevel setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @return this + */ + public ActivityCookieLevel clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @param value the levelId to set + * @return this + */ + public ActivityCookieLevel setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * <code>optional uint32 MaxScore = 3;</code> + * @return whether the maxScore field is set + */ + public boolean hasMaxScore() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 MaxScore = 3;</code> + * @return this + */ + public ActivityCookieLevel clearMaxScore() { + bitField0_ &= ~0x00000004; + maxScore = 0; + return this; + } + + /** + * <code>optional uint32 MaxScore = 3;</code> + * @return the maxScore + */ + public int getMaxScore() { + return maxScore; + } + + /** + * <code>optional uint32 MaxScore = 3;</code> + * @param value the maxScore to set + * @return this + */ + public ActivityCookieLevel setMaxScore(final int value) { + bitField0_ |= 0x00000004; + maxScore = value; + return this; + } + + /** + * <code>optional bool FirstComplete = 4;</code> + * @return whether the firstComplete field is set + */ + public boolean hasFirstComplete() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool FirstComplete = 4;</code> + * @return this + */ + public ActivityCookieLevel clearFirstComplete() { + bitField0_ &= ~0x00000008; + firstComplete = false; + return this; + } + + /** + * <code>optional bool FirstComplete = 4;</code> + * @return the firstComplete + */ + public boolean getFirstComplete() { + return firstComplete; + } + + /** + * <code>optional bool FirstComplete = 4;</code> + * @param value the firstComplete to set + * @return this + */ + public ActivityCookieLevel setFirstComplete(final boolean value) { + bitField0_ |= 0x00000008; + firstComplete = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityCookieLevel clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityCookieLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityCookieLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityCookieLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityCookieLevel copyFrom(final ActivityCookieLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + levelId = other.levelId; + maxScore = other.maxScore; + firstComplete = other.firstComplete; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCookieLevel mergeFrom(final ActivityCookieLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasMaxScore()) { + setMaxScore(other.maxScore); + } + if (other.hasFirstComplete()) { + setFirstComplete(other.firstComplete); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCookieLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + levelId = 0; + maxScore = 0; + firstComplete = false; + nextPackage.clear(); + return this; + } + + @Override + public ActivityCookieLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityCookieLevel)) { + return false; + } + ActivityCookieLevel other = (ActivityCookieLevel) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasMaxScore() || maxScore == other.maxScore) + && (!hasFirstComplete() || firstComplete == other.firstComplete) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(maxScore); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(firstComplete); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(maxScore); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityCookieLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // maxScore + maxScore = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // firstComplete + firstComplete = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.maxScore, maxScore); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.firstComplete, firstComplete); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityCookieLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 461163438: { + if (input.isAtField(FieldNames.maxScore)) { + if (!input.trySkipNullValue()) { + maxScore = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2041047017: { + if (input.isAtField(FieldNames.firstComplete)) { + if (!input.trySkipNullValue()) { + firstComplete = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityCookieLevel clone() { + return new ActivityCookieLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityCookieLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityCookieLevel(), data).checkInitialized(); + } + + public static ActivityCookieLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCookieLevel(), input).checkInitialized(); + } + + public static ActivityCookieLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCookieLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityCookieLevel messages + */ + public static MessageFactory<ActivityCookieLevel> getFactory() { + return ActivityCookieLevelFactory.INSTANCE; + } + + private enum ActivityCookieLevelFactory implements MessageFactory<ActivityCookieLevel> { + INSTANCE; + + @Override + public ActivityCookieLevel create() { + return ActivityCookieLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName maxScore = FieldName.forField("MaxScore"); + + static final FieldName firstComplete = FieldName.forField("FirstComplete"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityCookie} + */ + public static final class ActivityCookie extends ProtoMessage<ActivityCookie> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ActivityId = 1;</code> + */ + private int activityId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + */ + private final RepeatedMessage<ActivityQuest> quests = RepeatedMessage.newEmptyInstance(ActivityQuest.getFactory()); + + /** + * <code>repeated .ActivityCookieLevel Levels = 12;</code> + */ + private final RepeatedMessage<ActivityCookieLevel> levels = RepeatedMessage.newEmptyInstance(ActivityCookieLevel.getFactory()); + + private ActivityCookie() { + } + + /** + * @return a new empty instance of {@code ActivityCookie} + */ + public static ActivityCookie newInstance() { + return new ActivityCookie(); + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return this + */ + public ActivityCookie clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @param value the activityId to set + * @return this + */ + public ActivityCookie setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityCookie clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityCookie addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityCookie addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityCookie setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @return this + */ + public ActivityCookie clearQuests() { + bitField0_ &= ~0x00000004; + quests.clear(); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActivityQuest> getQuests() { + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActivityQuest> getMutableQuests() { + bitField0_ |= 0x00000004; + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @param value the quests to add + * @return this + */ + public ActivityCookie addQuests(final ActivityQuest value) { + bitField0_ |= 0x00000004; + quests.add(value); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @param values the quests to add + * @return this + */ + public ActivityCookie addAllQuests(final ActivityQuest... values) { + bitField0_ |= 0x00000004; + quests.addAll(values); + return this; + } + + /** + * <code>repeated .ActivityCookieLevel Levels = 12;</code> + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .ActivityCookieLevel Levels = 12;</code> + * @return this + */ + public ActivityCookie clearLevels() { + bitField0_ &= ~0x00000008; + levels.clear(); + return this; + } + + /** + * <code>repeated .ActivityCookieLevel Levels = 12;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActivityCookieLevel> getLevels() { + return levels; + } + + /** + * <code>repeated .ActivityCookieLevel Levels = 12;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActivityCookieLevel> getMutableLevels() { + bitField0_ |= 0x00000008; + return levels; + } + + /** + * <code>repeated .ActivityCookieLevel Levels = 12;</code> + * @param value the levels to add + * @return this + */ + public ActivityCookie addLevels(final ActivityCookieLevel value) { + bitField0_ |= 0x00000008; + levels.add(value); + return this; + } + + /** + * <code>repeated .ActivityCookieLevel Levels = 12;</code> + * @param values the levels to add + * @return this + */ + public ActivityCookie addAllLevels(final ActivityCookieLevel... values) { + bitField0_ |= 0x00000008; + levels.addAll(values); + return this; + } + + @Override + public ActivityCookie copyFrom(final ActivityCookie other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + nextPackage.copyFrom(other.nextPackage); + quests.copyFrom(other.quests); + levels.copyFrom(other.levels); + } + return this; + } + + @Override + public ActivityCookie mergeFrom(final ActivityCookie other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasQuests()) { + getMutableQuests().addAll(other.quests); + } + if (other.hasLevels()) { + getMutableLevels().addAll(other.levels); + } + return this; + } + + @Override + public ActivityCookie clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + nextPackage.clear(); + quests.clear(); + levels.clear(); + return this; + } + + @Override + public ActivityCookie clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + quests.clearQuick(); + levels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityCookie)) { + return false; + } + ActivityCookie other = (ActivityCookie) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasQuests() || quests.equals(other.quests)) + && (!hasLevels() || levels.equals(other.levels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < quests.length(); i++) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(quests.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < levels.length(); i++) { + output.writeRawByte((byte) 98); + output.writeMessageNoTag(levels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * quests.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(quests); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * levels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(levels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityCookie mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 90) { + break; + } + } + case 90: { + // quests + tag = input.readRepeatedMessage(quests, tag); + bitField0_ |= 0x00000004; + if (tag != 98) { + break; + } + } + case 98: { + // levels + tag = input.readRepeatedMessage(levels, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.quests, quests); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.levels, levels); + } + output.endObject(); + } + + @Override + public ActivityCookie mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(quests); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022260337: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(levels); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityCookie clone() { + return new ActivityCookie().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityCookie parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityCookie(), data).checkInitialized(); + } + + public static ActivityCookie parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCookie(), input).checkInitialized(); + } + + public static ActivityCookie parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCookie(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityCookie messages + */ + public static MessageFactory<ActivityCookie> getFactory() { + return ActivityCookieFactory.INSTANCE; + } + + private enum ActivityCookieFactory implements MessageFactory<ActivityCookie> { + INSTANCE; + + @Override + public ActivityCookie create() { + return ActivityCookie.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName quests = FieldName.forField("Quests"); + + static final FieldName levels = FieldName.forField("Levels"); + } + } + + /** + * Protobuf type {@code ActivityTowerDefenseLevel} + */ + public static final class ActivityTowerDefenseLevel extends ProtoMessage<ActivityTowerDefenseLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityTowerDefenseLevel() { + } + + /** + * @return a new empty instance of {@code ActivityTowerDefenseLevel} + */ + public static ActivityTowerDefenseLevel newInstance() { + return new ActivityTowerDefenseLevel(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public ActivityTowerDefenseLevel clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ActivityTowerDefenseLevel setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public ActivityTowerDefenseLevel clearStar() { + bitField0_ &= ~0x00000002; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public ActivityTowerDefenseLevel setStar(final int value) { + bitField0_ |= 0x00000002; + star = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityTowerDefenseLevel clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityTowerDefenseLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityTowerDefenseLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityTowerDefenseLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityTowerDefenseLevel copyFrom(final ActivityTowerDefenseLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTowerDefenseLevel mergeFrom(final ActivityTowerDefenseLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityTowerDefenseLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + star = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityTowerDefenseLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTowerDefenseLevel)) { + return false; + } + ActivityTowerDefenseLevel other = (ActivityTowerDefenseLevel) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTowerDefenseLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityTowerDefenseLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTowerDefenseLevel clone() { + return new ActivityTowerDefenseLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTowerDefenseLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevel(), data).checkInitialized(); + } + + public static ActivityTowerDefenseLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevel(), input).checkInitialized(); + } + + public static ActivityTowerDefenseLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefenseLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTowerDefenseLevel messages + */ + public static MessageFactory<ActivityTowerDefenseLevel> getFactory() { + return ActivityTowerDefenseLevelFactory.INSTANCE; + } + + private enum ActivityTowerDefenseLevelFactory implements MessageFactory<ActivityTowerDefenseLevel> { + INSTANCE; + + @Override + public ActivityTowerDefenseLevel create() { + return ActivityTowerDefenseLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityTowerDefense} + */ + public static final class ActivityTowerDefense extends ProtoMessage<ActivityTowerDefense> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ActivityId = 1;</code> + */ + private int activityId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Stories = 2;</code> + */ + private final RepeatedInt stories = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .ActivityTowerDefenseLevel Levels = 3;</code> + */ + private final RepeatedMessage<ActivityTowerDefenseLevel> levels = RepeatedMessage.newEmptyInstance(ActivityTowerDefenseLevel.getFactory()); + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + */ + private final RepeatedMessage<ActivityQuest> quests = RepeatedMessage.newEmptyInstance(ActivityQuest.getFactory()); + + private ActivityTowerDefense() { + } + + /** + * @return a new empty instance of {@code ActivityTowerDefense} + */ + public static ActivityTowerDefense newInstance() { + return new ActivityTowerDefense(); + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return whether the activityId field is set + */ + public boolean hasActivityId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return this + */ + public ActivityTowerDefense clearActivityId() { + bitField0_ &= ~0x00000001; + activityId = 0; + return this; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @return the activityId + */ + public int getActivityId() { + return activityId; + } + + /** + * <code>optional uint32 ActivityId = 1;</code> + * @param value the activityId to set + * @return this + */ + public ActivityTowerDefense setActivityId(final int value) { + bitField0_ |= 0x00000001; + activityId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityTowerDefense clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityTowerDefense addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityTowerDefense addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityTowerDefense setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Stories = 2;</code> + * @return whether the stories field is set + */ + public boolean hasStories() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Stories = 2;</code> + * @return this + */ + public ActivityTowerDefense clearStories() { + bitField0_ &= ~0x00000004; + stories.clear(); + return this; + } + + /** + * <code>repeated uint32 Stories = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStories()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getStories() { + return stories; + } + + /** + * <code>repeated uint32 Stories = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableStories() { + bitField0_ |= 0x00000004; + return stories; + } + + /** + * <code>repeated uint32 Stories = 2;</code> + * @param value the stories to add + * @return this + */ + public ActivityTowerDefense addStories(final int value) { + bitField0_ |= 0x00000004; + stories.add(value); + return this; + } + + /** + * <code>repeated uint32 Stories = 2;</code> + * @param values the stories to add + * @return this + */ + public ActivityTowerDefense addAllStories(final int... values) { + bitField0_ |= 0x00000004; + stories.addAll(values); + return this; + } + + /** + * <code>repeated .ActivityTowerDefenseLevel Levels = 3;</code> + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .ActivityTowerDefenseLevel Levels = 3;</code> + * @return this + */ + public ActivityTowerDefense clearLevels() { + bitField0_ &= ~0x00000008; + levels.clear(); + return this; + } + + /** + * <code>repeated .ActivityTowerDefenseLevel Levels = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActivityTowerDefenseLevel> getLevels() { + return levels; + } + + /** + * <code>repeated .ActivityTowerDefenseLevel Levels = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActivityTowerDefenseLevel> getMutableLevels() { + bitField0_ |= 0x00000008; + return levels; + } + + /** + * <code>repeated .ActivityTowerDefenseLevel Levels = 3;</code> + * @param value the levels to add + * @return this + */ + public ActivityTowerDefense addLevels(final ActivityTowerDefenseLevel value) { + bitField0_ |= 0x00000008; + levels.add(value); + return this; + } + + /** + * <code>repeated .ActivityTowerDefenseLevel Levels = 3;</code> + * @param values the levels to add + * @return this + */ + public ActivityTowerDefense addAllLevels(final ActivityTowerDefenseLevel... values) { + bitField0_ |= 0x00000008; + levels.addAll(values); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @return this + */ + public ActivityTowerDefense clearQuests() { + bitField0_ &= ~0x00000010; + quests.clear(); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActivityQuest> getQuests() { + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActivityQuest> getMutableQuests() { + bitField0_ |= 0x00000010; + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @param value the quests to add + * @return this + */ + public ActivityTowerDefense addQuests(final ActivityQuest value) { + bitField0_ |= 0x00000010; + quests.add(value); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 11;</code> + * @param values the quests to add + * @return this + */ + public ActivityTowerDefense addAllQuests(final ActivityQuest... values) { + bitField0_ |= 0x00000010; + quests.addAll(values); + return this; + } + + @Override + public ActivityTowerDefense copyFrom(final ActivityTowerDefense other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityId = other.activityId; + nextPackage.copyFrom(other.nextPackage); + stories.copyFrom(other.stories); + levels.copyFrom(other.levels); + quests.copyFrom(other.quests); + } + return this; + } + + @Override + public ActivityTowerDefense mergeFrom(final ActivityTowerDefense other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityId()) { + setActivityId(other.activityId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasStories()) { + getMutableStories().addAll(other.stories); + } + if (other.hasLevels()) { + getMutableLevels().addAll(other.levels); + } + if (other.hasQuests()) { + getMutableQuests().addAll(other.quests); + } + return this; + } + + @Override + public ActivityTowerDefense clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityId = 0; + nextPackage.clear(); + stories.clear(); + levels.clear(); + quests.clear(); + return this; + } + + @Override + public ActivityTowerDefense clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + stories.clear(); + levels.clearQuick(); + quests.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTowerDefense)) { + return false; + } + ActivityTowerDefense other = (ActivityTowerDefense) o; + return bitField0_ == other.bitField0_ + && (!hasActivityId() || activityId == other.activityId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasStories() || stories.equals(other.stories)) + && (!hasLevels() || levels.equals(other.levels)) + && (!hasQuests() || quests.equals(other.quests)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < stories.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(stories.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < levels.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(levels.get(i)); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < quests.length(); i++) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(quests.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * stories.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(stories); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * levels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(levels); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * quests.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(quests); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTowerDefense mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // activityId + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // stories [packed=true] + input.readPackedUInt32(stories, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // levels + tag = input.readRepeatedMessage(levels, tag); + bitField0_ |= 0x00000008; + if (tag != 90) { + break; + } + } + case 90: { + // quests + tag = input.readRepeatedMessage(quests, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // stories [packed=false] + tag = input.readRepeatedUInt32(stories, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.activityId, activityId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.stories, stories); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.levels, levels); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.quests, quests); + } + output.endObject(); + } + + @Override + public ActivityTowerDefense mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -252882774: { + if (input.isAtField(FieldNames.activityId)) { + if (!input.trySkipNullValue()) { + activityId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -219613133: { + if (input.isAtField(FieldNames.stories)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(stories); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022260337: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(levels); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(quests); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTowerDefense clone() { + return new ActivityTowerDefense().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTowerDefense parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTowerDefense(), data).checkInitialized(); + } + + public static ActivityTowerDefense parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefense(), input).checkInitialized(); + } + + public static ActivityTowerDefense parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTowerDefense(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTowerDefense messages + */ + public static MessageFactory<ActivityTowerDefense> getFactory() { + return ActivityTowerDefenseFactory.INSTANCE; + } + + private enum ActivityTowerDefenseFactory implements MessageFactory<ActivityTowerDefense> { + INSTANCE; + + @Override + public ActivityTowerDefense create() { + return ActivityTowerDefense.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityId = FieldName.forField("ActivityId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName stories = FieldName.forField("Stories"); + + static final FieldName levels = FieldName.forField("Levels"); + + static final FieldName quests = FieldName.forField("Quests"); + } + } + + /** + * Protobuf type {@code ActivityTrial} + */ + public static final class ActivityTrial extends ProtoMessage<ActivityTrial> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 CompletedGroupIds = 1;</code> + */ + private final RepeatedInt completedGroupIds = RepeatedInt.newEmptyInstance(); + + private ActivityTrial() { + } + + /** + * @return a new empty instance of {@code ActivityTrial} + */ + public static ActivityTrial newInstance() { + return new ActivityTrial(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityTrial clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityTrial addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityTrial addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityTrial setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 CompletedGroupIds = 1;</code> + * @return whether the completedGroupIds field is set + */ + public boolean hasCompletedGroupIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 CompletedGroupIds = 1;</code> + * @return this + */ + public ActivityTrial clearCompletedGroupIds() { + bitField0_ &= ~0x00000002; + completedGroupIds.clear(); + return this; + } + + /** + * <code>repeated uint32 CompletedGroupIds = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCompletedGroupIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCompletedGroupIds() { + return completedGroupIds; + } + + /** + * <code>repeated uint32 CompletedGroupIds = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCompletedGroupIds() { + bitField0_ |= 0x00000002; + return completedGroupIds; + } + + /** + * <code>repeated uint32 CompletedGroupIds = 1;</code> + * @param value the completedGroupIds to add + * @return this + */ + public ActivityTrial addCompletedGroupIds(final int value) { + bitField0_ |= 0x00000002; + completedGroupIds.add(value); + return this; + } + + /** + * <code>repeated uint32 CompletedGroupIds = 1;</code> + * @param values the completedGroupIds to add + * @return this + */ + public ActivityTrial addAllCompletedGroupIds(final int... values) { + bitField0_ |= 0x00000002; + completedGroupIds.addAll(values); + return this; + } + + @Override + public ActivityTrial copyFrom(final ActivityTrial other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + completedGroupIds.copyFrom(other.completedGroupIds); + } + return this; + } + + @Override + public ActivityTrial mergeFrom(final ActivityTrial other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCompletedGroupIds()) { + getMutableCompletedGroupIds().addAll(other.completedGroupIds); + } + return this; + } + + @Override + public ActivityTrial clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + completedGroupIds.clear(); + return this; + } + + @Override + public ActivityTrial clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + completedGroupIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTrial)) { + return false; + } + ActivityTrial other = (ActivityTrial) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCompletedGroupIds() || completedGroupIds.equals(other.completedGroupIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < completedGroupIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(completedGroupIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * completedGroupIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(completedGroupIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTrial mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // completedGroupIds [packed=true] + input.readPackedUInt32(completedGroupIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // completedGroupIds [packed=false] + tag = input.readRepeatedUInt32(completedGroupIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.completedGroupIds, completedGroupIds); + } + output.endObject(); + } + + @Override + public ActivityTrial mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1947974908: { + if (input.isAtField(FieldNames.completedGroupIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(completedGroupIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTrial clone() { + return new ActivityTrial().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTrial parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTrial(), data).checkInitialized(); + } + + public static ActivityTrial parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTrial(), input).checkInitialized(); + } + + public static ActivityTrial parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTrial(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTrial messages + */ + public static MessageFactory<ActivityTrial> getFactory() { + return ActivityTrialFactory.INSTANCE; + } + + private enum ActivityTrialFactory implements MessageFactory<ActivityTrial> { + INSTANCE; + + @Override + public ActivityTrial create() { + return ActivityTrial.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName completedGroupIds = FieldName.forField("CompletedGroupIds"); + } + } + + /** + * Protobuf type {@code ActivityCG} + */ + public static final class ActivityCG extends ProtoMessage<ActivityCG> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool Read = 1;</code> + */ + private boolean read; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityCG() { + } + + /** + * @return a new empty instance of {@code ActivityCG} + */ + public static ActivityCG newInstance() { + return new ActivityCG(); + } + + /** + * <code>optional bool Read = 1;</code> + * @return whether the read field is set + */ + public boolean hasRead() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool Read = 1;</code> + * @return this + */ + public ActivityCG clearRead() { + bitField0_ &= ~0x00000001; + read = false; + return this; + } + + /** + * <code>optional bool Read = 1;</code> + * @return the read + */ + public boolean getRead() { + return read; + } + + /** + * <code>optional bool Read = 1;</code> + * @param value the read to set + * @return this + */ + public ActivityCG setRead(final boolean value) { + bitField0_ |= 0x00000001; + read = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityCG clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityCG addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityCG addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityCG setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityCG copyFrom(final ActivityCG other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + read = other.read; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCG mergeFrom(final ActivityCG other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRead()) { + setRead(other.read); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityCG clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + read = false; + nextPackage.clear(); + return this; + } + + @Override + public ActivityCG clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityCG)) { + return false; + } + ActivityCG other = (ActivityCG) o; + return bitField0_ == other.bitField0_ + && (!hasRead() || read == other.read) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(read); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityCG mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // read + read = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.read, read); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityCG mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2543030: { + if (input.isAtField(FieldNames.read)) { + if (!input.trySkipNullValue()) { + read = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityCG clone() { + return new ActivityCG().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityCG parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityCG(), data).checkInitialized(); + } + + public static ActivityCG parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCG(), input).checkInitialized(); + } + + public static ActivityCG parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityCG(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityCG messages + */ + public static MessageFactory<ActivityCG> getFactory() { + return ActivityCGFactory.INSTANCE; + } + + private enum ActivityCGFactory implements MessageFactory<ActivityCG> { + INSTANCE; + + @Override + public ActivityCG create() { + return ActivityCG.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName read = FieldName.forField("Read"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityLevel} + */ + public static final class ActivityLevel extends ProtoMessage<ActivityLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 3;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityLevel() { + } + + /** + * @return a new empty instance of {@code ActivityLevel} + */ + public static ActivityLevel newInstance() { + return new ActivityLevel(); + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return this + */ + public ActivityLevel clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @param value the buildId to set + * @return this + */ + public ActivityLevel setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public ActivityLevel clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ActivityLevel setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public ActivityLevel clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public ActivityLevel setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityLevel clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityLevel copyFrom(final ActivityLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevel mergeFrom(final ActivityLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + star = 0; + nextPackage.clear(); + return this; + } + + @Override + public ActivityLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevel)) { + return false; + } + ActivityLevel other = (ActivityLevel) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevel clone() { + return new ActivityLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevel parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevel(), data).checkInitialized(); + } + + public static ActivityLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevel(), input).checkInitialized(); + } + + public static ActivityLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevel messages + */ + public static MessageFactory<ActivityLevel> getFactory() { + return ActivityLevelFactory.INSTANCE; + } + + private enum ActivityLevelFactory implements MessageFactory<ActivityLevel> { + INSTANCE; + + @Override + public ActivityLevel create() { + return ActivityLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ActivityLevels} + */ + public static final class ActivityLevels extends ProtoMessage<ActivityLevels> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ActivityLevel levels = 1;</code> + */ + private final RepeatedMessage<ActivityLevel> levels = RepeatedMessage.newEmptyInstance(ActivityLevel.getFactory()); + + private ActivityLevels() { + } + + /** + * @return a new empty instance of {@code ActivityLevels} + */ + public static ActivityLevels newInstance() { + return new ActivityLevels(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityLevels clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityLevels addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityLevels addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityLevels setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ActivityLevel levels = 1;</code> + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .ActivityLevel levels = 1;</code> + * @return this + */ + public ActivityLevels clearLevels() { + bitField0_ &= ~0x00000002; + levels.clear(); + return this; + } + + /** + * <code>repeated .ActivityLevel levels = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActivityLevel> getLevels() { + return levels; + } + + /** + * <code>repeated .ActivityLevel levels = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActivityLevel> getMutableLevels() { + bitField0_ |= 0x00000002; + return levels; + } + + /** + * <code>repeated .ActivityLevel levels = 1;</code> + * @param value the levels to add + * @return this + */ + public ActivityLevels addLevels(final ActivityLevel value) { + bitField0_ |= 0x00000002; + levels.add(value); + return this; + } + + /** + * <code>repeated .ActivityLevel levels = 1;</code> + * @param values the levels to add + * @return this + */ + public ActivityLevels addAllLevels(final ActivityLevel... values) { + bitField0_ |= 0x00000002; + levels.addAll(values); + return this; + } + + @Override + public ActivityLevels copyFrom(final ActivityLevels other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + levels.copyFrom(other.levels); + } + return this; + } + + @Override + public ActivityLevels mergeFrom(final ActivityLevels other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasLevels()) { + getMutableLevels().addAll(other.levels); + } + return this; + } + + @Override + public ActivityLevels clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + levels.clear(); + return this; + } + + @Override + public ActivityLevels clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + levels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityLevels)) { + return false; + } + ActivityLevels other = (ActivityLevels) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasLevels() || levels.equals(other.levels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < levels.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(levels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * levels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(levels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityLevels mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // levels + tag = input.readRepeatedMessage(levels, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.levels, levels); + } + output.endObject(); + } + + @Override + public ActivityLevels mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1106127505: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(levels); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityLevels clone() { + return new ActivityLevels().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityLevels parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityLevels(), data).checkInitialized(); + } + + public static ActivityLevels parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevels(), input).checkInitialized(); + } + + public static ActivityLevels parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityLevels(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityLevels messages + */ + public static MessageFactory<ActivityLevels> getFactory() { + return ActivityLevelsFactory.INSTANCE; + } + + private enum ActivityLevelsFactory implements MessageFactory<ActivityLevels> { + INSTANCE; + + @Override + public ActivityLevels create() { + return ActivityLevels.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName levels = FieldName.forField("levels"); + } + } + + /** + * Protobuf type {@code ActivityAvg} + */ + public static final class ActivityAvg extends ProtoMessage<ActivityAvg> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 RewardIds = 1;</code> + */ + private final RepeatedInt rewardIds = RepeatedInt.newEmptyInstance(); + + private ActivityAvg() { + } + + /** + * @return a new empty instance of {@code ActivityAvg} + */ + public static ActivityAvg newInstance() { + return new ActivityAvg(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityAvg clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityAvg addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityAvg addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityAvg setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 RewardIds = 1;</code> + * @return whether the rewardIds field is set + */ + public boolean hasRewardIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 RewardIds = 1;</code> + * @return this + */ + public ActivityAvg clearRewardIds() { + bitField0_ &= ~0x00000002; + rewardIds.clear(); + return this; + } + + /** + * <code>repeated uint32 RewardIds = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewardIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getRewardIds() { + return rewardIds; + } + + /** + * <code>repeated uint32 RewardIds = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableRewardIds() { + bitField0_ |= 0x00000002; + return rewardIds; + } + + /** + * <code>repeated uint32 RewardIds = 1;</code> + * @param value the rewardIds to add + * @return this + */ + public ActivityAvg addRewardIds(final int value) { + bitField0_ |= 0x00000002; + rewardIds.add(value); + return this; + } + + /** + * <code>repeated uint32 RewardIds = 1;</code> + * @param values the rewardIds to add + * @return this + */ + public ActivityAvg addAllRewardIds(final int... values) { + bitField0_ |= 0x00000002; + rewardIds.addAll(values); + return this; + } + + @Override + public ActivityAvg copyFrom(final ActivityAvg other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + rewardIds.copyFrom(other.rewardIds); + } + return this; + } + + @Override + public ActivityAvg mergeFrom(final ActivityAvg other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewardIds()) { + getMutableRewardIds().addAll(other.rewardIds); + } + return this; + } + + @Override + public ActivityAvg clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + rewardIds.clear(); + return this; + } + + @Override + public ActivityAvg clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + rewardIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityAvg)) { + return false; + } + ActivityAvg other = (ActivityAvg) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewardIds() || rewardIds.equals(other.rewardIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < rewardIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(rewardIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * rewardIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(rewardIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityAvg mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // rewardIds [packed=true] + input.readPackedUInt32(rewardIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // rewardIds [packed=false] + tag = input.readRepeatedUInt32(rewardIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.rewardIds, rewardIds); + } + output.endObject(); + } + + @Override + public ActivityAvg mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1128076055: { + if (input.isAtField(FieldNames.rewardIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(rewardIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityAvg clone() { + return new ActivityAvg().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityAvg parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityAvg(), data).checkInitialized(); + } + + public static ActivityAvg parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityAvg(), input).checkInitialized(); + } + + public static ActivityAvg parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityAvg(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityAvg messages + */ + public static MessageFactory<ActivityAvg> getFactory() { + return ActivityAvgFactory.INSTANCE; + } + + private enum ActivityAvgFactory implements MessageFactory<ActivityAvg> { + INSTANCE; + + @Override + public ActivityAvg create() { + return ActivityAvg.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewardIds = FieldName.forField("RewardIds"); + } + } + + /** + * Protobuf type {@code AffinityInfo} + */ + public static final class AffinityInfo extends ProtoMessage<AffinityInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional uint32 AffinityLevel = 2;</code> + */ + private int affinityLevel; + + /** + * <code>optional uint32 AffinityExp = 3;</code> + */ + private int affinityExp; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Rewards = 4;</code> + */ + private final RepeatedMessage<ItemTpl> rewards = RepeatedMessage.newEmptyInstance(ItemTpl.getFactory()); + + private AffinityInfo() { + } + + /** + * @return a new empty instance of {@code AffinityInfo} + */ + public static AffinityInfo newInstance() { + return new AffinityInfo(); + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public AffinityInfo clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public AffinityInfo setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * <code>optional uint32 AffinityLevel = 2;</code> + * @return whether the affinityLevel field is set + */ + public boolean hasAffinityLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 AffinityLevel = 2;</code> + * @return this + */ + public AffinityInfo clearAffinityLevel() { + bitField0_ &= ~0x00000002; + affinityLevel = 0; + return this; + } + + /** + * <code>optional uint32 AffinityLevel = 2;</code> + * @return the affinityLevel + */ + public int getAffinityLevel() { + return affinityLevel; + } + + /** + * <code>optional uint32 AffinityLevel = 2;</code> + * @param value the affinityLevel to set + * @return this + */ + public AffinityInfo setAffinityLevel(final int value) { + bitField0_ |= 0x00000002; + affinityLevel = value; + return this; + } + + /** + * <code>optional uint32 AffinityExp = 3;</code> + * @return whether the affinityExp field is set + */ + public boolean hasAffinityExp() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 AffinityExp = 3;</code> + * @return this + */ + public AffinityInfo clearAffinityExp() { + bitField0_ &= ~0x00000004; + affinityExp = 0; + return this; + } + + /** + * <code>optional uint32 AffinityExp = 3;</code> + * @return the affinityExp + */ + public int getAffinityExp() { + return affinityExp; + } + + /** + * <code>optional uint32 AffinityExp = 3;</code> + * @param value the affinityExp to set + * @return this + */ + public AffinityInfo setAffinityExp(final int value) { + bitField0_ |= 0x00000004; + affinityExp = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public AffinityInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public AffinityInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public AffinityInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public AffinityInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 4;</code> + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .ItemTpl Rewards = 4;</code> + * @return this + */ + public AffinityInfo clearRewards() { + bitField0_ &= ~0x00000010; + rewards.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ItemTpl> getRewards() { + return rewards; + } + + /** + * <code>repeated .ItemTpl Rewards = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ItemTpl> getMutableRewards() { + bitField0_ |= 0x00000010; + return rewards; + } + + /** + * <code>repeated .ItemTpl Rewards = 4;</code> + * @param value the rewards to add + * @return this + */ + public AffinityInfo addRewards(final ItemTpl value) { + bitField0_ |= 0x00000010; + rewards.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 4;</code> + * @param values the rewards to add + * @return this + */ + public AffinityInfo addAllRewards(final ItemTpl... values) { + bitField0_ |= 0x00000010; + rewards.addAll(values); + return this; + } + + @Override + public AffinityInfo copyFrom(final AffinityInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + affinityLevel = other.affinityLevel; + affinityExp = other.affinityExp; + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public AffinityInfo mergeFrom(final AffinityInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasAffinityLevel()) { + setAffinityLevel(other.affinityLevel); + } + if (other.hasAffinityExp()) { + setAffinityExp(other.affinityExp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public AffinityInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + affinityLevel = 0; + affinityExp = 0; + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public AffinityInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AffinityInfo)) { + return false; + } + AffinityInfo other = (AffinityInfo) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasAffinityLevel() || affinityLevel == other.affinityLevel) + && (!hasAffinityExp() || affinityExp == other.affinityExp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(affinityLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(affinityExp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinityLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinityExp); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AffinityInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // affinityLevel + affinityLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // affinityExp + affinityExp = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.affinityLevel, affinityLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.affinityExp, affinityExp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public AffinityInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1094331164: { + if (input.isAtField(FieldNames.affinityLevel)) { + if (!input.trySkipNullValue()) { + affinityLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1185488821: { + if (input.isAtField(FieldNames.affinityExp)) { + if (!input.trySkipNullValue()) { + affinityExp = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AffinityInfo clone() { + return new AffinityInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AffinityInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AffinityInfo(), data).checkInitialized(); + } + + public static AffinityInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AffinityInfo(), input).checkInitialized(); + } + + public static AffinityInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AffinityInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating AffinityInfo messages + */ + public static MessageFactory<AffinityInfo> getFactory() { + return AffinityInfoFactory.INSTANCE; + } + + private enum AffinityInfoFactory implements MessageFactory<AffinityInfo> { + INSTANCE; + + @Override + public AffinityInfo create() { + return AffinityInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName affinityLevel = FieldName.forField("AffinityLevel"); + + static final FieldName affinityExp = FieldName.forField("AffinityExp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } + + /** + * Protobuf type {@code ActivityState} + */ + public static final class ActivityState extends ProtoMessage<ActivityState> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bool RedDot = 2;</code> + */ + private boolean redDot; + + /** + * <code>optional bool Banner = 3;</code> + */ + private boolean banner; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActivityState() { + } + + /** + * @return a new empty instance of {@code ActivityState} + */ + public static ActivityState newInstance() { + return new ActivityState(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public ActivityState clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ActivityState setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional bool RedDot = 2;</code> + * @return whether the redDot field is set + */ + public boolean hasRedDot() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool RedDot = 2;</code> + * @return this + */ + public ActivityState clearRedDot() { + bitField0_ &= ~0x00000002; + redDot = false; + return this; + } + + /** + * <code>optional bool RedDot = 2;</code> + * @return the redDot + */ + public boolean getRedDot() { + return redDot; + } + + /** + * <code>optional bool RedDot = 2;</code> + * @param value the redDot to set + * @return this + */ + public ActivityState setRedDot(final boolean value) { + bitField0_ |= 0x00000002; + redDot = value; + return this; + } + + /** + * <code>optional bool Banner = 3;</code> + * @return whether the banner field is set + */ + public boolean hasBanner() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool Banner = 3;</code> + * @return this + */ + public ActivityState clearBanner() { + bitField0_ &= ~0x00000004; + banner = false; + return this; + } + + /** + * <code>optional bool Banner = 3;</code> + * @return the banner + */ + public boolean getBanner() { + return banner; + } + + /** + * <code>optional bool Banner = 3;</code> + * @param value the banner to set + * @return this + */ + public ActivityState setBanner(final boolean value) { + bitField0_ |= 0x00000004; + banner = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityState clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityState addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityState setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActivityState copyFrom(final ActivityState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + redDot = other.redDot; + banner = other.banner; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityState mergeFrom(final ActivityState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasRedDot()) { + setRedDot(other.redDot); + } + if (other.hasBanner()) { + setBanner(other.banner); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActivityState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + redDot = false; + banner = false; + nextPackage.clear(); + return this; + } + + @Override + public ActivityState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityState)) { + return false; + } + ActivityState other = (ActivityState) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasRedDot() || redDot == other.redDot) + && (!hasBanner() || banner == other.banner) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(redDot); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(banner); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // redDot + redDot = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // banner + banner = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.redDot, redDot); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.banner, banner); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActivityState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851053288: { + if (input.isAtField(FieldNames.redDot)) { + if (!input.trySkipNullValue()) { + redDot = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1982491468: { + if (input.isAtField(FieldNames.banner)) { + if (!input.trySkipNullValue()) { + banner = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityState clone() { + return new ActivityState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityState parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityState(), data).checkInitialized(); + } + + public static ActivityState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityState(), input).checkInitialized(); + } + + public static ActivityState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityState(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityState messages + */ + public static MessageFactory<ActivityState> getFactory() { + return ActivityStateFactory.INSTANCE; + } + + private enum ActivityStateFactory implements MessageFactory<ActivityState> { + INSTANCE; + + @Override + public ActivityState create() { + return ActivityState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName redDot = FieldName.forField("RedDot"); + + static final FieldName banner = FieldName.forField("Banner"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code Chat} + */ + public static final class Chat extends ProtoMessage<Chat> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Process = 3;</code> + */ + private int process; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Options = 2;</code> + */ + private final RepeatedInt options = RepeatedInt.newEmptyInstance(); + + private Chat() { + } + + /** + * @return a new empty instance of {@code Chat} + */ + public static Chat newInstance() { + return new Chat(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public Chat clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public Chat setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Process = 3;</code> + * @return whether the process field is set + */ + public boolean hasProcess() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Process = 3;</code> + * @return this + */ + public Chat clearProcess() { + bitField0_ &= ~0x00000002; + process = 0; + return this; + } + + /** + * <code>optional uint32 Process = 3;</code> + * @return the process + */ + public int getProcess() { + return process; + } + + /** + * <code>optional uint32 Process = 3;</code> + * @param value the process to set + * @return this + */ + public Chat setProcess(final int value) { + bitField0_ |= 0x00000002; + process = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Chat clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Chat addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Chat addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Chat setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @return whether the options field is set + */ + public boolean hasOptions() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @return this + */ + public Chat clearOptions() { + bitField0_ &= ~0x00000008; + options.clear(); + return this; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableOptions()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getOptions() { + return options; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableOptions() { + bitField0_ |= 0x00000008; + return options; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @param value the options to add + * @return this + */ + public Chat addOptions(final int value) { + bitField0_ |= 0x00000008; + options.add(value); + return this; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @param values the options to add + * @return this + */ + public Chat addAllOptions(final int... values) { + bitField0_ |= 0x00000008; + options.addAll(values); + return this; + } + + @Override + public Chat copyFrom(final Chat other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + process = other.process; + nextPackage.copyFrom(other.nextPackage); + options.copyFrom(other.options); + } + return this; + } + + @Override + public Chat mergeFrom(final Chat other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasProcess()) { + setProcess(other.process); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasOptions()) { + getMutableOptions().addAll(other.options); + } + return this; + } + + @Override + public Chat clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + process = 0; + nextPackage.clear(); + options.clear(); + return this; + } + + @Override + public Chat clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + options.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Chat)) { + return false; + } + Chat other = (Chat) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasProcess() || process == other.process) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasOptions() || options.equals(other.options)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(process); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < options.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(options.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(process); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * options.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(options); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Chat mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // process + process = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // options [packed=true] + input.readPackedUInt32(options, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // options [packed=false] + tag = input.readRepeatedUInt32(options, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.process, process); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.options, options); + } + output.endObject(); + } + + @Override + public Chat mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1355134543: { + if (input.isAtField(FieldNames.process)) { + if (!input.trySkipNullValue()) { + process = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 415178366: { + if (input.isAtField(FieldNames.options)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(options); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Chat clone() { + return new Chat().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Chat parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Chat(), data).checkInitialized(); + } + + public static Chat parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Chat(), input).checkInitialized(); + } + + public static Chat parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Chat(), input).checkInitialized(); + } + + /** + * @return factory for creating Chat messages + */ + public static MessageFactory<Chat> getFactory() { + return ChatFactory.INSTANCE; + } + + private enum ChatFactory implements MessageFactory<Chat> { + INSTANCE; + + @Override + public Chat create() { + return Chat.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName process = FieldName.forField("Process"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName options = FieldName.forField("Options"); + } + } + + /** + * Protobuf type {@code Contacts} + */ + public static final class Contacts extends ProtoMessage<Contacts> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 TriggerTime = 2;</code> + */ + private long triggerTime; + + /** + * <code>optional int64 OptTime = 14;</code> + */ + private long optTime; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional bool Top = 15;</code> + */ + private boolean top; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .Chat Chats = 3;</code> + */ + private final RepeatedMessage<Chat> chats = RepeatedMessage.newEmptyInstance(Chat.getFactory()); + + private Contacts() { + } + + /** + * @return a new empty instance of {@code Contacts} + */ + public static Contacts newInstance() { + return new Contacts(); + } + + /** + * <code>optional int64 TriggerTime = 2;</code> + * @return whether the triggerTime field is set + */ + public boolean hasTriggerTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 TriggerTime = 2;</code> + * @return this + */ + public Contacts clearTriggerTime() { + bitField0_ &= ~0x00000001; + triggerTime = 0L; + return this; + } + + /** + * <code>optional int64 TriggerTime = 2;</code> + * @return the triggerTime + */ + public long getTriggerTime() { + return triggerTime; + } + + /** + * <code>optional int64 TriggerTime = 2;</code> + * @param value the triggerTime to set + * @return this + */ + public Contacts setTriggerTime(final long value) { + bitField0_ |= 0x00000001; + triggerTime = value; + return this; + } + + /** + * <code>optional int64 OptTime = 14;</code> + * @return whether the optTime field is set + */ + public boolean hasOptTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional int64 OptTime = 14;</code> + * @return this + */ + public Contacts clearOptTime() { + bitField0_ &= ~0x00000002; + optTime = 0L; + return this; + } + + /** + * <code>optional int64 OptTime = 14;</code> + * @return the optTime + */ + public long getOptTime() { + return optTime; + } + + /** + * <code>optional int64 OptTime = 14;</code> + * @param value the optTime to set + * @return this + */ + public Contacts setOptTime(final long value) { + bitField0_ |= 0x00000002; + optTime = value; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public Contacts clearCharId() { + bitField0_ &= ~0x00000004; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public Contacts setCharId(final int value) { + bitField0_ |= 0x00000004; + charId = value; + return this; + } + + /** + * <code>optional bool Top = 15;</code> + * @return whether the top field is set + */ + public boolean hasTop() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool Top = 15;</code> + * @return this + */ + public Contacts clearTop() { + bitField0_ &= ~0x00000008; + top = false; + return this; + } + + /** + * <code>optional bool Top = 15;</code> + * @return the top + */ + public boolean getTop() { + return top; + } + + /** + * <code>optional bool Top = 15;</code> + * @param value the top to set + * @return this + */ + public Contacts setTop(final boolean value) { + bitField0_ |= 0x00000008; + top = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public Contacts clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public Contacts addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public Contacts addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public Contacts setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .Chat Chats = 3;</code> + * @return whether the chats field is set + */ + public boolean hasChats() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated .Chat Chats = 3;</code> + * @return this + */ + public Contacts clearChats() { + bitField0_ &= ~0x00000020; + chats.clear(); + return this; + } + + /** + * <code>repeated .Chat Chats = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChats()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Chat> getChats() { + return chats; + } + + /** + * <code>repeated .Chat Chats = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Chat> getMutableChats() { + bitField0_ |= 0x00000020; + return chats; + } + + /** + * <code>repeated .Chat Chats = 3;</code> + * @param value the chats to add + * @return this + */ + public Contacts addChats(final Chat value) { + bitField0_ |= 0x00000020; + chats.add(value); + return this; + } + + /** + * <code>repeated .Chat Chats = 3;</code> + * @param values the chats to add + * @return this + */ + public Contacts addAllChats(final Chat... values) { + bitField0_ |= 0x00000020; + chats.addAll(values); + return this; + } + + @Override + public Contacts copyFrom(final Contacts other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + triggerTime = other.triggerTime; + optTime = other.optTime; + charId = other.charId; + top = other.top; + nextPackage.copyFrom(other.nextPackage); + chats.copyFrom(other.chats); + } + return this; + } + + @Override + public Contacts mergeFrom(final Contacts other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTriggerTime()) { + setTriggerTime(other.triggerTime); + } + if (other.hasOptTime()) { + setOptTime(other.optTime); + } + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasTop()) { + setTop(other.top); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasChats()) { + getMutableChats().addAll(other.chats); + } + return this; + } + + @Override + public Contacts clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + triggerTime = 0L; + optTime = 0L; + charId = 0; + top = false; + nextPackage.clear(); + chats.clear(); + return this; + } + + @Override + public Contacts clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chats.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Contacts)) { + return false; + } + Contacts other = (Contacts) o; + return bitField0_ == other.bitField0_ + && (!hasTriggerTime() || triggerTime == other.triggerTime) + && (!hasOptTime() || optTime == other.optTime) + && (!hasCharId() || charId == other.charId) + && (!hasTop() || top == other.top) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasChats() || chats.equals(other.chats)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(triggerTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 112); + output.writeInt64NoTag(optTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 120); + output.writeBoolNoTag(top); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < chats.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(chats.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(triggerTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(optTime); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * chats.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chats); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Contacts mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // triggerTime + triggerTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // optTime + optTime = input.readInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // top + top = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // chats + tag = input.readRepeatedMessage(chats, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.triggerTime, triggerTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt64(FieldNames.optTime, optTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.top, top); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.chats, chats); + } + output.endObject(); + } + + @Override + public Contacts mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 986916997: { + if (input.isAtField(FieldNames.triggerTime)) { + if (!input.trySkipNullValue()) { + triggerTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 414546944: { + if (input.isAtField(FieldNames.optTime)) { + if (!input.trySkipNullValue()) { + optTime = input.readInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84277: { + if (input.isAtField(FieldNames.top)) { + if (!input.trySkipNullValue()) { + top = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071099: { + if (input.isAtField(FieldNames.chats)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chats); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Contacts clone() { + return new Contacts().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Contacts parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Contacts(), data).checkInitialized(); + } + + public static Contacts parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Contacts(), input).checkInitialized(); + } + + public static Contacts parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Contacts(), input).checkInitialized(); + } + + /** + * @return factory for creating Contacts messages + */ + public static MessageFactory<Contacts> getFactory() { + return ContactsFactory.INSTANCE; + } + + private enum ContactsFactory implements MessageFactory<Contacts> { + INSTANCE; + + @Override + public Contacts create() { + return Contacts.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName triggerTime = FieldName.forField("TriggerTime"); + + static final FieldName optTime = FieldName.forField("OptTime"); + + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName top = FieldName.forField("Top"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName chats = FieldName.forField("Chats"); + } + } + + /** + * Protobuf type {@code InfinityTowerLevelInfo} + */ + public static final class InfinityTowerLevelInfo extends ProtoMessage<InfinityTowerLevelInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 LevelId = 2;</code> + */ + private int levelId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ChallengeIds = 3;</code> + */ + private final RepeatedInt challengeIds = RepeatedInt.newEmptyInstance(); + + private InfinityTowerLevelInfo() { + } + + /** + * @return a new empty instance of {@code InfinityTowerLevelInfo} + */ + public static InfinityTowerLevelInfo newInstance() { + return new InfinityTowerLevelInfo(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public InfinityTowerLevelInfo clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public InfinityTowerLevelInfo setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @return this + */ + public InfinityTowerLevelInfo clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * <code>optional uint32 LevelId = 2;</code> + * @param value the levelId to set + * @return this + */ + public InfinityTowerLevelInfo setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InfinityTowerLevelInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InfinityTowerLevelInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InfinityTowerLevelInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InfinityTowerLevelInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ChallengeIds = 3;</code> + * @return whether the challengeIds field is set + */ + public boolean hasChallengeIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 ChallengeIds = 3;</code> + * @return this + */ + public InfinityTowerLevelInfo clearChallengeIds() { + bitField0_ &= ~0x00000008; + challengeIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ChallengeIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChallengeIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getChallengeIds() { + return challengeIds; + } + + /** + * <code>repeated uint32 ChallengeIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableChallengeIds() { + bitField0_ |= 0x00000008; + return challengeIds; + } + + /** + * <code>repeated uint32 ChallengeIds = 3;</code> + * @param value the challengeIds to add + * @return this + */ + public InfinityTowerLevelInfo addChallengeIds(final int value) { + bitField0_ |= 0x00000008; + challengeIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ChallengeIds = 3;</code> + * @param values the challengeIds to add + * @return this + */ + public InfinityTowerLevelInfo addAllChallengeIds(final int... values) { + bitField0_ |= 0x00000008; + challengeIds.addAll(values); + return this; + } + + @Override + public InfinityTowerLevelInfo copyFrom(final InfinityTowerLevelInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + levelId = other.levelId; + nextPackage.copyFrom(other.nextPackage); + challengeIds.copyFrom(other.challengeIds); + } + return this; + } + + @Override + public InfinityTowerLevelInfo mergeFrom(final InfinityTowerLevelInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasChallengeIds()) { + getMutableChallengeIds().addAll(other.challengeIds); + } + return this; + } + + @Override + public InfinityTowerLevelInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + levelId = 0; + nextPackage.clear(); + challengeIds.clear(); + return this; + } + + @Override + public InfinityTowerLevelInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + challengeIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InfinityTowerLevelInfo)) { + return false; + } + InfinityTowerLevelInfo other = (InfinityTowerLevelInfo) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasLevelId() || levelId == other.levelId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasChallengeIds() || challengeIds.equals(other.challengeIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < challengeIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(challengeIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * challengeIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(challengeIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InfinityTowerLevelInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // challengeIds [packed=true] + input.readPackedUInt32(challengeIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // challengeIds [packed=false] + tag = input.readRepeatedUInt32(challengeIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.challengeIds, challengeIds); + } + output.endObject(); + } + + @Override + public InfinityTowerLevelInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 276658037: { + if (input.isAtField(FieldNames.challengeIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(challengeIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InfinityTowerLevelInfo clone() { + return new InfinityTowerLevelInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InfinityTowerLevelInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InfinityTowerLevelInfo(), data).checkInitialized(); + } + + public static InfinityTowerLevelInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerLevelInfo(), input).checkInitialized(); + } + + public static InfinityTowerLevelInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InfinityTowerLevelInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating InfinityTowerLevelInfo messages + */ + public static MessageFactory<InfinityTowerLevelInfo> getFactory() { + return InfinityTowerLevelInfoFactory.INSTANCE; + } + + private enum InfinityTowerLevelInfoFactory implements MessageFactory<InfinityTowerLevelInfo> { + INSTANCE; + + @Override + public InfinityTowerLevelInfo create() { + return InfinityTowerLevelInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName challengeIds = FieldName.forField("ChallengeIds"); + } + } + + /** + * Protobuf type {@code CollectResp} + */ + public static final class CollectResp extends ProtoMessage<CollectResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .CollectResp.StatusEnum Status = 1;</code> + */ + private int status; + + /** + * <code>optional .ChangeInfo Items = 2;</code> + */ + private final ChangeInfo items = ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CollectResp() { + } + + /** + * @return a new empty instance of {@code CollectResp} + */ + public static CollectResp newInstance() { + return new CollectResp(); + } + + /** + * <code>optional .CollectResp.StatusEnum Status = 1;</code> + * @return whether the status field is set + */ + public boolean hasStatus() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .CollectResp.StatusEnum Status = 1;</code> + * @return this + */ + public CollectResp clearStatus() { + bitField0_ &= ~0x00000001; + status = 0; + return this; + } + + /** + * <code>optional .CollectResp.StatusEnum Status = 1;</code> + * @return the status + */ + public StatusEnum getStatus() { + return StatusEnum.forNumber(status); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link CollectResp#getStatus()}.getNumber(). + * + * @return numeric wire representation + */ + public int getStatusValue() { + return status; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link StatusEnum}. Setting an invalid value + * can cause {@link CollectResp#getStatus()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public CollectResp setStatusValue(final int value) { + bitField0_ |= 0x00000001; + status = value; + return this; + } + + /** + * <code>optional .CollectResp.StatusEnum Status = 1;</code> + * @param value the status to set + * @return this + */ + public CollectResp setStatus(final StatusEnum value) { + bitField0_ |= 0x00000001; + status = value.getNumber(); + return this; + } + + /** + * <code>optional .ChangeInfo Items = 2;</code> + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Items = 2;</code> + * @return this + */ + public CollectResp clearItems() { + bitField0_ &= ~0x00000002; + items.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Items = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ChangeInfo getItems() { + return items; + } + + /** + * <code>optional .ChangeInfo Items = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ChangeInfo getMutableItems() { + bitField0_ |= 0x00000002; + return items; + } + + /** + * <code>optional .ChangeInfo Items = 2;</code> + * @param value the items to set + * @return this + */ + public CollectResp setItems(final ChangeInfo value) { + bitField0_ |= 0x00000002; + items.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CollectResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CollectResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CollectResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CollectResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CollectResp copyFrom(final CollectResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + status = other.status; + items.copyFrom(other.items); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CollectResp mergeFrom(final CollectResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStatus()) { + setStatusValue(other.status); + } + if (other.hasItems()) { + getMutableItems().mergeFrom(other.items); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CollectResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + status = 0; + items.clear(); + nextPackage.clear(); + return this; + } + + @Override + public CollectResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + items.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CollectResp)) { + return false; + } + CollectResp other = (CollectResp) o; + return bitField0_ == other.bitField0_ + && (!hasStatus() || status == other.status) + && (!hasItems() || items.equals(other.items)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeEnumNoTag(status); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(status); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(items); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CollectResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // status + final int value = input.readInt32(); + if (StatusEnum.forNumber(value) != null) { + status = value; + bitField0_ |= 0x00000001; + } + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + input.readMessage(items); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeEnum(FieldNames.status, status, StatusEnum.converter()); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.items, items); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CollectResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1808614382: { + if (input.isAtField(FieldNames.status)) { + if (!input.trySkipNullValue()) { + final StatusEnum value = input.readEnum(StatusEnum.converter()); + if (value != null) { + status = value.getNumber(); + bitField0_ |= 0x00000001; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readMessage(items); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CollectResp clone() { + return new CollectResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CollectResp parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CollectResp(), data).checkInitialized(); + } + + public static CollectResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CollectResp(), input).checkInitialized(); + } + + public static CollectResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CollectResp(), input).checkInitialized(); + } + + /** + * @return factory for creating CollectResp messages + */ + public static MessageFactory<CollectResp> getFactory() { + return CollectRespFactory.INSTANCE; + } + + /** + * Protobuf enum {@code StatusEnum} + */ + public enum StatusEnum implements ProtoEnum<StatusEnum> { + /** + * <code>Unpaid = 0;</code> + */ + Unpaid("Unpaid", 0), + + /** + * <code>Done = 1;</code> + */ + Done("Done", 1), + + /** + * <code>Retry = 2;</code> + */ + Retry("Retry", 2), + + /** + * <code>Error = 3;</code> + */ + Error("Error", 3); + + /** + * <code>Unpaid = 0;</code> + */ + public static final int Unpaid_VALUE = 0; + + /** + * <code>Done = 1;</code> + */ + public static final int Done_VALUE = 1; + + /** + * <code>Retry = 2;</code> + */ + public static final int Retry_VALUE = 2; + + /** + * <code>Error = 3;</code> + */ + public static final int Error_VALUE = 3; + + private final java.lang.String name; + + private final int number; + + private StatusEnum(java.lang.String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public java.lang.String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter<StatusEnum> converter() { + return StatusEnumConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static StatusEnum forNumber(int value) { + return StatusEnumConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static StatusEnum forNumberOr(int number, StatusEnum other) { + StatusEnum value = forNumber(number); + return value == null ? other : value; + } + + enum StatusEnumConverter implements ProtoEnum.EnumConverter<StatusEnum> { + INSTANCE; + + private static final StatusEnum[] lookup = new StatusEnum[4]; + + static { + lookup[0] = Unpaid; + lookup[1] = Done; + lookup[2] = Retry; + lookup[3] = Error; + } + + @Override + public final StatusEnum forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final StatusEnum forName(final CharSequence value) { + if (value.length() == 4) { + if (ProtoUtil.isEqual("Done", value)) { + return Done; + } + } + if (value.length() == 5) { + if (ProtoUtil.isEqual("Retry", value)) { + return Retry; + } + if (ProtoUtil.isEqual("Error", value)) { + return Error; + } + } + if (value.length() == 6) { + if (ProtoUtil.isEqual("Unpaid", value)) { + return Unpaid; + } + } + return null; + } + } + } + + private enum CollectRespFactory implements MessageFactory<CollectResp> { + INSTANCE; + + @Override + public CollectResp create() { + return CollectResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName status = FieldName.forField("Status"); + + static final FieldName items = FieldName.forField("Items"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code EquipmentAttr} + */ + public static final class EquipmentAttr extends ProtoMessage<EquipmentAttr> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Value = 2;</code> + */ + private int value_; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private EquipmentAttr() { + } + + /** + * @return a new empty instance of {@code EquipmentAttr} + */ + public static EquipmentAttr newInstance() { + return new EquipmentAttr(); + } + + /** + * <code>optional int32 Value = 2;</code> + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Value = 2;</code> + * @return this + */ + public EquipmentAttr clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0; + return this; + } + + /** + * <code>optional int32 Value = 2;</code> + * @return the value_ + */ + public int getValue() { + return value_; + } + + /** + * <code>optional int32 Value = 2;</code> + * @param value the value_ to set + * @return this + */ + public EquipmentAttr setValue(final int value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public EquipmentAttr clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public EquipmentAttr setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public EquipmentAttr clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public EquipmentAttr addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public EquipmentAttr addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public EquipmentAttr setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public EquipmentAttr copyFrom(final EquipmentAttr other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EquipmentAttr mergeFrom(final EquipmentAttr other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EquipmentAttr clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public EquipmentAttr clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof EquipmentAttr)) { + return false; + } + EquipmentAttr other = (EquipmentAttr) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || value_ == other.value_) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(value_); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public EquipmentAttr mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // value_ + value_ = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.value_, value_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public EquipmentAttr mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 82420049: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public EquipmentAttr clone() { + return new EquipmentAttr().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static EquipmentAttr parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new EquipmentAttr(), data).checkInitialized(); + } + + public static EquipmentAttr parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new EquipmentAttr(), input).checkInitialized(); + } + + public static EquipmentAttr parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new EquipmentAttr(), input).checkInitialized(); + } + + /** + * @return factory for creating EquipmentAttr messages + */ + public static MessageFactory<EquipmentAttr> getFactory() { + return EquipmentAttrFactory.INSTANCE; + } + + private enum EquipmentAttrFactory implements MessageFactory<EquipmentAttr> { + INSTANCE; + + @Override + public EquipmentAttr create() { + return EquipmentAttr.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("Value"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code EquipmentInfo} + */ + public static final class EquipmentInfo extends ProtoMessage<EquipmentInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 Id = 1;</code> + */ + private long id; + + /** + * <code>optional uint32 Tid = 2;</code> + */ + private int tid; + + /** + * <code>optional uint32 Exp = 3;</code> + */ + private int exp; + + /** + * <code>optional bool Lock = 4;</code> + */ + private boolean lock; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Tags = 5;</code> + */ + private final RepeatedInt tags = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .EquipmentAttr Attrs = 6;</code> + */ + private final RepeatedMessage<EquipmentAttr> attrs = RepeatedMessage.newEmptyInstance(EquipmentAttr.getFactory()); + + private EquipmentInfo() { + } + + /** + * @return a new empty instance of {@code EquipmentInfo} + */ + public static EquipmentInfo newInstance() { + return new EquipmentInfo(); + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return this + */ + public EquipmentInfo clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return the id + */ + public long getId() { + return id; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @param value the id to set + * @return this + */ + public EquipmentInfo setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @return this + */ + public EquipmentInfo clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 2;</code> + * @param value the tid to set + * @return this + */ + public EquipmentInfo setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @return this + */ + public EquipmentInfo clearExp() { + bitField0_ &= ~0x00000004; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 3;</code> + * @param value the exp to set + * @return this + */ + public EquipmentInfo setExp(final int value) { + bitField0_ |= 0x00000004; + exp = value; + return this; + } + + /** + * <code>optional bool Lock = 4;</code> + * @return whether the lock field is set + */ + public boolean hasLock() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool Lock = 4;</code> + * @return this + */ + public EquipmentInfo clearLock() { + bitField0_ &= ~0x00000008; + lock = false; + return this; + } + + /** + * <code>optional bool Lock = 4;</code> + * @return the lock + */ + public boolean getLock() { + return lock; + } + + /** + * <code>optional bool Lock = 4;</code> + * @param value the lock to set + * @return this + */ + public EquipmentInfo setLock(final boolean value) { + bitField0_ |= 0x00000008; + lock = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public EquipmentInfo clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public EquipmentInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public EquipmentInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public EquipmentInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Tags = 5;</code> + * @return whether the tags field is set + */ + public boolean hasTags() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint32 Tags = 5;</code> + * @return this + */ + public EquipmentInfo clearTags() { + bitField0_ &= ~0x00000020; + tags.clear(); + return this; + } + + /** + * <code>repeated uint32 Tags = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTags()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getTags() { + return tags; + } + + /** + * <code>repeated uint32 Tags = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableTags() { + bitField0_ |= 0x00000020; + return tags; + } + + /** + * <code>repeated uint32 Tags = 5;</code> + * @param value the tags to add + * @return this + */ + public EquipmentInfo addTags(final int value) { + bitField0_ |= 0x00000020; + tags.add(value); + return this; + } + + /** + * <code>repeated uint32 Tags = 5;</code> + * @param values the tags to add + * @return this + */ + public EquipmentInfo addAllTags(final int... values) { + bitField0_ |= 0x00000020; + tags.addAll(values); + return this; + } + + /** + * <code>repeated .EquipmentAttr Attrs = 6;</code> + * @return whether the attrs field is set + */ + public boolean hasAttrs() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated .EquipmentAttr Attrs = 6;</code> + * @return this + */ + public EquipmentInfo clearAttrs() { + bitField0_ &= ~0x00000040; + attrs.clear(); + return this; + } + + /** + * <code>repeated .EquipmentAttr Attrs = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAttrs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<EquipmentAttr> getAttrs() { + return attrs; + } + + /** + * <code>repeated .EquipmentAttr Attrs = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<EquipmentAttr> getMutableAttrs() { + bitField0_ |= 0x00000040; + return attrs; + } + + /** + * <code>repeated .EquipmentAttr Attrs = 6;</code> + * @param value the attrs to add + * @return this + */ + public EquipmentInfo addAttrs(final EquipmentAttr value) { + bitField0_ |= 0x00000040; + attrs.add(value); + return this; + } + + /** + * <code>repeated .EquipmentAttr Attrs = 6;</code> + * @param values the attrs to add + * @return this + */ + public EquipmentInfo addAllAttrs(final EquipmentAttr... values) { + bitField0_ |= 0x00000040; + attrs.addAll(values); + return this; + } + + @Override + public EquipmentInfo copyFrom(final EquipmentInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + tid = other.tid; + exp = other.exp; + lock = other.lock; + nextPackage.copyFrom(other.nextPackage); + tags.copyFrom(other.tags); + attrs.copyFrom(other.attrs); + } + return this; + } + + @Override + public EquipmentInfo mergeFrom(final EquipmentInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasLock()) { + setLock(other.lock); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasTags()) { + getMutableTags().addAll(other.tags); + } + if (other.hasAttrs()) { + getMutableAttrs().addAll(other.attrs); + } + return this; + } + + @Override + public EquipmentInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + tid = 0; + exp = 0; + lock = false; + nextPackage.clear(); + tags.clear(); + attrs.clear(); + return this; + } + + @Override + public EquipmentInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + tags.clear(); + attrs.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof EquipmentInfo)) { + return false; + } + EquipmentInfo other = (EquipmentInfo) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTid() || tid == other.tid) + && (!hasExp() || exp == other.exp) + && (!hasLock() || lock == other.lock) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasTags() || tags.equals(other.tags)) + && (!hasAttrs() || attrs.equals(other.attrs)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(lock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < tags.length(); i++) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(tags.array()[i]); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < attrs.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(attrs.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * tags.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(tags); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * attrs.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(attrs); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public EquipmentInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // lock + lock = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // tags [packed=true] + input.readPackedUInt32(tags, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // attrs + tag = input.readRepeatedMessage(attrs, tag); + bitField0_ |= 0x00000040; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 40: { + // tags [packed=false] + tag = input.readRepeatedUInt32(tags, tag); + bitField0_ |= 0x00000020; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.lock, lock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt32(FieldNames.tags, tags); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.attrs, attrs); + } + output.endObject(); + } + + @Override + public EquipmentInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2373963: { + if (input.isAtField(FieldNames.lock)) { + if (!input.trySkipNullValue()) { + lock = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2598969: { + if (input.isAtField(FieldNames.tags)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(tags); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 63599746: { + if (input.isAtField(FieldNames.attrs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(attrs); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public EquipmentInfo clone() { + return new EquipmentInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static EquipmentInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new EquipmentInfo(), data).checkInitialized(); + } + + public static EquipmentInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new EquipmentInfo(), input).checkInitialized(); + } + + public static EquipmentInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new EquipmentInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating EquipmentInfo messages + */ + public static MessageFactory<EquipmentInfo> getFactory() { + return EquipmentInfoFactory.INSTANCE; + } + + private enum EquipmentInfoFactory implements MessageFactory<EquipmentInfo> { + INSTANCE; + + @Override + public EquipmentInfo create() { + return EquipmentInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName lock = FieldName.forField("Lock"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName tags = FieldName.forField("Tags"); + + static final FieldName attrs = FieldName.forField("Attrs"); + } + } + + /** + * Protobuf type {@code EquipmentInstance} + */ + public static final class EquipmentInstance extends ProtoMessage<EquipmentInstance> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 15;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private EquipmentInstance() { + } + + /** + * @return a new empty instance of {@code EquipmentInstance} + */ + public static EquipmentInstance newInstance() { + return new EquipmentInstance(); + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @return this + */ + public EquipmentInstance clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 15;</code> + * @param value the buildId to set + * @return this + */ + public EquipmentInstance setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public EquipmentInstance clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public EquipmentInstance setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public EquipmentInstance clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public EquipmentInstance setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public EquipmentInstance clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public EquipmentInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public EquipmentInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public EquipmentInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public EquipmentInstance copyFrom(final EquipmentInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EquipmentInstance mergeFrom(final EquipmentInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public EquipmentInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + star = 0; + nextPackage.clear(); + return this; + } + + @Override + public EquipmentInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof EquipmentInstance)) { + return false; + } + EquipmentInstance other = (EquipmentInstance) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public EquipmentInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 120: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public EquipmentInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public EquipmentInstance clone() { + return new EquipmentInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static EquipmentInstance parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new EquipmentInstance(), data).checkInitialized(); + } + + public static EquipmentInstance parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new EquipmentInstance(), input).checkInitialized(); + } + + public static EquipmentInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new EquipmentInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating EquipmentInstance messages + */ + public static MessageFactory<EquipmentInstance> getFactory() { + return EquipmentInstanceFactory.INSTANCE; + } + + private enum EquipmentInstanceFactory implements MessageFactory<EquipmentInstance> { + INSTANCE; + + @Override + public EquipmentInstance create() { + return EquipmentInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code AgentInfo} + */ + public static final class AgentInfo extends ProtoMessage<AgentInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 StartTime = 5;</code> + */ + private long startTime; + + /** + * <code>optional uint64 BuildId = 4;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 ProcessTime = 2;</code> + */ + private int processTime; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 CharIds = 3;</code> + */ + private final RepeatedInt charIds = RepeatedInt.newEmptyInstance(); + + private AgentInfo() { + } + + /** + * @return a new empty instance of {@code AgentInfo} + */ + public static AgentInfo newInstance() { + return new AgentInfo(); + } + + /** + * <code>optional int64 StartTime = 5;</code> + * @return whether the startTime field is set + */ + public boolean hasStartTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 StartTime = 5;</code> + * @return this + */ + public AgentInfo clearStartTime() { + bitField0_ &= ~0x00000001; + startTime = 0L; + return this; + } + + /** + * <code>optional int64 StartTime = 5;</code> + * @return the startTime + */ + public long getStartTime() { + return startTime; + } + + /** + * <code>optional int64 StartTime = 5;</code> + * @param value the startTime to set + * @return this + */ + public AgentInfo setStartTime(final long value) { + bitField0_ |= 0x00000001; + startTime = value; + return this; + } + + /** + * <code>optional uint64 BuildId = 4;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint64 BuildId = 4;</code> + * @return this + */ + public AgentInfo clearBuildId() { + bitField0_ &= ~0x00000002; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 4;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 4;</code> + * @param value the buildId to set + * @return this + */ + public AgentInfo setBuildId(final long value) { + bitField0_ |= 0x00000002; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public AgentInfo clearId() { + bitField0_ &= ~0x00000004; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public AgentInfo setId(final int value) { + bitField0_ |= 0x00000004; + id = value; + return this; + } + + /** + * <code>optional uint32 ProcessTime = 2;</code> + * @return whether the processTime field is set + */ + public boolean hasProcessTime() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 ProcessTime = 2;</code> + * @return this + */ + public AgentInfo clearProcessTime() { + bitField0_ &= ~0x00000008; + processTime = 0; + return this; + } + + /** + * <code>optional uint32 ProcessTime = 2;</code> + * @return the processTime + */ + public int getProcessTime() { + return processTime; + } + + /** + * <code>optional uint32 ProcessTime = 2;</code> + * @param value the processTime to set + * @return this + */ + public AgentInfo setProcessTime(final int value) { + bitField0_ |= 0x00000008; + processTime = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public AgentInfo clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public AgentInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public AgentInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public AgentInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 CharIds = 3;</code> + * @return whether the charIds field is set + */ + public boolean hasCharIds() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint32 CharIds = 3;</code> + * @return this + */ + public AgentInfo clearCharIds() { + bitField0_ &= ~0x00000020; + charIds.clear(); + return this; + } + + /** + * <code>repeated uint32 CharIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCharIds() { + return charIds; + } + + /** + * <code>repeated uint32 CharIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCharIds() { + bitField0_ |= 0x00000020; + return charIds; + } + + /** + * <code>repeated uint32 CharIds = 3;</code> + * @param value the charIds to add + * @return this + */ + public AgentInfo addCharIds(final int value) { + bitField0_ |= 0x00000020; + charIds.add(value); + return this; + } + + /** + * <code>repeated uint32 CharIds = 3;</code> + * @param values the charIds to add + * @return this + */ + public AgentInfo addAllCharIds(final int... values) { + bitField0_ |= 0x00000020; + charIds.addAll(values); + return this; + } + + @Override + public AgentInfo copyFrom(final AgentInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + startTime = other.startTime; + buildId = other.buildId; + id = other.id; + processTime = other.processTime; + nextPackage.copyFrom(other.nextPackage); + charIds.copyFrom(other.charIds); + } + return this; + } + + @Override + public AgentInfo mergeFrom(final AgentInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStartTime()) { + setStartTime(other.startTime); + } + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasProcessTime()) { + setProcessTime(other.processTime); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharIds()) { + getMutableCharIds().addAll(other.charIds); + } + return this; + } + + @Override + public AgentInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + startTime = 0L; + buildId = 0L; + id = 0; + processTime = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public AgentInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentInfo)) { + return false; + } + AgentInfo other = (AgentInfo) o; + return bitField0_ == other.bitField0_ + && (!hasStartTime() || startTime == other.startTime) + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasProcessTime() || processTime == other.processTime) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharIds() || charIds.equals(other.charIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeInt64NoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(processTime); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < charIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(charIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(processTime); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * charIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(charIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // startTime + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // processTime + processTime = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // charIds [packed=true] + input.readPackedUInt32(charIds, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // charIds [packed=false] + tag = input.readRepeatedUInt32(charIds, tag); + bitField0_ |= 0x00000020; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.startTime, startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.processTime, processTime); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt32(FieldNames.charIds, charIds); + } + output.endObject(); + } + + @Override + public AgentInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -125326801: { + if (input.isAtField(FieldNames.startTime)) { + if (!input.trySkipNullValue()) { + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1870380476: { + if (input.isAtField(FieldNames.processTime)) { + if (!input.trySkipNullValue()) { + processTime = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891280030: { + if (input.isAtField(FieldNames.charIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(charIds); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentInfo clone() { + return new AgentInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentInfo(), data).checkInitialized(); + } + + public static AgentInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentInfo(), input).checkInitialized(); + } + + public static AgentInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentInfo messages + */ + public static MessageFactory<AgentInfo> getFactory() { + return AgentInfoFactory.INSTANCE; + } + + private enum AgentInfoFactory implements MessageFactory<AgentInfo> { + INSTANCE; + + @Override + public AgentInfo create() { + return AgentInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName startTime = FieldName.forField("StartTime"); + + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName processTime = FieldName.forField("ProcessTime"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charIds = FieldName.forField("CharIds"); + } + } + + /** + * Protobuf type {@code AgentData} + */ + public static final class AgentData extends ProtoMessage<AgentData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 NewAgentIds = 2;</code> + */ + private final RepeatedInt newAgentIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 DailyIds = 3;</code> + */ + private final RepeatedInt dailyIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 WeeklyIds = 4;</code> + */ + private final RepeatedInt weeklyIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .AgentInfo Infos = 1;</code> + */ + private final RepeatedMessage<AgentInfo> infos = RepeatedMessage.newEmptyInstance(AgentInfo.getFactory()); + + private AgentData() { + } + + /** + * @return a new empty instance of {@code AgentData} + */ + public static AgentData newInstance() { + return new AgentData(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public AgentData clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public AgentData addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public AgentData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public AgentData setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 NewAgentIds = 2;</code> + * @return whether the newAgentIds field is set + */ + public boolean hasNewAgentIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 NewAgentIds = 2;</code> + * @return this + */ + public AgentData clearNewAgentIds() { + bitField0_ &= ~0x00000002; + newAgentIds.clear(); + return this; + } + + /** + * <code>repeated uint32 NewAgentIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNewAgentIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getNewAgentIds() { + return newAgentIds; + } + + /** + * <code>repeated uint32 NewAgentIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableNewAgentIds() { + bitField0_ |= 0x00000002; + return newAgentIds; + } + + /** + * <code>repeated uint32 NewAgentIds = 2;</code> + * @param value the newAgentIds to add + * @return this + */ + public AgentData addNewAgentIds(final int value) { + bitField0_ |= 0x00000002; + newAgentIds.add(value); + return this; + } + + /** + * <code>repeated uint32 NewAgentIds = 2;</code> + * @param values the newAgentIds to add + * @return this + */ + public AgentData addAllNewAgentIds(final int... values) { + bitField0_ |= 0x00000002; + newAgentIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 DailyIds = 3;</code> + * @return whether the dailyIds field is set + */ + public boolean hasDailyIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 DailyIds = 3;</code> + * @return this + */ + public AgentData clearDailyIds() { + bitField0_ &= ~0x00000004; + dailyIds.clear(); + return this; + } + + /** + * <code>repeated uint32 DailyIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDailyIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDailyIds() { + return dailyIds; + } + + /** + * <code>repeated uint32 DailyIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDailyIds() { + bitField0_ |= 0x00000004; + return dailyIds; + } + + /** + * <code>repeated uint32 DailyIds = 3;</code> + * @param value the dailyIds to add + * @return this + */ + public AgentData addDailyIds(final int value) { + bitField0_ |= 0x00000004; + dailyIds.add(value); + return this; + } + + /** + * <code>repeated uint32 DailyIds = 3;</code> + * @param values the dailyIds to add + * @return this + */ + public AgentData addAllDailyIds(final int... values) { + bitField0_ |= 0x00000004; + dailyIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 WeeklyIds = 4;</code> + * @return whether the weeklyIds field is set + */ + public boolean hasWeeklyIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 WeeklyIds = 4;</code> + * @return this + */ + public AgentData clearWeeklyIds() { + bitField0_ &= ~0x00000008; + weeklyIds.clear(); + return this; + } + + /** + * <code>repeated uint32 WeeklyIds = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableWeeklyIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getWeeklyIds() { + return weeklyIds; + } + + /** + * <code>repeated uint32 WeeklyIds = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableWeeklyIds() { + bitField0_ |= 0x00000008; + return weeklyIds; + } + + /** + * <code>repeated uint32 WeeklyIds = 4;</code> + * @param value the weeklyIds to add + * @return this + */ + public AgentData addWeeklyIds(final int value) { + bitField0_ |= 0x00000008; + weeklyIds.add(value); + return this; + } + + /** + * <code>repeated uint32 WeeklyIds = 4;</code> + * @param values the weeklyIds to add + * @return this + */ + public AgentData addAllWeeklyIds(final int... values) { + bitField0_ |= 0x00000008; + weeklyIds.addAll(values); + return this; + } + + /** + * <code>repeated .AgentInfo Infos = 1;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .AgentInfo Infos = 1;</code> + * @return this + */ + public AgentData clearInfos() { + bitField0_ &= ~0x00000010; + infos.clear(); + return this; + } + + /** + * <code>repeated .AgentInfo Infos = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<AgentInfo> getInfos() { + return infos; + } + + /** + * <code>repeated .AgentInfo Infos = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<AgentInfo> getMutableInfos() { + bitField0_ |= 0x00000010; + return infos; + } + + /** + * <code>repeated .AgentInfo Infos = 1;</code> + * @param value the infos to add + * @return this + */ + public AgentData addInfos(final AgentInfo value) { + bitField0_ |= 0x00000010; + infos.add(value); + return this; + } + + /** + * <code>repeated .AgentInfo Infos = 1;</code> + * @param values the infos to add + * @return this + */ + public AgentData addAllInfos(final AgentInfo... values) { + bitField0_ |= 0x00000010; + infos.addAll(values); + return this; + } + + @Override + public AgentData copyFrom(final AgentData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + newAgentIds.copyFrom(other.newAgentIds); + dailyIds.copyFrom(other.dailyIds); + weeklyIds.copyFrom(other.weeklyIds); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public AgentData mergeFrom(final AgentData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNewAgentIds()) { + getMutableNewAgentIds().addAll(other.newAgentIds); + } + if (other.hasDailyIds()) { + getMutableDailyIds().addAll(other.dailyIds); + } + if (other.hasWeeklyIds()) { + getMutableWeeklyIds().addAll(other.weeklyIds); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public AgentData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + newAgentIds.clear(); + dailyIds.clear(); + weeklyIds.clear(); + infos.clear(); + return this; + } + + @Override + public AgentData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + newAgentIds.clear(); + dailyIds.clear(); + weeklyIds.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof AgentData)) { + return false; + } + AgentData other = (AgentData) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNewAgentIds() || newAgentIds.equals(other.newAgentIds)) + && (!hasDailyIds() || dailyIds.equals(other.dailyIds)) + && (!hasWeeklyIds() || weeklyIds.equals(other.weeklyIds)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < newAgentIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(newAgentIds.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < dailyIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(dailyIds.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < weeklyIds.length(); i++) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(weeklyIds.array()[i]); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * newAgentIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(newAgentIds); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * dailyIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(dailyIds); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * weeklyIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(weeklyIds); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public AgentData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // newAgentIds [packed=true] + input.readPackedUInt32(newAgentIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // dailyIds [packed=true] + input.readPackedUInt32(dailyIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // weeklyIds [packed=true] + input.readPackedUInt32(weeklyIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // newAgentIds [packed=false] + tag = input.readRepeatedUInt32(newAgentIds, tag); + bitField0_ |= 0x00000002; + break; + } + case 24: { + // dailyIds [packed=false] + tag = input.readRepeatedUInt32(dailyIds, tag); + bitField0_ |= 0x00000004; + break; + } + case 32: { + // weeklyIds [packed=false] + tag = input.readRepeatedUInt32(weeklyIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.newAgentIds, newAgentIds); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.dailyIds, dailyIds); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.weeklyIds, weeklyIds); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public AgentData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 98785043: { + if (input.isAtField(FieldNames.newAgentIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(newAgentIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1550008831: { + if (input.isAtField(FieldNames.dailyIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(dailyIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -89234857: { + if (input.isAtField(FieldNames.weeklyIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(weeklyIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public AgentData clone() { + return new AgentData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static AgentData parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new AgentData(), data).checkInitialized(); + } + + public static AgentData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentData(), input).checkInitialized(); + } + + public static AgentData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new AgentData(), input).checkInitialized(); + } + + /** + * @return factory for creating AgentData messages + */ + public static MessageFactory<AgentData> getFactory() { + return AgentDataFactory.INSTANCE; + } + + private enum AgentDataFactory implements MessageFactory<AgentData> { + INSTANCE; + + @Override + public AgentData create() { + return AgentData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName newAgentIds = FieldName.forField("NewAgentIds"); + + static final FieldName dailyIds = FieldName.forField("DailyIds"); + + static final FieldName weeklyIds = FieldName.forField("WeeklyIds"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code HonorInfo} + */ + public static final class HonorInfo extends ProtoMessage<HonorInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 AffinityLV = 2;</code> + */ + private int affinityLV; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private HonorInfo() { + } + + /** + * @return a new empty instance of {@code HonorInfo} + */ + public static HonorInfo newInstance() { + return new HonorInfo(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public HonorInfo clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public HonorInfo setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 AffinityLV = 2;</code> + * @return whether the affinityLV field is set + */ + public boolean hasAffinityLV() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 AffinityLV = 2;</code> + * @return this + */ + public HonorInfo clearAffinityLV() { + bitField0_ &= ~0x00000002; + affinityLV = 0; + return this; + } + + /** + * <code>optional uint32 AffinityLV = 2;</code> + * @return the affinityLV + */ + public int getAffinityLV() { + return affinityLV; + } + + /** + * <code>optional uint32 AffinityLV = 2;</code> + * @param value the affinityLV to set + * @return this + */ + public HonorInfo setAffinityLV(final int value) { + bitField0_ |= 0x00000002; + affinityLV = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public HonorInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public HonorInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public HonorInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public HonorInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public HonorInfo copyFrom(final HonorInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + affinityLV = other.affinityLV; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HonorInfo mergeFrom(final HonorInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasAffinityLV()) { + setAffinityLV(other.affinityLV); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HonorInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + affinityLV = 0; + nextPackage.clear(); + return this; + } + + @Override + public HonorInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof HonorInfo)) { + return false; + } + HonorInfo other = (HonorInfo) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasAffinityLV() || affinityLV == other.affinityLV) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(affinityLV); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinityLV); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public HonorInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // affinityLV + affinityLV = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.affinityLV, affinityLV); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public HonorInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -238852910: { + if (input.isAtField(FieldNames.affinityLV)) { + if (!input.trySkipNullValue()) { + affinityLV = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public HonorInfo clone() { + return new HonorInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static HonorInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new HonorInfo(), data).checkInitialized(); + } + + public static HonorInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new HonorInfo(), input).checkInitialized(); + } + + public static HonorInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new HonorInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating HonorInfo messages + */ + public static MessageFactory<HonorInfo> getFactory() { + return HonorInfoFactory.INSTANCE; + } + + private enum HonorInfoFactory implements MessageFactory<HonorInfo> { + INSTANCE; + + @Override + public HonorInfo create() { + return HonorInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName affinityLV = FieldName.forField("AffinityLV"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CardInfo} + */ + public static final class CardInfo extends ProtoMessage<CardInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bool New = 2;</code> + */ + private boolean new_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CardInfo() { + } + + /** + * @return a new empty instance of {@code CardInfo} + */ + public static CardInfo newInstance() { + return new CardInfo(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public CardInfo clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public CardInfo setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional bool New = 2;</code> + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool New = 2;</code> + * @return this + */ + public CardInfo clearNew() { + bitField0_ &= ~0x00000002; + new_ = false; + return this; + } + + /** + * <code>optional bool New = 2;</code> + * @return the new_ + */ + public boolean getNew() { + return new_; + } + + /** + * <code>optional bool New = 2;</code> + * @param value the new_ to set + * @return this + */ + public CardInfo setNew(final boolean value) { + bitField0_ |= 0x00000002; + new_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CardInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CardInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CardInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CardInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CardInfo copyFrom(final CardInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + new_ = other.new_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CardInfo mergeFrom(final CardInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CardInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + new_ = false; + nextPackage.clear(); + return this; + } + + @Override + public CardInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CardInfo)) { + return false; + } + CardInfo other = (CardInfo) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNew() || new_ == other.new_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(new_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CardInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // new_ + new_ = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CardInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CardInfo clone() { + return new CardInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CardInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CardInfo(), data).checkInitialized(); + } + + public static CardInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CardInfo(), input).checkInitialized(); + } + + public static CardInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CardInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating CardInfo messages + */ + public static MessageFactory<CardInfo> getFactory() { + return CardInfoFactory.INSTANCE; + } + + private enum CardInfoFactory implements MessageFactory<CardInfo> { + INSTANCE; + + @Override + public CardInfo create() { + return CardInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code VampireSurvivorEvent} + */ + public static final class VampireSurvivorEvent extends ProtoMessage<VampireSurvivorEvent> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 EventType = 1;</code> + */ + private int eventType; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Numbers = 2;</code> + */ + private final RepeatedInt numbers = RepeatedInt.newEmptyInstance(); + + private VampireSurvivorEvent() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorEvent} + */ + public static VampireSurvivorEvent newInstance() { + return new VampireSurvivorEvent(); + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @return whether the eventType field is set + */ + public boolean hasEventType() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @return this + */ + public VampireSurvivorEvent clearEventType() { + bitField0_ &= ~0x00000001; + eventType = 0; + return this; + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @return the eventType + */ + public int getEventType() { + return eventType; + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @param value the eventType to set + * @return this + */ + public VampireSurvivorEvent setEventType(final int value) { + bitField0_ |= 0x00000001; + eventType = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorEvent clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorEvent addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorEvent addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorEvent setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Numbers = 2;</code> + * @return whether the numbers field is set + */ + public boolean hasNumbers() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Numbers = 2;</code> + * @return this + */ + public VampireSurvivorEvent clearNumbers() { + bitField0_ &= ~0x00000004; + numbers.clear(); + return this; + } + + /** + * <code>repeated uint32 Numbers = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNumbers()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getNumbers() { + return numbers; + } + + /** + * <code>repeated uint32 Numbers = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableNumbers() { + bitField0_ |= 0x00000004; + return numbers; + } + + /** + * <code>repeated uint32 Numbers = 2;</code> + * @param value the numbers to add + * @return this + */ + public VampireSurvivorEvent addNumbers(final int value) { + bitField0_ |= 0x00000004; + numbers.add(value); + return this; + } + + /** + * <code>repeated uint32 Numbers = 2;</code> + * @param values the numbers to add + * @return this + */ + public VampireSurvivorEvent addAllNumbers(final int... values) { + bitField0_ |= 0x00000004; + numbers.addAll(values); + return this; + } + + @Override + public VampireSurvivorEvent copyFrom(final VampireSurvivorEvent other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + eventType = other.eventType; + nextPackage.copyFrom(other.nextPackage); + numbers.copyFrom(other.numbers); + } + return this; + } + + @Override + public VampireSurvivorEvent mergeFrom(final VampireSurvivorEvent other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEventType()) { + setEventType(other.eventType); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNumbers()) { + getMutableNumbers().addAll(other.numbers); + } + return this; + } + + @Override + public VampireSurvivorEvent clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + eventType = 0; + nextPackage.clear(); + numbers.clear(); + return this; + } + + @Override + public VampireSurvivorEvent clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + numbers.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorEvent)) { + return false; + } + VampireSurvivorEvent other = (VampireSurvivorEvent) o; + return bitField0_ == other.bitField0_ + && (!hasEventType() || eventType == other.eventType) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNumbers() || numbers.equals(other.numbers)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(eventType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < numbers.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(numbers.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(eventType); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * numbers.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(numbers); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorEvent mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // eventType + eventType = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // numbers [packed=true] + input.readPackedUInt32(numbers, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // numbers [packed=false] + tag = input.readRepeatedUInt32(numbers, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.eventType, eventType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.numbers, numbers); + } + output.endObject(); + } + + @Override + public VampireSurvivorEvent mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2035398868: { + if (input.isAtField(FieldNames.eventType)) { + if (!input.trySkipNullValue()) { + eventType = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -335862230: { + if (input.isAtField(FieldNames.numbers)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(numbers); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorEvent clone() { + return new VampireSurvivorEvent().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorEvent parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorEvent(), data).checkInitialized(); + } + + public static VampireSurvivorEvent parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorEvent(), input).checkInitialized(); + } + + public static VampireSurvivorEvent parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorEvent(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorEvent messages + */ + public static MessageFactory<VampireSurvivorEvent> getFactory() { + return VampireSurvivorEventFactory.INSTANCE; + } + + private enum VampireSurvivorEventFactory implements MessageFactory<VampireSurvivorEvent> { + INSTANCE; + + @Override + public VampireSurvivorEvent create() { + return VampireSurvivorEvent.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName eventType = FieldName.forField("EventType"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName numbers = FieldName.forField("Numbers"); + } + } + + /** + * Protobuf type {@code VampireSurvivorLevelReward} + */ + public static final class VampireSurvivorLevelReward extends ProtoMessage<VampireSurvivorLevelReward> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Level = 1;</code> + */ + private int level; + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + */ + private final VampireSurvivorFateCardSelect pkg = VampireSurvivorFateCardSelect.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private VampireSurvivorLevelReward() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorLevelReward} + */ + public static VampireSurvivorLevelReward newInstance() { + return new VampireSurvivorLevelReward(); + } + + /** + * <code>optional uint32 Level = 1;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Level = 1;</code> + * @return this + */ + public VampireSurvivorLevelReward clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 1;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 1;</code> + * @param value the level to set + * @return this + */ + public VampireSurvivorLevelReward setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * @return whether the pkg field is set + */ + public boolean hasPkg() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * @return this + */ + public VampireSurvivorLevelReward clearPkg() { + bitField0_ &= ~0x00000002; + pkg.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePkg()} if you want to modify it. + * + * @return internal storage object for reading + */ + public VampireSurvivorFateCardSelect getPkg() { + return pkg; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public VampireSurvivorFateCardSelect getMutablePkg() { + bitField0_ |= 0x00000002; + return pkg; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * @param value the pkg to set + * @return this + */ + public VampireSurvivorLevelReward setPkg(final VampireSurvivorFateCardSelect value) { + bitField0_ |= 0x00000002; + pkg.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorLevelReward clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorLevelReward addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorLevelReward addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorLevelReward setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public VampireSurvivorLevelReward copyFrom(final VampireSurvivorLevelReward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + pkg.copyFrom(other.pkg); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorLevelReward mergeFrom(final VampireSurvivorLevelReward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasPkg()) { + getMutablePkg().mergeFrom(other.pkg); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorLevelReward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + pkg.clear(); + nextPackage.clear(); + return this; + } + + @Override + public VampireSurvivorLevelReward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + pkg.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorLevelReward)) { + return false; + } + VampireSurvivorLevelReward other = (VampireSurvivorLevelReward) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasPkg() || pkg.equals(other.pkg)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(pkg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(pkg); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorLevelReward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // pkg + input.readMessage(pkg); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.pkg, pkg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public VampireSurvivorLevelReward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80300: { + if (input.isAtField(FieldNames.pkg)) { + if (!input.trySkipNullValue()) { + input.readMessage(pkg); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorLevelReward clone() { + return new VampireSurvivorLevelReward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorLevelReward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorLevelReward(), data).checkInitialized(); + } + + public static VampireSurvivorLevelReward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorLevelReward(), input).checkInitialized(); + } + + public static VampireSurvivorLevelReward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorLevelReward(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorLevelReward messages + */ + public static MessageFactory<VampireSurvivorLevelReward> getFactory() { + return VampireSurvivorLevelRewardFactory.INSTANCE; + } + + private enum VampireSurvivorLevelRewardFactory implements MessageFactory<VampireSurvivorLevelReward> { + INSTANCE; + + @Override + public VampireSurvivorLevelReward create() { + return VampireSurvivorLevelReward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName pkg = FieldName.forField("Pkg"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code VampireSurvivorFateCardSelect} + */ + public static final class VampireSurvivorFateCardSelect extends ProtoMessage<VampireSurvivorFateCardSelect> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ReRoll = 2;</code> + */ + private int reRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .CardInfo Cards = 1;</code> + */ + private final RepeatedMessage<CardInfo> cards = RepeatedMessage.newEmptyInstance(CardInfo.getFactory()); + + private VampireSurvivorFateCardSelect() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorFateCardSelect} + */ + public static VampireSurvivorFateCardSelect newInstance() { + return new VampireSurvivorFateCardSelect(); + } + + /** + * <code>optional uint32 ReRoll = 2;</code> + * @return whether the reRoll field is set + */ + public boolean hasReRoll() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ReRoll = 2;</code> + * @return this + */ + public VampireSurvivorFateCardSelect clearReRoll() { + bitField0_ &= ~0x00000001; + reRoll = 0; + return this; + } + + /** + * <code>optional uint32 ReRoll = 2;</code> + * @return the reRoll + */ + public int getReRoll() { + return reRoll; + } + + /** + * <code>optional uint32 ReRoll = 2;</code> + * @param value the reRoll to set + * @return this + */ + public VampireSurvivorFateCardSelect setReRoll(final int value) { + bitField0_ |= 0x00000001; + reRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorFateCardSelect clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorFateCardSelect addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorFateCardSelect addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorFateCardSelect setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .CardInfo Cards = 1;</code> + * @return whether the cards field is set + */ + public boolean hasCards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .CardInfo Cards = 1;</code> + * @return this + */ + public VampireSurvivorFateCardSelect clearCards() { + bitField0_ &= ~0x00000004; + cards.clear(); + return this; + } + + /** + * <code>repeated .CardInfo Cards = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<CardInfo> getCards() { + return cards; + } + + /** + * <code>repeated .CardInfo Cards = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<CardInfo> getMutableCards() { + bitField0_ |= 0x00000004; + return cards; + } + + /** + * <code>repeated .CardInfo Cards = 1;</code> + * @param value the cards to add + * @return this + */ + public VampireSurvivorFateCardSelect addCards(final CardInfo value) { + bitField0_ |= 0x00000004; + cards.add(value); + return this; + } + + /** + * <code>repeated .CardInfo Cards = 1;</code> + * @param values the cards to add + * @return this + */ + public VampireSurvivorFateCardSelect addAllCards(final CardInfo... values) { + bitField0_ |= 0x00000004; + cards.addAll(values); + return this; + } + + @Override + public VampireSurvivorFateCardSelect copyFrom(final VampireSurvivorFateCardSelect other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + reRoll = other.reRoll; + nextPackage.copyFrom(other.nextPackage); + cards.copyFrom(other.cards); + } + return this; + } + + @Override + public VampireSurvivorFateCardSelect mergeFrom(final VampireSurvivorFateCardSelect other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasReRoll()) { + setReRoll(other.reRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCards()) { + getMutableCards().addAll(other.cards); + } + return this; + } + + @Override + public VampireSurvivorFateCardSelect clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + reRoll = 0; + nextPackage.clear(); + cards.clear(); + return this; + } + + @Override + public VampireSurvivorFateCardSelect clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorFateCardSelect)) { + return false; + } + VampireSurvivorFateCardSelect other = (VampireSurvivorFateCardSelect) o; + return bitField0_ == other.bitField0_ + && (!hasReRoll() || reRoll == other.reRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCards() || cards.equals(other.cards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(reRoll); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < cards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(cards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(reRoll); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * cards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(cards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorFateCardSelect mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // reRoll + reRoll = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // cards + tag = input.readRepeatedMessage(cards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.reRoll, reRoll); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.cards, cards); + } + output.endObject(); + } + + @Override + public VampireSurvivorFateCardSelect mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1851548304: { + if (input.isAtField(FieldNames.reRoll)) { + if (!input.trySkipNullValue()) { + reRoll = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64878403: { + if (input.isAtField(FieldNames.cards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(cards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorFateCardSelect clone() { + return new VampireSurvivorFateCardSelect().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorFateCardSelect parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorFateCardSelect(), data).checkInitialized(); + } + + public static VampireSurvivorFateCardSelect parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorFateCardSelect(), input).checkInitialized(); + } + + public static VampireSurvivorFateCardSelect parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorFateCardSelect(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorFateCardSelect messages + */ + public static MessageFactory<VampireSurvivorFateCardSelect> getFactory() { + return VampireSurvivorFateCardSelectFactory.INSTANCE; + } + + private enum VampireSurvivorFateCardSelectFactory implements MessageFactory<VampireSurvivorFateCardSelect> { + INSTANCE; + + @Override + public VampireSurvivorFateCardSelect create() { + return VampireSurvivorFateCardSelect.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName reRoll = FieldName.forField("ReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cards = FieldName.forField("Cards"); + } + } + + /** + * Protobuf type {@code ScoreBossLevel} + */ + public static final class ScoreBossLevel extends ProtoMessage<ScoreBossLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 2;</code> + */ + private long buildId; + + /** + * <code>optional uint32 LevelId = 1;</code> + */ + private int levelId; + + /** + * <code>optional uint32 Score = 3;</code> + */ + private int score; + + /** + * <code>optional uint32 Star = 4;</code> + */ + private int star; + + /** + * <code>optional uint32 SkillScore = 5;</code> + */ + private int skillScore; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ScoreBossLevel() { + } + + /** + * @return a new empty instance of {@code ScoreBossLevel} + */ + public static ScoreBossLevel newInstance() { + return new ScoreBossLevel(); + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return this + */ + public ScoreBossLevel clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @param value the buildId to set + * @return this + */ + public ScoreBossLevel setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return this + */ + public ScoreBossLevel clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @param value the levelId to set + * @return this + */ + public ScoreBossLevel setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @return this + */ + public ScoreBossLevel clearScore() { + bitField0_ &= ~0x00000004; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 3;</code> + * @param value the score to set + * @return this + */ + public ScoreBossLevel setScore(final int value) { + bitField0_ |= 0x00000004; + score = value; + return this; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @return this + */ + public ScoreBossLevel clearStar() { + bitField0_ &= ~0x00000008; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @param value the star to set + * @return this + */ + public ScoreBossLevel setStar(final int value) { + bitField0_ |= 0x00000008; + star = value; + return this; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @return whether the skillScore field is set + */ + public boolean hasSkillScore() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @return this + */ + public ScoreBossLevel clearSkillScore() { + bitField0_ &= ~0x00000010; + skillScore = 0; + return this; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @return the skillScore + */ + public int getSkillScore() { + return skillScore; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @param value the skillScore to set + * @return this + */ + public ScoreBossLevel setSkillScore(final int value) { + bitField0_ |= 0x00000010; + skillScore = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossLevel clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ScoreBossLevel copyFrom(final ScoreBossLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + levelId = other.levelId; + score = other.score; + star = other.star; + skillScore = other.skillScore; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossLevel mergeFrom(final ScoreBossLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasSkillScore()) { + setSkillScore(other.skillScore); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + levelId = 0; + score = 0; + star = 0; + skillScore = 0; + nextPackage.clear(); + return this; + } + + @Override + public ScoreBossLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossLevel)) { + return false; + } + ScoreBossLevel other = (ScoreBossLevel) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasScore() || score == other.score) + && (!hasStar() || star == other.star) + && (!hasSkillScore() || skillScore == other.skillScore) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(skillScore); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skillScore); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // skillScore + skillScore = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.skillScore, skillScore); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ScoreBossLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -705549599: { + if (input.isAtField(FieldNames.skillScore)) { + if (!input.trySkipNullValue()) { + skillScore = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossLevel clone() { + return new ScoreBossLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossLevel(), data).checkInitialized(); + } + + public static ScoreBossLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossLevel(), input).checkInitialized(); + } + + public static ScoreBossLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossLevel messages + */ + public static MessageFactory<ScoreBossLevel> getFactory() { + return ScoreBossLevelFactory.INSTANCE; + } + + private enum ScoreBossLevelFactory implements MessageFactory<ScoreBossLevel> { + INSTANCE; + + @Override + public ScoreBossLevel create() { + return ScoreBossLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName skillScore = FieldName.forField("SkillScore"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code VampireSurvivorLevel} + */ + public static final class VampireSurvivorLevel extends ProtoMessage<VampireSurvivorLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Score = 2;</code> + */ + private int score; + + /** + * <code>optional bool Passed = 4;</code> + */ + private boolean passed; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 BuildIds = 3;</code> + */ + private final RepeatedLong buildIds = RepeatedLong.newEmptyInstance(); + + private VampireSurvivorLevel() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorLevel} + */ + public static VampireSurvivorLevel newInstance() { + return new VampireSurvivorLevel(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public VampireSurvivorLevel clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public VampireSurvivorLevel setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return this + */ + public VampireSurvivorLevel clearScore() { + bitField0_ &= ~0x00000002; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @param value the score to set + * @return this + */ + public VampireSurvivorLevel setScore(final int value) { + bitField0_ |= 0x00000002; + score = value; + return this; + } + + /** + * <code>optional bool Passed = 4;</code> + * @return whether the passed field is set + */ + public boolean hasPassed() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool Passed = 4;</code> + * @return this + */ + public VampireSurvivorLevel clearPassed() { + bitField0_ &= ~0x00000004; + passed = false; + return this; + } + + /** + * <code>optional bool Passed = 4;</code> + * @return the passed + */ + public boolean getPassed() { + return passed; + } + + /** + * <code>optional bool Passed = 4;</code> + * @param value the passed to set + * @return this + */ + public VampireSurvivorLevel setPassed(final boolean value) { + bitField0_ |= 0x00000004; + passed = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorLevel clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 3;</code> + * @return whether the buildIds field is set + */ + public boolean hasBuildIds() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint64 BuildIds = 3;</code> + * @return this + */ + public VampireSurvivorLevel clearBuildIds() { + bitField0_ &= ~0x00000010; + buildIds.clear(); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBuildIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getBuildIds() { + return buildIds; + } + + /** + * <code>repeated uint64 BuildIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableBuildIds() { + bitField0_ |= 0x00000010; + return buildIds; + } + + /** + * <code>repeated uint64 BuildIds = 3;</code> + * @param value the buildIds to add + * @return this + */ + public VampireSurvivorLevel addBuildIds(final long value) { + bitField0_ |= 0x00000010; + buildIds.add(value); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 3;</code> + * @param values the buildIds to add + * @return this + */ + public VampireSurvivorLevel addAllBuildIds(final long... values) { + bitField0_ |= 0x00000010; + buildIds.addAll(values); + return this; + } + + @Override + public VampireSurvivorLevel copyFrom(final VampireSurvivorLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + score = other.score; + passed = other.passed; + nextPackage.copyFrom(other.nextPackage); + buildIds.copyFrom(other.buildIds); + } + return this; + } + + @Override + public VampireSurvivorLevel mergeFrom(final VampireSurvivorLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasPassed()) { + setPassed(other.passed); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBuildIds()) { + getMutableBuildIds().addAll(other.buildIds); + } + return this; + } + + @Override + public VampireSurvivorLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + score = 0; + passed = false; + nextPackage.clear(); + buildIds.clear(); + return this; + } + + @Override + public VampireSurvivorLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + buildIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorLevel)) { + return false; + } + VampireSurvivorLevel other = (VampireSurvivorLevel) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasScore() || score == other.score) + && (!hasPassed() || passed == other.passed) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBuildIds() || buildIds.equals(other.buildIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(passed); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < buildIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(buildIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * buildIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(buildIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // passed + passed = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // buildIds [packed=true] + input.readPackedUInt64(buildIds, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // buildIds [packed=false] + tag = input.readRepeatedUInt64(buildIds, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.passed, passed); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt64(FieldNames.buildIds, buildIds); + } + output.endObject(); + } + + @Override + public VampireSurvivorLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1911513968: { + if (input.isAtField(FieldNames.passed)) { + if (!input.trySkipNullValue()) { + passed = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1366033014: { + if (input.isAtField(FieldNames.buildIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(buildIds); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorLevel clone() { + return new VampireSurvivorLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorLevel(), data).checkInitialized(); + } + + public static VampireSurvivorLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorLevel(), input).checkInitialized(); + } + + public static VampireSurvivorLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorLevel messages + */ + public static MessageFactory<VampireSurvivorLevel> getFactory() { + return VampireSurvivorLevelFactory.INSTANCE; + } + + private enum VampireSurvivorLevelFactory implements MessageFactory<VampireSurvivorLevel> { + INSTANCE; + + @Override + public VampireSurvivorLevel create() { + return VampireSurvivorLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName passed = FieldName.forField("Passed"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName buildIds = FieldName.forField("BuildIds"); + } + } + + /** + * Protobuf type {@code VampireSurvivorRecordInfo} + */ + public static final class VampireSurvivorRecordInfo extends ProtoMessage<VampireSurvivorRecordInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 SeasonScore = 3;</code> + */ + private int seasonScore; + + /** + * <code>optional .VampireSurvivorLevel Season = 2;</code> + */ + private final VampireSurvivorLevel season = VampireSurvivorLevel.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .VampireSurvivorLevel Records = 1;</code> + */ + private final RepeatedMessage<VampireSurvivorLevel> records = RepeatedMessage.newEmptyInstance(VampireSurvivorLevel.getFactory()); + + private VampireSurvivorRecordInfo() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorRecordInfo} + */ + public static VampireSurvivorRecordInfo newInstance() { + return new VampireSurvivorRecordInfo(); + } + + /** + * <code>optional uint32 SeasonScore = 3;</code> + * @return whether the seasonScore field is set + */ + public boolean hasSeasonScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 SeasonScore = 3;</code> + * @return this + */ + public VampireSurvivorRecordInfo clearSeasonScore() { + bitField0_ &= ~0x00000001; + seasonScore = 0; + return this; + } + + /** + * <code>optional uint32 SeasonScore = 3;</code> + * @return the seasonScore + */ + public int getSeasonScore() { + return seasonScore; + } + + /** + * <code>optional uint32 SeasonScore = 3;</code> + * @param value the seasonScore to set + * @return this + */ + public VampireSurvivorRecordInfo setSeasonScore(final int value) { + bitField0_ |= 0x00000001; + seasonScore = value; + return this; + } + + /** + * <code>optional .VampireSurvivorLevel Season = 2;</code> + * @return whether the season field is set + */ + public boolean hasSeason() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .VampireSurvivorLevel Season = 2;</code> + * @return this + */ + public VampireSurvivorRecordInfo clearSeason() { + bitField0_ &= ~0x00000002; + season.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorLevel Season = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSeason()} if you want to modify it. + * + * @return internal storage object for reading + */ + public VampireSurvivorLevel getSeason() { + return season; + } + + /** + * <code>optional .VampireSurvivorLevel Season = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public VampireSurvivorLevel getMutableSeason() { + bitField0_ |= 0x00000002; + return season; + } + + /** + * <code>optional .VampireSurvivorLevel Season = 2;</code> + * @param value the season to set + * @return this + */ + public VampireSurvivorRecordInfo setSeason(final VampireSurvivorLevel value) { + bitField0_ |= 0x00000002; + season.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorRecordInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorRecordInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorRecordInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorRecordInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .VampireSurvivorLevel Records = 1;</code> + * @return whether the records field is set + */ + public boolean hasRecords() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .VampireSurvivorLevel Records = 1;</code> + * @return this + */ + public VampireSurvivorRecordInfo clearRecords() { + bitField0_ &= ~0x00000008; + records.clear(); + return this; + } + + /** + * <code>repeated .VampireSurvivorLevel Records = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecords()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<VampireSurvivorLevel> getRecords() { + return records; + } + + /** + * <code>repeated .VampireSurvivorLevel Records = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<VampireSurvivorLevel> getMutableRecords() { + bitField0_ |= 0x00000008; + return records; + } + + /** + * <code>repeated .VampireSurvivorLevel Records = 1;</code> + * @param value the records to add + * @return this + */ + public VampireSurvivorRecordInfo addRecords(final VampireSurvivorLevel value) { + bitField0_ |= 0x00000008; + records.add(value); + return this; + } + + /** + * <code>repeated .VampireSurvivorLevel Records = 1;</code> + * @param values the records to add + * @return this + */ + public VampireSurvivorRecordInfo addAllRecords(final VampireSurvivorLevel... values) { + bitField0_ |= 0x00000008; + records.addAll(values); + return this; + } + + @Override + public VampireSurvivorRecordInfo copyFrom(final VampireSurvivorRecordInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + seasonScore = other.seasonScore; + season.copyFrom(other.season); + nextPackage.copyFrom(other.nextPackage); + records.copyFrom(other.records); + } + return this; + } + + @Override + public VampireSurvivorRecordInfo mergeFrom(final VampireSurvivorRecordInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSeasonScore()) { + setSeasonScore(other.seasonScore); + } + if (other.hasSeason()) { + getMutableSeason().mergeFrom(other.season); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRecords()) { + getMutableRecords().addAll(other.records); + } + return this; + } + + @Override + public VampireSurvivorRecordInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + seasonScore = 0; + season.clear(); + nextPackage.clear(); + records.clear(); + return this; + } + + @Override + public VampireSurvivorRecordInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + season.clearQuick(); + nextPackage.clear(); + records.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorRecordInfo)) { + return false; + } + VampireSurvivorRecordInfo other = (VampireSurvivorRecordInfo) o; + return bitField0_ == other.bitField0_ + && (!hasSeasonScore() || seasonScore == other.seasonScore) + && (!hasSeason() || season.equals(other.season)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRecords() || records.equals(other.records)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(seasonScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(season); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < records.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(records.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(seasonScore); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(season); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * records.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(records); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorRecordInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // seasonScore + seasonScore = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // season + input.readMessage(season); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // records + tag = input.readRepeatedMessage(records, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.seasonScore, seasonScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.season, season); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.records, records); + } + output.endObject(); + } + + @Override + public VampireSurvivorRecordInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 796778831: { + if (input.isAtField(FieldNames.seasonScore)) { + if (!input.trySkipNullValue()) { + seasonScore = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1822468349: { + if (input.isAtField(FieldNames.season)) { + if (!input.trySkipNullValue()) { + input.readMessage(season); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1547717086: { + if (input.isAtField(FieldNames.records)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(records); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorRecordInfo clone() { + return new VampireSurvivorRecordInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorRecordInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorRecordInfo(), data).checkInitialized(); + } + + public static VampireSurvivorRecordInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRecordInfo(), input).checkInitialized(); + } + + public static VampireSurvivorRecordInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRecordInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorRecordInfo messages + */ + public static MessageFactory<VampireSurvivorRecordInfo> getFactory() { + return VampireSurvivorRecordInfoFactory.INSTANCE; + } + + private enum VampireSurvivorRecordInfoFactory implements MessageFactory<VampireSurvivorRecordInfo> { + INSTANCE; + + @Override + public VampireSurvivorRecordInfo create() { + return VampireSurvivorRecordInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName seasonScore = FieldName.forField("SeasonScore"); + + static final FieldName season = FieldName.forField("Season"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName records = FieldName.forField("Records"); + } + } + + /** + * Protobuf type {@code SkillInstance} + */ + public static final class SkillInstance extends ProtoMessage<SkillInstance> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 5;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional bool First = 3;</code> + */ + private boolean first; + + /** + * <code>optional bool ThreeStar = 4;</code> + */ + private boolean threeStar; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SkillInstance() { + } + + /** + * @return a new empty instance of {@code SkillInstance} + */ + public static SkillInstance newInstance() { + return new SkillInstance(); + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return this + */ + public SkillInstance clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @param value the buildId to set + * @return this + */ + public SkillInstance setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public SkillInstance clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public SkillInstance setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public SkillInstance clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public SkillInstance setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional bool First = 3;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool First = 3;</code> + * @return this + */ + public SkillInstance clearFirst() { + bitField0_ &= ~0x00000008; + first = false; + return this; + } + + /** + * <code>optional bool First = 3;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 3;</code> + * @param value the first to set + * @return this + */ + public SkillInstance setFirst(final boolean value) { + bitField0_ |= 0x00000008; + first = value; + return this; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return whether the threeStar field is set + */ + public boolean hasThreeStar() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return this + */ + public SkillInstance clearThreeStar() { + bitField0_ &= ~0x00000010; + threeStar = false; + return this; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return the threeStar + */ + public boolean getThreeStar() { + return threeStar; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @param value the threeStar to set + * @return this + */ + public SkillInstance setThreeStar(final boolean value) { + bitField0_ |= 0x00000010; + threeStar = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SkillInstance clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SkillInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SkillInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SkillInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SkillInstance copyFrom(final SkillInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + star = other.star; + first = other.first; + threeStar = other.threeStar; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstance mergeFrom(final SkillInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasThreeStar()) { + setThreeStar(other.threeStar); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + star = 0; + first = false; + threeStar = false; + nextPackage.clear(); + return this; + } + + @Override + public SkillInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkillInstance)) { + return false; + } + SkillInstance other = (SkillInstance) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasFirst() || first == other.first) + && (!hasThreeStar() || threeStar == other.threeStar) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(threeStar); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkillInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // first + first = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // threeStar + threeStar = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.threeStar, threeStar); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SkillInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 444940528: { + if (input.isAtField(FieldNames.threeStar)) { + if (!input.trySkipNullValue()) { + threeStar = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkillInstance clone() { + return new SkillInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkillInstance parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkillInstance(), data).checkInitialized(); + } + + public static SkillInstance parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstance(), input).checkInitialized(); + } + + public static SkillInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating SkillInstance messages + */ + public static MessageFactory<SkillInstance> getFactory() { + return SkillInstanceFactory.INSTANCE; + } + + private enum SkillInstanceFactory implements MessageFactory<SkillInstance> { + INSTANCE; + + @Override + public SkillInstance create() { + return SkillInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName threeStar = FieldName.forField("ThreeStar"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code WeekBossLevel} + */ + public static final class WeekBossLevel extends ProtoMessage<WeekBossLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 3;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Time = 2;</code> + */ + private int time; + + /** + * <code>optional bool First = 4;</code> + */ + private boolean first; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private WeekBossLevel() { + } + + /** + * @return a new empty instance of {@code WeekBossLevel} + */ + public static WeekBossLevel newInstance() { + return new WeekBossLevel(); + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return this + */ + public WeekBossLevel clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 3;</code> + * @param value the buildId to set + * @return this + */ + public WeekBossLevel setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public WeekBossLevel clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public WeekBossLevel setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return this + */ + public WeekBossLevel clearTime() { + bitField0_ &= ~0x00000004; + time = 0; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return the time + */ + public int getTime() { + return time; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @param value the time to set + * @return this + */ + public WeekBossLevel setTime(final int value) { + bitField0_ |= 0x00000004; + time = value; + return this; + } + + /** + * <code>optional bool First = 4;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool First = 4;</code> + * @return this + */ + public WeekBossLevel clearFirst() { + bitField0_ &= ~0x00000008; + first = false; + return this; + } + + /** + * <code>optional bool First = 4;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 4;</code> + * @param value the first to set + * @return this + */ + public WeekBossLevel setFirst(final boolean value) { + bitField0_ |= 0x00000008; + first = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public WeekBossLevel clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public WeekBossLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public WeekBossLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public WeekBossLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public WeekBossLevel copyFrom(final WeekBossLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + time = other.time; + first = other.first; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WeekBossLevel mergeFrom(final WeekBossLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WeekBossLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + time = 0; + first = false; + nextPackage.clear(); + return this; + } + + @Override + public WeekBossLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WeekBossLevel)) { + return false; + } + WeekBossLevel other = (WeekBossLevel) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasTime() || time == other.time) + && (!hasFirst() || first == other.first) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WeekBossLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // first + first = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public WeekBossLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WeekBossLevel clone() { + return new WeekBossLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WeekBossLevel parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WeekBossLevel(), data).checkInitialized(); + } + + public static WeekBossLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossLevel(), input).checkInitialized(); + } + + public static WeekBossLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating WeekBossLevel messages + */ + public static MessageFactory<WeekBossLevel> getFactory() { + return WeekBossLevelFactory.INSTANCE; + } + + private enum WeekBossLevelFactory implements MessageFactory<WeekBossLevel> { + INSTANCE; + + @Override + public WeekBossLevel create() { + return WeekBossLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ScoreBossState} + */ + public static final class ScoreBossState extends ProtoMessage<ScoreBossState> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool New = 1;</code> + */ + private boolean new_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ScoreBossState() { + } + + /** + * @return a new empty instance of {@code ScoreBossState} + */ + public static ScoreBossState newInstance() { + return new ScoreBossState(); + } + + /** + * <code>optional bool New = 1;</code> + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool New = 1;</code> + * @return this + */ + public ScoreBossState clearNew() { + bitField0_ &= ~0x00000001; + new_ = false; + return this; + } + + /** + * <code>optional bool New = 1;</code> + * @return the new_ + */ + public boolean getNew() { + return new_; + } + + /** + * <code>optional bool New = 1;</code> + * @param value the new_ to set + * @return this + */ + public ScoreBossState setNew(final boolean value) { + bitField0_ |= 0x00000001; + new_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossState clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossState addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossState addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossState setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ScoreBossState copyFrom(final ScoreBossState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + new_ = other.new_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossState mergeFrom(final ScoreBossState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + new_ = false; + nextPackage.clear(); + return this; + } + + @Override + public ScoreBossState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossState)) { + return false; + } + ScoreBossState other = (ScoreBossState) o; + return bitField0_ == other.bitField0_ + && (!hasNew() || new_ == other.new_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // new_ + new_ = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ScoreBossState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossState clone() { + return new ScoreBossState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossState(), data).checkInitialized(); + } + + public static ScoreBossState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossState(), input).checkInitialized(); + } + + public static ScoreBossState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossState(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossState messages + */ + public static MessageFactory<ScoreBossState> getFactory() { + return ScoreBossStateFactory.INSTANCE; + } + + private enum ScoreBossStateFactory implements MessageFactory<ScoreBossState> { + INSTANCE; + + @Override + public ScoreBossState create() { + return ScoreBossState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code NPCAffinity} + */ + public static final class NPCAffinity extends ProtoMessage<NPCAffinity> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 NPCId = 1;</code> + */ + private int nPCId; + + /** + * <code>optional uint32 Affinity = 2;</code> + */ + private int affinity; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 PlotIds = 3;</code> + */ + private final RepeatedInt plotIds = RepeatedInt.newEmptyInstance(); + + private NPCAffinity() { + } + + /** + * @return a new empty instance of {@code NPCAffinity} + */ + public static NPCAffinity newInstance() { + return new NPCAffinity(); + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return whether the nPCId field is set + */ + public boolean hasNPCId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return this + */ + public NPCAffinity clearNPCId() { + bitField0_ &= ~0x00000001; + nPCId = 0; + return this; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return the nPCId + */ + public int getNPCId() { + return nPCId; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @param value the nPCId to set + * @return this + */ + public NPCAffinity setNPCId(final int value) { + bitField0_ |= 0x00000001; + nPCId = value; + return this; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return whether the affinity field is set + */ + public boolean hasAffinity() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return this + */ + public NPCAffinity clearAffinity() { + bitField0_ &= ~0x00000002; + affinity = 0; + return this; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return the affinity + */ + public int getAffinity() { + return affinity; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @param value the affinity to set + * @return this + */ + public NPCAffinity setAffinity(final int value) { + bitField0_ |= 0x00000002; + affinity = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public NPCAffinity clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public NPCAffinity addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public NPCAffinity addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public NPCAffinity setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 PlotIds = 3;</code> + * @return whether the plotIds field is set + */ + public boolean hasPlotIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 PlotIds = 3;</code> + * @return this + */ + public NPCAffinity clearPlotIds() { + bitField0_ &= ~0x00000008; + plotIds.clear(); + return this; + } + + /** + * <code>repeated uint32 PlotIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePlotIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getPlotIds() { + return plotIds; + } + + /** + * <code>repeated uint32 PlotIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutablePlotIds() { + bitField0_ |= 0x00000008; + return plotIds; + } + + /** + * <code>repeated uint32 PlotIds = 3;</code> + * @param value the plotIds to add + * @return this + */ + public NPCAffinity addPlotIds(final int value) { + bitField0_ |= 0x00000008; + plotIds.add(value); + return this; + } + + /** + * <code>repeated uint32 PlotIds = 3;</code> + * @param values the plotIds to add + * @return this + */ + public NPCAffinity addAllPlotIds(final int... values) { + bitField0_ |= 0x00000008; + plotIds.addAll(values); + return this; + } + + @Override + public NPCAffinity copyFrom(final NPCAffinity other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nPCId = other.nPCId; + affinity = other.affinity; + nextPackage.copyFrom(other.nextPackage); + plotIds.copyFrom(other.plotIds); + } + return this; + } + + @Override + public NPCAffinity mergeFrom(final NPCAffinity other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNPCId()) { + setNPCId(other.nPCId); + } + if (other.hasAffinity()) { + setAffinity(other.affinity); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasPlotIds()) { + getMutablePlotIds().addAll(other.plotIds); + } + return this; + } + + @Override + public NPCAffinity clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nPCId = 0; + affinity = 0; + nextPackage.clear(); + plotIds.clear(); + return this; + } + + @Override + public NPCAffinity clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + plotIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NPCAffinity)) { + return false; + } + NPCAffinity other = (NPCAffinity) o; + return bitField0_ == other.bitField0_ + && (!hasNPCId() || nPCId == other.nPCId) + && (!hasAffinity() || affinity == other.affinity) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasPlotIds() || plotIds.equals(other.plotIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < plotIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(plotIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * plotIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(plotIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NPCAffinity mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // nPCId + nPCId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // affinity + affinity = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // plotIds [packed=true] + input.readPackedUInt32(plotIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // plotIds [packed=false] + tag = input.readRepeatedUInt32(plotIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.nPCId, nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.affinity, affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.plotIds, plotIds); + } + output.endObject(); + } + + @Override + public NPCAffinity mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 74484668: { + if (input.isAtField(FieldNames.nPCId)) { + if (!input.trySkipNullValue()) { + nPCId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 670141768: { + if (input.isAtField(FieldNames.affinity)) { + if (!input.trySkipNullValue()) { + affinity = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1183838711: { + if (input.isAtField(FieldNames.plotIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(plotIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NPCAffinity clone() { + return new NPCAffinity().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NPCAffinity parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NPCAffinity(), data).checkInitialized(); + } + + public static NPCAffinity parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinity(), input).checkInitialized(); + } + + public static NPCAffinity parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinity(), input).checkInitialized(); + } + + /** + * @return factory for creating NPCAffinity messages + */ + public static MessageFactory<NPCAffinity> getFactory() { + return NPCAffinityFactory.INSTANCE; + } + + private enum NPCAffinityFactory implements MessageFactory<NPCAffinity> { + INSTANCE; + + @Override + public NPCAffinity create() { + return NPCAffinity.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nPCId = FieldName.forField("NPCId"); + + static final FieldName affinity = FieldName.forField("Affinity"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName plotIds = FieldName.forField("PlotIds"); + } + } + + /** + * Protobuf type {@code CharGemInstance} + */ + public static final class CharGemInstance extends ProtoMessage<CharGemInstance> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 5;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Star = 2;</code> + */ + private int star; + + /** + * <code>optional bool First = 3;</code> + */ + private boolean first; + + /** + * <code>optional bool ThreeStar = 4;</code> + */ + private boolean threeStar; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private CharGemInstance() { + } + + /** + * @return a new empty instance of {@code CharGemInstance} + */ + public static CharGemInstance newInstance() { + return new CharGemInstance(); + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return this + */ + public CharGemInstance clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @param value the buildId to set + * @return this + */ + public CharGemInstance setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public CharGemInstance clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public CharGemInstance setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return this + */ + public CharGemInstance clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 2;</code> + * @param value the star to set + * @return this + */ + public CharGemInstance setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional bool First = 3;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool First = 3;</code> + * @return this + */ + public CharGemInstance clearFirst() { + bitField0_ &= ~0x00000008; + first = false; + return this; + } + + /** + * <code>optional bool First = 3;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 3;</code> + * @param value the first to set + * @return this + */ + public CharGemInstance setFirst(final boolean value) { + bitField0_ |= 0x00000008; + first = value; + return this; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return whether the threeStar field is set + */ + public boolean hasThreeStar() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return this + */ + public CharGemInstance clearThreeStar() { + bitField0_ &= ~0x00000010; + threeStar = false; + return this; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @return the threeStar + */ + public boolean getThreeStar() { + return threeStar; + } + + /** + * <code>optional bool ThreeStar = 4;</code> + * @param value the threeStar to set + * @return this + */ + public CharGemInstance setThreeStar(final boolean value) { + bitField0_ |= 0x00000010; + threeStar = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CharGemInstance clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CharGemInstance addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CharGemInstance addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CharGemInstance setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public CharGemInstance copyFrom(final CharGemInstance other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + star = other.star; + first = other.first; + threeStar = other.threeStar; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstance mergeFrom(final CharGemInstance other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasThreeStar()) { + setThreeStar(other.threeStar); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public CharGemInstance clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + star = 0; + first = false; + threeStar = false; + nextPackage.clear(); + return this; + } + + @Override + public CharGemInstance clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemInstance)) { + return false; + } + CharGemInstance other = (CharGemInstance) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasStar() || star == other.star) + && (!hasFirst() || first == other.first) + && (!hasThreeStar() || threeStar == other.threeStar) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(threeStar); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemInstance mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // first + first = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // threeStar + threeStar = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.threeStar, threeStar); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public CharGemInstance mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 444940528: { + if (input.isAtField(FieldNames.threeStar)) { + if (!input.trySkipNullValue()) { + threeStar = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemInstance clone() { + return new CharGemInstance().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemInstance parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemInstance(), data).checkInitialized(); + } + + public static CharGemInstance parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstance(), input).checkInitialized(); + } + + public static CharGemInstance parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemInstance(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemInstance messages + */ + public static MessageFactory<CharGemInstance> getFactory() { + return CharGemInstanceFactory.INSTANCE; + } + + private enum CharGemInstanceFactory implements MessageFactory<CharGemInstance> { + INSTANCE; + + @Override + public CharGemInstance create() { + return CharGemInstance.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName threeStar = FieldName.forField("ThreeStar"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code CharGemPreset} + */ + public static final class CharGemPreset extends ProtoMessage<CharGemPreset> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string Name = 1;</code> + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + /** + * <code>repeated int32 SlotGem = 2;</code> + */ + private final RepeatedInt slotGem = RepeatedInt.newEmptyInstance(); + + private CharGemPreset() { + } + + /** + * @return a new empty instance of {@code CharGemPreset} + */ + public static CharGemPreset newInstance() { + return new CharGemPreset(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CharGemPreset clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CharGemPreset addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CharGemPreset addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CharGemPreset setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string Name = 1;</code> + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional string Name = 1;</code> + * @return this + */ + public CharGemPreset clearName() { + bitField0_ &= ~0x00000002; + name.clear(); + return this; + } + + /** + * <code>optional string Name = 1;</code> + * @return the name + */ + public java.lang.String getName() { + return name.getString(); + } + + /** + * <code>optional string Name = 1;</code> + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * <code>optional string Name = 1;</code> + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000002; + return this.name; + } + + /** + * <code>optional string Name = 1;</code> + * @param value the name to set + * @return this + */ + public CharGemPreset setName(final CharSequence value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + /** + * <code>optional string Name = 1;</code> + * @param value the name to set + * @return this + */ + public CharGemPreset setName(final Utf8String value) { + bitField0_ |= 0x00000002; + name.copyFrom(value); + return this; + } + + /** + * <code>repeated int32 SlotGem = 2;</code> + * @return whether the slotGem field is set + */ + public boolean hasSlotGem() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated int32 SlotGem = 2;</code> + * @return this + */ + public CharGemPreset clearSlotGem() { + bitField0_ &= ~0x00000004; + slotGem.clear(); + return this; + } + + /** + * <code>repeated int32 SlotGem = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSlotGem()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getSlotGem() { + return slotGem; + } + + /** + * <code>repeated int32 SlotGem = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableSlotGem() { + bitField0_ |= 0x00000004; + return slotGem; + } + + /** + * <code>repeated int32 SlotGem = 2;</code> + * @param value the slotGem to add + * @return this + */ + public CharGemPreset addSlotGem(final int value) { + bitField0_ |= 0x00000004; + slotGem.add(value); + return this; + } + + /** + * <code>repeated int32 SlotGem = 2;</code> + * @param values the slotGem to add + * @return this + */ + public CharGemPreset addAllSlotGem(final int... values) { + bitField0_ |= 0x00000004; + slotGem.addAll(values); + return this; + } + + @Override + public CharGemPreset copyFrom(final CharGemPreset other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + name.copyFrom(other.name); + slotGem.copyFrom(other.slotGem); + } + return this; + } + + @Override + public CharGemPreset mergeFrom(final CharGemPreset other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + if (other.hasSlotGem()) { + getMutableSlotGem().addAll(other.slotGem); + } + return this; + } + + @Override + public CharGemPreset clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + slotGem.clear(); + return this; + } + + @Override + public CharGemPreset clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + slotGem.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemPreset)) { + return false; + } + CharGemPreset other = (CharGemPreset) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasName() || name.equals(other.name)) + && (!hasSlotGem() || slotGem.equals(other.slotGem)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(name); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < slotGem.length(); i++) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(slotGem.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * slotGem.length()) + ProtoSink.computeRepeatedInt32SizeNoTag(slotGem); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemPreset mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // name + input.readString(name); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // slotGem [packed=true] + input.readPackedInt32(slotGem, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // slotGem [packed=false] + tag = input.readRepeatedInt32(slotGem, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeString(FieldNames.name, name); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedInt32(FieldNames.slotGem, slotGem); + } + output.endObject(); + } + + @Override + public CharGemPreset mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2420395: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -448619439: { + if (input.isAtField(FieldNames.slotGem)) { + if (!input.trySkipNullValue()) { + input.readRepeatedInt32(slotGem); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemPreset clone() { + return new CharGemPreset().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemPreset parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemPreset(), data).checkInitialized(); + } + + public static CharGemPreset parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemPreset(), input).checkInitialized(); + } + + public static CharGemPreset parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemPreset(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemPreset messages + */ + public static MessageFactory<CharGemPreset> getFactory() { + return CharGemPresetFactory.INSTANCE; + } + + private enum CharGemPresetFactory implements MessageFactory<CharGemPreset> { + INSTANCE; + + @Override + public CharGemPreset create() { + return CharGemPreset.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName name = FieldName.forField("Name"); + + static final FieldName slotGem = FieldName.forField("SlotGem"); + } + } + + /** + * Protobuf type {@code CharGemPresets} + */ + public static final class CharGemPresets extends ProtoMessage<CharGemPresets> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 InUsePresetIndex = 1;</code> + */ + private int inUsePresetIndex; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .CharGemPreset CharGemPresets = 2;</code> + */ + private final RepeatedMessage<CharGemPreset> charGemPresets = RepeatedMessage.newEmptyInstance(CharGemPreset.getFactory()); + + private CharGemPresets() { + } + + /** + * @return a new empty instance of {@code CharGemPresets} + */ + public static CharGemPresets newInstance() { + return new CharGemPresets(); + } + + /** + * <code>optional uint32 InUsePresetIndex = 1;</code> + * @return whether the inUsePresetIndex field is set + */ + public boolean hasInUsePresetIndex() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 InUsePresetIndex = 1;</code> + * @return this + */ + public CharGemPresets clearInUsePresetIndex() { + bitField0_ &= ~0x00000001; + inUsePresetIndex = 0; + return this; + } + + /** + * <code>optional uint32 InUsePresetIndex = 1;</code> + * @return the inUsePresetIndex + */ + public int getInUsePresetIndex() { + return inUsePresetIndex; + } + + /** + * <code>optional uint32 InUsePresetIndex = 1;</code> + * @param value the inUsePresetIndex to set + * @return this + */ + public CharGemPresets setInUsePresetIndex(final int value) { + bitField0_ |= 0x00000001; + inUsePresetIndex = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CharGemPresets clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CharGemPresets addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CharGemPresets addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CharGemPresets setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .CharGemPreset CharGemPresets = 2;</code> + * @return whether the charGemPresets field is set + */ + public boolean hasCharGemPresets() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .CharGemPreset CharGemPresets = 2;</code> + * @return this + */ + public CharGemPresets clearCharGemPresets() { + bitField0_ &= ~0x00000004; + charGemPresets.clear(); + return this; + } + + /** + * <code>repeated .CharGemPreset CharGemPresets = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCharGemPresets()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<CharGemPreset> getCharGemPresets() { + return charGemPresets; + } + + /** + * <code>repeated .CharGemPreset CharGemPresets = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<CharGemPreset> getMutableCharGemPresets() { + bitField0_ |= 0x00000004; + return charGemPresets; + } + + /** + * <code>repeated .CharGemPreset CharGemPresets = 2;</code> + * @param value the charGemPresets to add + * @return this + */ + public CharGemPresets addCharGemPresets(final CharGemPreset value) { + bitField0_ |= 0x00000004; + charGemPresets.add(value); + return this; + } + + /** + * <code>repeated .CharGemPreset CharGemPresets = 2;</code> + * @param values the charGemPresets to add + * @return this + */ + public CharGemPresets addAllCharGemPresets(final CharGemPreset... values) { + bitField0_ |= 0x00000004; + charGemPresets.addAll(values); + return this; + } + + @Override + public CharGemPresets copyFrom(final CharGemPresets other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + inUsePresetIndex = other.inUsePresetIndex; + nextPackage.copyFrom(other.nextPackage); + charGemPresets.copyFrom(other.charGemPresets); + } + return this; + } + + @Override + public CharGemPresets mergeFrom(final CharGemPresets other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasInUsePresetIndex()) { + setInUsePresetIndex(other.inUsePresetIndex); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCharGemPresets()) { + getMutableCharGemPresets().addAll(other.charGemPresets); + } + return this; + } + + @Override + public CharGemPresets clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + inUsePresetIndex = 0; + nextPackage.clear(); + charGemPresets.clear(); + return this; + } + + @Override + public CharGemPresets clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + charGemPresets.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemPresets)) { + return false; + } + CharGemPresets other = (CharGemPresets) o; + return bitField0_ == other.bitField0_ + && (!hasInUsePresetIndex() || inUsePresetIndex == other.inUsePresetIndex) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCharGemPresets() || charGemPresets.equals(other.charGemPresets)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(inUsePresetIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < charGemPresets.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(charGemPresets.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(inUsePresetIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * charGemPresets.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(charGemPresets); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemPresets mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // inUsePresetIndex + inUsePresetIndex = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // charGemPresets + tag = input.readRepeatedMessage(charGemPresets, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.inUsePresetIndex, inUsePresetIndex); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.charGemPresets, charGemPresets); + } + output.endObject(); + } + + @Override + public CharGemPresets mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1036581329: { + if (input.isAtField(FieldNames.inUsePresetIndex)) { + if (!input.trySkipNullValue()) { + inUsePresetIndex = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82576187: { + if (input.isAtField(FieldNames.charGemPresets)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(charGemPresets); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemPresets clone() { + return new CharGemPresets().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemPresets parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemPresets(), data).checkInitialized(); + } + + public static CharGemPresets parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemPresets(), input).checkInitialized(); + } + + public static CharGemPresets parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemPresets(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemPresets messages + */ + public static MessageFactory<CharGemPresets> getFactory() { + return CharGemPresetsFactory.INSTANCE; + } + + private enum CharGemPresetsFactory implements MessageFactory<CharGemPresets> { + INSTANCE; + + @Override + public CharGemPresets create() { + return CharGemPresets.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName inUsePresetIndex = FieldName.forField("InUsePresetIndex"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName charGemPresets = FieldName.forField("CharGemPresets"); + } + } + + /** + * Protobuf type {@code CharGem} + */ + public static final class CharGem extends ProtoMessage<CharGem> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool Lock = 1;</code> + */ + private boolean lock; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Attributes = 2;</code> + */ + private final RepeatedInt attributes = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 AlterAttributes = 3;</code> + */ + private final RepeatedInt alterAttributes = RepeatedInt.newEmptyInstance(); + + private CharGem() { + } + + /** + * @return a new empty instance of {@code CharGem} + */ + public static CharGem newInstance() { + return new CharGem(); + } + + /** + * <code>optional bool Lock = 1;</code> + * @return whether the lock field is set + */ + public boolean hasLock() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool Lock = 1;</code> + * @return this + */ + public CharGem clearLock() { + bitField0_ &= ~0x00000001; + lock = false; + return this; + } + + /** + * <code>optional bool Lock = 1;</code> + * @return the lock + */ + public boolean getLock() { + return lock; + } + + /** + * <code>optional bool Lock = 1;</code> + * @param value the lock to set + * @return this + */ + public CharGem setLock(final boolean value) { + bitField0_ |= 0x00000001; + lock = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CharGem clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CharGem addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CharGem addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CharGem setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Attributes = 2;</code> + * @return whether the attributes field is set + */ + public boolean hasAttributes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Attributes = 2;</code> + * @return this + */ + public CharGem clearAttributes() { + bitField0_ &= ~0x00000004; + attributes.clear(); + return this; + } + + /** + * <code>repeated uint32 Attributes = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAttributes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getAttributes() { + return attributes; + } + + /** + * <code>repeated uint32 Attributes = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableAttributes() { + bitField0_ |= 0x00000004; + return attributes; + } + + /** + * <code>repeated uint32 Attributes = 2;</code> + * @param value the attributes to add + * @return this + */ + public CharGem addAttributes(final int value) { + bitField0_ |= 0x00000004; + attributes.add(value); + return this; + } + + /** + * <code>repeated uint32 Attributes = 2;</code> + * @param values the attributes to add + * @return this + */ + public CharGem addAllAttributes(final int... values) { + bitField0_ |= 0x00000004; + attributes.addAll(values); + return this; + } + + /** + * <code>repeated uint32 AlterAttributes = 3;</code> + * @return whether the alterAttributes field is set + */ + public boolean hasAlterAttributes() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 AlterAttributes = 3;</code> + * @return this + */ + public CharGem clearAlterAttributes() { + bitField0_ &= ~0x00000008; + alterAttributes.clear(); + return this; + } + + /** + * <code>repeated uint32 AlterAttributes = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAlterAttributes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getAlterAttributes() { + return alterAttributes; + } + + /** + * <code>repeated uint32 AlterAttributes = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableAlterAttributes() { + bitField0_ |= 0x00000008; + return alterAttributes; + } + + /** + * <code>repeated uint32 AlterAttributes = 3;</code> + * @param value the alterAttributes to add + * @return this + */ + public CharGem addAlterAttributes(final int value) { + bitField0_ |= 0x00000008; + alterAttributes.add(value); + return this; + } + + /** + * <code>repeated uint32 AlterAttributes = 3;</code> + * @param values the alterAttributes to add + * @return this + */ + public CharGem addAllAlterAttributes(final int... values) { + bitField0_ |= 0x00000008; + alterAttributes.addAll(values); + return this; + } + + @Override + public CharGem copyFrom(final CharGem other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lock = other.lock; + nextPackage.copyFrom(other.nextPackage); + attributes.copyFrom(other.attributes); + alterAttributes.copyFrom(other.alterAttributes); + } + return this; + } + + @Override + public CharGem mergeFrom(final CharGem other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLock()) { + setLock(other.lock); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAttributes()) { + getMutableAttributes().addAll(other.attributes); + } + if (other.hasAlterAttributes()) { + getMutableAlterAttributes().addAll(other.alterAttributes); + } + return this; + } + + @Override + public CharGem clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lock = false; + nextPackage.clear(); + attributes.clear(); + alterAttributes.clear(); + return this; + } + + @Override + public CharGem clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + attributes.clear(); + alterAttributes.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGem)) { + return false; + } + CharGem other = (CharGem) o; + return bitField0_ == other.bitField0_ + && (!hasLock() || lock == other.lock) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAttributes() || attributes.equals(other.attributes)) + && (!hasAlterAttributes() || alterAttributes.equals(other.alterAttributes)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(lock); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < attributes.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(attributes.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < alterAttributes.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(alterAttributes.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * attributes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(attributes); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * alterAttributes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(alterAttributes); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGem mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // lock + lock = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // attributes [packed=true] + input.readPackedUInt32(attributes, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // alterAttributes [packed=true] + input.readPackedUInt32(alterAttributes, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // attributes [packed=false] + tag = input.readRepeatedUInt32(attributes, tag); + bitField0_ |= 0x00000004; + break; + } + case 24: { + // alterAttributes [packed=false] + tag = input.readRepeatedUInt32(alterAttributes, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.lock, lock); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.attributes, attributes); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.alterAttributes, alterAttributes); + } + output.endObject(); + } + + @Override + public CharGem mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2373963: { + if (input.isAtField(FieldNames.lock)) { + if (!input.trySkipNullValue()) { + lock = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1895856777: { + if (input.isAtField(FieldNames.attributes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(attributes); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 328423917: { + if (input.isAtField(FieldNames.alterAttributes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(alterAttributes); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGem clone() { + return new CharGem().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGem parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGem(), data).checkInitialized(); + } + + public static CharGem parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGem(), input).checkInitialized(); + } + + public static CharGem parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGem(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGem messages + */ + public static MessageFactory<CharGem> getFactory() { + return CharGemFactory.INSTANCE; + } + + private enum CharGemFactory implements MessageFactory<CharGem> { + INSTANCE; + + @Override + public CharGem create() { + return CharGem.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lock = FieldName.forField("Lock"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName attributes = FieldName.forField("Attributes"); + + static final FieldName alterAttributes = FieldName.forField("AlterAttributes"); + } + } + + /** + * Protobuf type {@code CharGemSlot} + */ + public static final class CharGemSlot extends ProtoMessage<CharGemSlot> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .CharGem AlterGems = 2;</code> + */ + private final RepeatedMessage<CharGem> alterGems = RepeatedMessage.newEmptyInstance(CharGem.getFactory()); + + private CharGemSlot() { + } + + /** + * @return a new empty instance of {@code CharGemSlot} + */ + public static CharGemSlot newInstance() { + return new CharGemSlot(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public CharGemSlot clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public CharGemSlot setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public CharGemSlot clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public CharGemSlot addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public CharGemSlot addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public CharGemSlot setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .CharGem AlterGems = 2;</code> + * @return whether the alterGems field is set + */ + public boolean hasAlterGems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .CharGem AlterGems = 2;</code> + * @return this + */ + public CharGemSlot clearAlterGems() { + bitField0_ &= ~0x00000004; + alterGems.clear(); + return this; + } + + /** + * <code>repeated .CharGem AlterGems = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAlterGems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<CharGem> getAlterGems() { + return alterGems; + } + + /** + * <code>repeated .CharGem AlterGems = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<CharGem> getMutableAlterGems() { + bitField0_ |= 0x00000004; + return alterGems; + } + + /** + * <code>repeated .CharGem AlterGems = 2;</code> + * @param value the alterGems to add + * @return this + */ + public CharGemSlot addAlterGems(final CharGem value) { + bitField0_ |= 0x00000004; + alterGems.add(value); + return this; + } + + /** + * <code>repeated .CharGem AlterGems = 2;</code> + * @param values the alterGems to add + * @return this + */ + public CharGemSlot addAllAlterGems(final CharGem... values) { + bitField0_ |= 0x00000004; + alterGems.addAll(values); + return this; + } + + @Override + public CharGemSlot copyFrom(final CharGemSlot other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + alterGems.copyFrom(other.alterGems); + } + return this; + } + + @Override + public CharGemSlot mergeFrom(final CharGemSlot other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAlterGems()) { + getMutableAlterGems().addAll(other.alterGems); + } + return this; + } + + @Override + public CharGemSlot clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + alterGems.clear(); + return this; + } + + @Override + public CharGemSlot clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + alterGems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof CharGemSlot)) { + return false; + } + CharGemSlot other = (CharGemSlot) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAlterGems() || alterGems.equals(other.alterGems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < alterGems.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(alterGems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * alterGems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(alterGems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public CharGemSlot mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // alterGems + tag = input.readRepeatedMessage(alterGems, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.alterGems, alterGems); + } + output.endObject(); + } + + @Override + public CharGemSlot mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 594785306: { + if (input.isAtField(FieldNames.alterGems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(alterGems); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public CharGemSlot clone() { + return new CharGemSlot().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static CharGemSlot parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new CharGemSlot(), data).checkInitialized(); + } + + public static CharGemSlot parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemSlot(), input).checkInitialized(); + } + + public static CharGemSlot parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new CharGemSlot(), input).checkInitialized(); + } + + /** + * @return factory for creating CharGemSlot messages + */ + public static MessageFactory<CharGemSlot> getFactory() { + return CharGemSlotFactory.INSTANCE; + } + + private enum CharGemSlotFactory implements MessageFactory<CharGemSlot> { + INSTANCE; + + @Override + public CharGemSlot create() { + return CharGemSlot.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName alterGems = FieldName.forField("AlterGems"); + } + } + + /** + * Protobuf type {@code ActivityTask} + */ + public static final class ActivityTask extends ProtoMessage<ActivityTask> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .Quests ActivityTasks = 1;</code> + */ + private final Quests activityTasks = Quests.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 GroupIds = 2;</code> + */ + private final RepeatedInt groupIds = RepeatedInt.newEmptyInstance(); + + private ActivityTask() { + } + + /** + * @return a new empty instance of {@code ActivityTask} + */ + public static ActivityTask newInstance() { + return new ActivityTask(); + } + + /** + * <code>optional .Quests ActivityTasks = 1;</code> + * @return whether the activityTasks field is set + */ + public boolean hasActivityTasks() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .Quests ActivityTasks = 1;</code> + * @return this + */ + public ActivityTask clearActivityTasks() { + bitField0_ &= ~0x00000001; + activityTasks.clear(); + return this; + } + + /** + * <code>optional .Quests ActivityTasks = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableActivityTasks()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Quests getActivityTasks() { + return activityTasks; + } + + /** + * <code>optional .Quests ActivityTasks = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Quests getMutableActivityTasks() { + bitField0_ |= 0x00000001; + return activityTasks; + } + + /** + * <code>optional .Quests ActivityTasks = 1;</code> + * @param value the activityTasks to set + * @return this + */ + public ActivityTask setActivityTasks(final Quests value) { + bitField0_ |= 0x00000001; + activityTasks.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityTask clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityTask addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityTask addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityTask setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 GroupIds = 2;</code> + * @return whether the groupIds field is set + */ + public boolean hasGroupIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 GroupIds = 2;</code> + * @return this + */ + public ActivityTask clearGroupIds() { + bitField0_ &= ~0x00000004; + groupIds.clear(); + return this; + } + + /** + * <code>repeated uint32 GroupIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableGroupIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getGroupIds() { + return groupIds; + } + + /** + * <code>repeated uint32 GroupIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableGroupIds() { + bitField0_ |= 0x00000004; + return groupIds; + } + + /** + * <code>repeated uint32 GroupIds = 2;</code> + * @param value the groupIds to add + * @return this + */ + public ActivityTask addGroupIds(final int value) { + bitField0_ |= 0x00000004; + groupIds.add(value); + return this; + } + + /** + * <code>repeated uint32 GroupIds = 2;</code> + * @param values the groupIds to add + * @return this + */ + public ActivityTask addAllGroupIds(final int... values) { + bitField0_ |= 0x00000004; + groupIds.addAll(values); + return this; + } + + @Override + public ActivityTask copyFrom(final ActivityTask other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + activityTasks.copyFrom(other.activityTasks); + nextPackage.copyFrom(other.nextPackage); + groupIds.copyFrom(other.groupIds); + } + return this; + } + + @Override + public ActivityTask mergeFrom(final ActivityTask other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasActivityTasks()) { + getMutableActivityTasks().mergeFrom(other.activityTasks); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasGroupIds()) { + getMutableGroupIds().addAll(other.groupIds); + } + return this; + } + + @Override + public ActivityTask clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityTasks.clear(); + nextPackage.clear(); + groupIds.clear(); + return this; + } + + @Override + public ActivityTask clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + activityTasks.clearQuick(); + nextPackage.clear(); + groupIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityTask)) { + return false; + } + ActivityTask other = (ActivityTask) o; + return bitField0_ == other.bitField0_ + && (!hasActivityTasks() || activityTasks.equals(other.activityTasks)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasGroupIds() || groupIds.equals(other.groupIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(activityTasks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < groupIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(groupIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(activityTasks); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * groupIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(groupIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityTask mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // activityTasks + input.readMessage(activityTasks); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // groupIds [packed=true] + input.readPackedUInt32(groupIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // groupIds [packed=false] + tag = input.readRepeatedUInt32(groupIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.activityTasks, activityTasks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.groupIds, groupIds); + } + output.endObject(); + } + + @Override + public ActivityTask mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -247899745: { + if (input.isAtField(FieldNames.activityTasks)) { + if (!input.trySkipNullValue()) { + input.readMessage(activityTasks); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 570984409: { + if (input.isAtField(FieldNames.groupIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(groupIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityTask clone() { + return new ActivityTask().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityTask parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityTask(), data).checkInitialized(); + } + + public static ActivityTask parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTask(), input).checkInitialized(); + } + + public static ActivityTask parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityTask(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityTask messages + */ + public static MessageFactory<ActivityTask> getFactory() { + return ActivityTaskFactory.INSTANCE; + } + + private enum ActivityTaskFactory implements MessageFactory<ActivityTask> { + INSTANCE; + + @Override + public ActivityTask create() { + return ActivityTask.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName activityTasks = FieldName.forField("ActivityTasks"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName groupIds = FieldName.forField("GroupIds"); + } + } + + /** + * Protobuf type {@code ActivityShop} + */ + public static final class ActivityShop extends ProtoMessage<ActivityShop> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + */ + private final RepeatedMessage<ResidentShop> shops = RepeatedMessage.newEmptyInstance(ResidentShop.getFactory()); + + private ActivityShop() { + } + + /** + * @return a new empty instance of {@code ActivityShop} + */ + public static ActivityShop newInstance() { + return new ActivityShop(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityShop clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityShop addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityShop addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityShop setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @return whether the shops field is set + */ + public boolean hasShops() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @return this + */ + public ActivityShop clearShops() { + bitField0_ &= ~0x00000002; + shops.clear(); + return this; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShops()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ResidentShop> getShops() { + return shops; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ResidentShop> getMutableShops() { + bitField0_ |= 0x00000002; + return shops; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @param value the shops to add + * @return this + */ + public ActivityShop addShops(final ResidentShop value) { + bitField0_ |= 0x00000002; + shops.add(value); + return this; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @param values the shops to add + * @return this + */ + public ActivityShop addAllShops(final ResidentShop... values) { + bitField0_ |= 0x00000002; + shops.addAll(values); + return this; + } + + @Override + public ActivityShop copyFrom(final ActivityShop other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + shops.copyFrom(other.shops); + } + return this; + } + + @Override + public ActivityShop mergeFrom(final ActivityShop other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShops()) { + getMutableShops().addAll(other.shops); + } + return this; + } + + @Override + public ActivityShop clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + shops.clear(); + return this; + } + + @Override + public ActivityShop clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + shops.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityShop)) { + return false; + } + ActivityShop other = (ActivityShop) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShops() || shops.equals(other.shops)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < shops.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(shops.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * shops.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(shops); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityShop mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // shops + tag = input.readRepeatedMessage(shops, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.shops, shops); + } + output.endObject(); + } + + @Override + public ActivityShop mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79860765: { + if (input.isAtField(FieldNames.shops)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(shops); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityShop clone() { + return new ActivityShop().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityShop parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityShop(), data).checkInitialized(); + } + + public static ActivityShop parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityShop(), input).checkInitialized(); + } + + public static ActivityShop parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityShop(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityShop messages + */ + public static MessageFactory<ActivityShop> getFactory() { + return ActivityShopFactory.INSTANCE; + } + + private enum ActivityShopFactory implements MessageFactory<ActivityShop> { + INSTANCE; + + @Override + public ActivityShop create() { + return ActivityShop.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName shops = FieldName.forField("Shops"); + } + } + + /** + * Protobuf type {@code TutorialLevel} + */ + public static final class TutorialLevel extends ProtoMessage<TutorialLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 LevelId = 1;</code> + */ + private int levelId; + + /** + * <code>optional bool Passed = 2;</code> + */ + private boolean passed; + + /** + * <code>optional bool RewardReceived = 3;</code> + */ + private boolean rewardReceived; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TutorialLevel() { + } + + /** + * @return a new empty instance of {@code TutorialLevel} + */ + public static TutorialLevel newInstance() { + return new TutorialLevel(); + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return this + */ + public TutorialLevel clearLevelId() { + bitField0_ &= ~0x00000001; + levelId = 0; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @param value the levelId to set + * @return this + */ + public TutorialLevel setLevelId(final int value) { + bitField0_ |= 0x00000001; + levelId = value; + return this; + } + + /** + * <code>optional bool Passed = 2;</code> + * @return whether the passed field is set + */ + public boolean hasPassed() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Passed = 2;</code> + * @return this + */ + public TutorialLevel clearPassed() { + bitField0_ &= ~0x00000002; + passed = false; + return this; + } + + /** + * <code>optional bool Passed = 2;</code> + * @return the passed + */ + public boolean getPassed() { + return passed; + } + + /** + * <code>optional bool Passed = 2;</code> + * @param value the passed to set + * @return this + */ + public TutorialLevel setPassed(final boolean value) { + bitField0_ |= 0x00000002; + passed = value; + return this; + } + + /** + * <code>optional bool RewardReceived = 3;</code> + * @return whether the rewardReceived field is set + */ + public boolean hasRewardReceived() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool RewardReceived = 3;</code> + * @return this + */ + public TutorialLevel clearRewardReceived() { + bitField0_ &= ~0x00000004; + rewardReceived = false; + return this; + } + + /** + * <code>optional bool RewardReceived = 3;</code> + * @return the rewardReceived + */ + public boolean getRewardReceived() { + return rewardReceived; + } + + /** + * <code>optional bool RewardReceived = 3;</code> + * @param value the rewardReceived to set + * @return this + */ + public TutorialLevel setRewardReceived(final boolean value) { + bitField0_ |= 0x00000004; + rewardReceived = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TutorialLevel clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TutorialLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TutorialLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TutorialLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TutorialLevel copyFrom(final TutorialLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + levelId = other.levelId; + passed = other.passed; + rewardReceived = other.rewardReceived; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TutorialLevel mergeFrom(final TutorialLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasPassed()) { + setPassed(other.passed); + } + if (other.hasRewardReceived()) { + setRewardReceived(other.rewardReceived); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TutorialLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + levelId = 0; + passed = false; + rewardReceived = false; + nextPackage.clear(); + return this; + } + + @Override + public TutorialLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TutorialLevel)) { + return false; + } + TutorialLevel other = (TutorialLevel) o; + return bitField0_ == other.bitField0_ + && (!hasLevelId() || levelId == other.levelId) + && (!hasPassed() || passed == other.passed) + && (!hasRewardReceived() || rewardReceived == other.rewardReceived) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(passed); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(rewardReceived); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TutorialLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // passed + passed = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // rewardReceived + rewardReceived = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.passed, passed); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.rewardReceived, rewardReceived); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TutorialLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1911513968: { + if (input.isAtField(FieldNames.passed)) { + if (!input.trySkipNullValue()) { + passed = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -133313968: { + if (input.isAtField(FieldNames.rewardReceived)) { + if (!input.trySkipNullValue()) { + rewardReceived = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TutorialLevel clone() { + return new TutorialLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TutorialLevel parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TutorialLevel(), data).checkInitialized(); + } + + public static TutorialLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TutorialLevel(), input).checkInitialized(); + } + + public static TutorialLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TutorialLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating TutorialLevel messages + */ + public static MessageFactory<TutorialLevel> getFactory() { + return TutorialLevelFactory.INSTANCE; + } + + private enum TutorialLevelFactory implements MessageFactory<TutorialLevel> { + INSTANCE; + + @Override + public TutorialLevel create() { + return TutorialLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName passed = FieldName.forField("Passed"); + + static final FieldName rewardReceived = FieldName.forField("RewardReceived"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PublicJointDrill.java b/src/generated/main/emu/nebula/proto/PublicJointDrill.java new file mode 100644 index 0000000..da2e05d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PublicJointDrill.java @@ -0,0 +1,4344 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class PublicJointDrill { + /** + * Protobuf type {@code ActivityJointDrill} + */ + public static final class ActivityJointDrill extends ProtoMessage<ActivityJointDrill> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .JointDrillMeta Meta = 1;</code> + */ + private final JointDrillMeta meta = JointDrillMeta.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .JointDrillLevel PassedLevels = 2;</code> + */ + private final RepeatedMessage<JointDrillLevel> passedLevels = RepeatedMessage.newEmptyInstance(JointDrillLevel.getFactory()); + + /** + * <code>repeated .ActivityQuest Quests = 3;</code> + */ + private final RepeatedMessage<Public.ActivityQuest> quests = RepeatedMessage.newEmptyInstance(Public.ActivityQuest.getFactory()); + + private ActivityJointDrill() { + } + + /** + * @return a new empty instance of {@code ActivityJointDrill} + */ + public static ActivityJointDrill newInstance() { + return new ActivityJointDrill(); + } + + /** + * <code>optional .JointDrillMeta Meta = 1;</code> + * @return whether the meta field is set + */ + public boolean hasMeta() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .JointDrillMeta Meta = 1;</code> + * @return this + */ + public ActivityJointDrill clearMeta() { + bitField0_ &= ~0x00000001; + meta.clear(); + return this; + } + + /** + * <code>optional .JointDrillMeta Meta = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMeta()} if you want to modify it. + * + * @return internal storage object for reading + */ + public JointDrillMeta getMeta() { + return meta; + } + + /** + * <code>optional .JointDrillMeta Meta = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public JointDrillMeta getMutableMeta() { + bitField0_ |= 0x00000001; + return meta; + } + + /** + * <code>optional .JointDrillMeta Meta = 1;</code> + * @param value the meta to set + * @return this + */ + public ActivityJointDrill setMeta(final JointDrillMeta value) { + bitField0_ |= 0x00000001; + meta.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActivityJointDrill clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActivityJointDrill addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActivityJointDrill addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActivityJointDrill setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .JointDrillLevel PassedLevels = 2;</code> + * @return whether the passedLevels field is set + */ + public boolean hasPassedLevels() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .JointDrillLevel PassedLevels = 2;</code> + * @return this + */ + public ActivityJointDrill clearPassedLevels() { + bitField0_ &= ~0x00000004; + passedLevels.clear(); + return this; + } + + /** + * <code>repeated .JointDrillLevel PassedLevels = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePassedLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<JointDrillLevel> getPassedLevels() { + return passedLevels; + } + + /** + * <code>repeated .JointDrillLevel PassedLevels = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<JointDrillLevel> getMutablePassedLevels() { + bitField0_ |= 0x00000004; + return passedLevels; + } + + /** + * <code>repeated .JointDrillLevel PassedLevels = 2;</code> + * @param value the passedLevels to add + * @return this + */ + public ActivityJointDrill addPassedLevels(final JointDrillLevel value) { + bitField0_ |= 0x00000004; + passedLevels.add(value); + return this; + } + + /** + * <code>repeated .JointDrillLevel PassedLevels = 2;</code> + * @param values the passedLevels to add + * @return this + */ + public ActivityJointDrill addAllPassedLevels(final JointDrillLevel... values) { + bitField0_ |= 0x00000004; + passedLevels.addAll(values); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 3;</code> + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .ActivityQuest Quests = 3;</code> + * @return this + */ + public ActivityJointDrill clearQuests() { + bitField0_ &= ~0x00000008; + quests.clear(); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ActivityQuest> getQuests() { + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ActivityQuest> getMutableQuests() { + bitField0_ |= 0x00000008; + return quests; + } + + /** + * <code>repeated .ActivityQuest Quests = 3;</code> + * @param value the quests to add + * @return this + */ + public ActivityJointDrill addQuests(final Public.ActivityQuest value) { + bitField0_ |= 0x00000008; + quests.add(value); + return this; + } + + /** + * <code>repeated .ActivityQuest Quests = 3;</code> + * @param values the quests to add + * @return this + */ + public ActivityJointDrill addAllQuests(final Public.ActivityQuest... values) { + bitField0_ |= 0x00000008; + quests.addAll(values); + return this; + } + + @Override + public ActivityJointDrill copyFrom(final ActivityJointDrill other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + meta.copyFrom(other.meta); + nextPackage.copyFrom(other.nextPackage); + passedLevels.copyFrom(other.passedLevels); + quests.copyFrom(other.quests); + } + return this; + } + + @Override + public ActivityJointDrill mergeFrom(final ActivityJointDrill other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMeta()) { + getMutableMeta().mergeFrom(other.meta); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasPassedLevels()) { + getMutablePassedLevels().addAll(other.passedLevels); + } + if (other.hasQuests()) { + getMutableQuests().addAll(other.quests); + } + return this; + } + + @Override + public ActivityJointDrill clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + meta.clear(); + nextPackage.clear(); + passedLevels.clear(); + quests.clear(); + return this; + } + + @Override + public ActivityJointDrill clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + meta.clearQuick(); + nextPackage.clear(); + passedLevels.clearQuick(); + quests.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActivityJointDrill)) { + return false; + } + ActivityJointDrill other = (ActivityJointDrill) o; + return bitField0_ == other.bitField0_ + && (!hasMeta() || meta.equals(other.meta)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasPassedLevels() || passedLevels.equals(other.passedLevels)) + && (!hasQuests() || quests.equals(other.quests)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(meta); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < passedLevels.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(passedLevels.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < quests.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(quests.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(meta); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * passedLevels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(passedLevels); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * quests.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(quests); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActivityJointDrill mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // meta + input.readMessage(meta); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // passedLevels + tag = input.readRepeatedMessage(passedLevels, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // quests + tag = input.readRepeatedMessage(quests, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.meta, meta); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.passedLevels, passedLevels); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.quests, quests); + } + output.endObject(); + } + + @Override + public ActivityJointDrill mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2394661: { + if (input.isAtField(FieldNames.meta)) { + if (!input.trySkipNullValue()) { + input.readMessage(meta); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1461957151: { + if (input.isAtField(FieldNames.passedLevels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(passedLevels); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(quests); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActivityJointDrill clone() { + return new ActivityJointDrill().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActivityJointDrill parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActivityJointDrill(), data).checkInitialized(); + } + + public static ActivityJointDrill parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityJointDrill(), input).checkInitialized(); + } + + public static ActivityJointDrill parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActivityJointDrill(), input).checkInitialized(); + } + + /** + * @return factory for creating ActivityJointDrill messages + */ + public static MessageFactory<ActivityJointDrill> getFactory() { + return ActivityJointDrillFactory.INSTANCE; + } + + private enum ActivityJointDrillFactory implements MessageFactory<ActivityJointDrill> { + INSTANCE; + + @Override + public ActivityJointDrill create() { + return ActivityJointDrill.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName meta = FieldName.forField("Meta"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName passedLevels = FieldName.forField("PassedLevels"); + + static final FieldName quests = FieldName.forField("Quests"); + } + } + + /** + * Protobuf type {@code JointDrillMeta} + */ + public static final class JointDrillMeta extends ProtoMessage<JointDrillMeta> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 StartTime = 3;</code> + */ + private long startTime; + + /** + * <code>optional uint32 LevelId = 1;</code> + */ + private int levelId; + + /** + * <code>optional uint32 Floor = 2;</code> + */ + private int floor; + + /** + * <code>optional uint32 BossHP = 4;</code> + */ + private int bossHP; + + /** + * <code>optional uint32 BossHPMax = 5;</code> + */ + private int bossHPMax; + + /** + * <code>optional uint32 TotalScore = 9;</code> + */ + private int totalScore; + + /** + * <code>optional bool Simulate = 8;</code> + */ + private boolean simulate; + + /** + * <code>optional bytes Record = 6;</code> + */ + private final RepeatedByte record = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .JointDrillTeam Teams = 7;</code> + */ + private final RepeatedMessage<JointDrillTeam> teams = RepeatedMessage.newEmptyInstance(JointDrillTeam.getFactory()); + + private JointDrillMeta() { + } + + /** + * @return a new empty instance of {@code JointDrillMeta} + */ + public static JointDrillMeta newInstance() { + return new JointDrillMeta(); + } + + /** + * <code>optional int64 StartTime = 3;</code> + * @return whether the startTime field is set + */ + public boolean hasStartTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 StartTime = 3;</code> + * @return this + */ + public JointDrillMeta clearStartTime() { + bitField0_ &= ~0x00000001; + startTime = 0L; + return this; + } + + /** + * <code>optional int64 StartTime = 3;</code> + * @return the startTime + */ + public long getStartTime() { + return startTime; + } + + /** + * <code>optional int64 StartTime = 3;</code> + * @param value the startTime to set + * @return this + */ + public JointDrillMeta setStartTime(final long value) { + bitField0_ |= 0x00000001; + startTime = value; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return this + */ + public JointDrillMeta clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @param value the levelId to set + * @return this + */ + public JointDrillMeta setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * <code>optional uint32 Floor = 2;</code> + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Floor = 2;</code> + * @return this + */ + public JointDrillMeta clearFloor() { + bitField0_ &= ~0x00000004; + floor = 0; + return this; + } + + /** + * <code>optional uint32 Floor = 2;</code> + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * <code>optional uint32 Floor = 2;</code> + * @param value the floor to set + * @return this + */ + public JointDrillMeta setFloor(final int value) { + bitField0_ |= 0x00000004; + floor = value; + return this; + } + + /** + * <code>optional uint32 BossHP = 4;</code> + * @return whether the bossHP field is set + */ + public boolean hasBossHP() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 BossHP = 4;</code> + * @return this + */ + public JointDrillMeta clearBossHP() { + bitField0_ &= ~0x00000008; + bossHP = 0; + return this; + } + + /** + * <code>optional uint32 BossHP = 4;</code> + * @return the bossHP + */ + public int getBossHP() { + return bossHP; + } + + /** + * <code>optional uint32 BossHP = 4;</code> + * @param value the bossHP to set + * @return this + */ + public JointDrillMeta setBossHP(final int value) { + bitField0_ |= 0x00000008; + bossHP = value; + return this; + } + + /** + * <code>optional uint32 BossHPMax = 5;</code> + * @return whether the bossHPMax field is set + */ + public boolean hasBossHPMax() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 BossHPMax = 5;</code> + * @return this + */ + public JointDrillMeta clearBossHPMax() { + bitField0_ &= ~0x00000010; + bossHPMax = 0; + return this; + } + + /** + * <code>optional uint32 BossHPMax = 5;</code> + * @return the bossHPMax + */ + public int getBossHPMax() { + return bossHPMax; + } + + /** + * <code>optional uint32 BossHPMax = 5;</code> + * @param value the bossHPMax to set + * @return this + */ + public JointDrillMeta setBossHPMax(final int value) { + bitField0_ |= 0x00000010; + bossHPMax = value; + return this; + } + + /** + * <code>optional uint32 TotalScore = 9;</code> + * @return whether the totalScore field is set + */ + public boolean hasTotalScore() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 TotalScore = 9;</code> + * @return this + */ + public JointDrillMeta clearTotalScore() { + bitField0_ &= ~0x00000020; + totalScore = 0; + return this; + } + + /** + * <code>optional uint32 TotalScore = 9;</code> + * @return the totalScore + */ + public int getTotalScore() { + return totalScore; + } + + /** + * <code>optional uint32 TotalScore = 9;</code> + * @param value the totalScore to set + * @return this + */ + public JointDrillMeta setTotalScore(final int value) { + bitField0_ |= 0x00000020; + totalScore = value; + return this; + } + + /** + * <code>optional bool Simulate = 8;</code> + * @return whether the simulate field is set + */ + public boolean hasSimulate() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional bool Simulate = 8;</code> + * @return this + */ + public JointDrillMeta clearSimulate() { + bitField0_ &= ~0x00000040; + simulate = false; + return this; + } + + /** + * <code>optional bool Simulate = 8;</code> + * @return the simulate + */ + public boolean getSimulate() { + return simulate; + } + + /** + * <code>optional bool Simulate = 8;</code> + * @param value the simulate to set + * @return this + */ + public JointDrillMeta setSimulate(final boolean value) { + bitField0_ |= 0x00000040; + simulate = value; + return this; + } + + /** + * <code>optional bytes Record = 6;</code> + * @return whether the record field is set + */ + public boolean hasRecord() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional bytes Record = 6;</code> + * @return this + */ + public JointDrillMeta clearRecord() { + bitField0_ &= ~0x00000080; + record.clear(); + return this; + } + + /** + * <code>optional bytes Record = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecord()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getRecord() { + return record; + } + + /** + * <code>optional bytes Record = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableRecord() { + bitField0_ |= 0x00000080; + return record; + } + + /** + * <code>optional bytes Record = 6;</code> + * @param value the record to add + * @return this + */ + public JointDrillMeta addRecord(final byte value) { + bitField0_ |= 0x00000080; + record.add(value); + return this; + } + + /** + * <code>optional bytes Record = 6;</code> + * @param values the record to add + * @return this + */ + public JointDrillMeta addAllRecord(final byte... values) { + bitField0_ |= 0x00000080; + record.addAll(values); + return this; + } + + /** + * <code>optional bytes Record = 6;</code> + * @param values the record to set + * @return this + */ + public JointDrillMeta setRecord(final byte... values) { + bitField0_ |= 0x00000080; + record.copyFrom(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public JointDrillMeta clearNextPackage() { + bitField0_ &= ~0x00000100; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000100; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public JointDrillMeta addNextPackage(final byte value) { + bitField0_ |= 0x00000100; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public JointDrillMeta addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public JointDrillMeta setNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .JointDrillTeam Teams = 7;</code> + * @return whether the teams field is set + */ + public boolean hasTeams() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>repeated .JointDrillTeam Teams = 7;</code> + * @return this + */ + public JointDrillMeta clearTeams() { + bitField0_ &= ~0x00000200; + teams.clear(); + return this; + } + + /** + * <code>repeated .JointDrillTeam Teams = 7;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTeams()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<JointDrillTeam> getTeams() { + return teams; + } + + /** + * <code>repeated .JointDrillTeam Teams = 7;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<JointDrillTeam> getMutableTeams() { + bitField0_ |= 0x00000200; + return teams; + } + + /** + * <code>repeated .JointDrillTeam Teams = 7;</code> + * @param value the teams to add + * @return this + */ + public JointDrillMeta addTeams(final JointDrillTeam value) { + bitField0_ |= 0x00000200; + teams.add(value); + return this; + } + + /** + * <code>repeated .JointDrillTeam Teams = 7;</code> + * @param values the teams to add + * @return this + */ + public JointDrillMeta addAllTeams(final JointDrillTeam... values) { + bitField0_ |= 0x00000200; + teams.addAll(values); + return this; + } + + @Override + public JointDrillMeta copyFrom(final JointDrillMeta other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + startTime = other.startTime; + levelId = other.levelId; + floor = other.floor; + bossHP = other.bossHP; + bossHPMax = other.bossHPMax; + totalScore = other.totalScore; + simulate = other.simulate; + record.copyFrom(other.record); + nextPackage.copyFrom(other.nextPackage); + teams.copyFrom(other.teams); + } + return this; + } + + @Override + public JointDrillMeta mergeFrom(final JointDrillMeta other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStartTime()) { + setStartTime(other.startTime); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasBossHP()) { + setBossHP(other.bossHP); + } + if (other.hasBossHPMax()) { + setBossHPMax(other.bossHPMax); + } + if (other.hasTotalScore()) { + setTotalScore(other.totalScore); + } + if (other.hasSimulate()) { + setSimulate(other.simulate); + } + if (other.hasRecord()) { + getMutableRecord().copyFrom(other.record); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasTeams()) { + getMutableTeams().addAll(other.teams); + } + return this; + } + + @Override + public JointDrillMeta clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + startTime = 0L; + levelId = 0; + floor = 0; + bossHP = 0; + bossHPMax = 0; + totalScore = 0; + simulate = false; + record.clear(); + nextPackage.clear(); + teams.clear(); + return this; + } + + @Override + public JointDrillMeta clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + record.clear(); + nextPackage.clear(); + teams.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillMeta)) { + return false; + } + JointDrillMeta other = (JointDrillMeta) o; + return bitField0_ == other.bitField0_ + && (!hasStartTime() || startTime == other.startTime) + && (!hasLevelId() || levelId == other.levelId) + && (!hasFloor() || floor == other.floor) + && (!hasBossHP() || bossHP == other.bossHP) + && (!hasBossHPMax() || bossHPMax == other.bossHPMax) + && (!hasTotalScore() || totalScore == other.totalScore) + && (!hasSimulate() || simulate == other.simulate) + && (!hasRecord() || record.equals(other.record)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasTeams() || teams.equals(other.teams)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(bossHP); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(bossHPMax); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(totalScore); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 64); + output.writeBoolNoTag(simulate); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 50); + output.writeBytesNoTag(record); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + for (int i = 0; i < teams.length(); i++) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(teams.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHP); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossHPMax); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(totalScore); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(record); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + size += (1 * teams.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(teams); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillMeta mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // startTime + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // bossHP + bossHP = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // bossHPMax + bossHPMax = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // totalScore + totalScore = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // simulate + simulate = input.readBool(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // record + input.readBytes(record); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // teams + tag = input.readRepeatedMessage(teams, tag); + bitField0_ |= 0x00000200; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.startTime, startTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.bossHP, bossHP); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.bossHPMax, bossHPMax); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.totalScore, totalScore); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBool(FieldNames.simulate, simulate); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBytes(FieldNames.record, record); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRepeatedMessage(FieldNames.teams, teams); + } + output.endObject(); + } + + @Override + public JointDrillMeta mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -125326801: { + if (input.isAtField(FieldNames.startTime)) { + if (!input.trySkipNullValue()) { + startTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1995573589: { + if (input.isAtField(FieldNames.bossHP)) { + if (!input.trySkipNullValue()) { + bossHP = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -804444209: { + if (input.isAtField(FieldNames.bossHPMax)) { + if (!input.trySkipNullValue()) { + bossHPMax = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1276492238: { + if (input.isAtField(FieldNames.totalScore)) { + if (!input.trySkipNullValue()) { + totalScore = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 554919492: { + if (input.isAtField(FieldNames.simulate)) { + if (!input.trySkipNullValue()) { + simulate = input.readBool(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851041679: { + if (input.isAtField(FieldNames.record)) { + if (!input.trySkipNullValue()) { + input.readBytes(record); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80681366: { + if (input.isAtField(FieldNames.teams)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(teams); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillMeta clone() { + return new JointDrillMeta().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillMeta parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillMeta(), data).checkInitialized(); + } + + public static JointDrillMeta parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillMeta(), input).checkInitialized(); + } + + public static JointDrillMeta parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillMeta(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillMeta messages + */ + public static MessageFactory<JointDrillMeta> getFactory() { + return JointDrillMetaFactory.INSTANCE; + } + + private enum JointDrillMetaFactory implements MessageFactory<JointDrillMeta> { + INSTANCE; + + @Override + public JointDrillMeta create() { + return JointDrillMeta.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName startTime = FieldName.forField("StartTime"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName bossHP = FieldName.forField("BossHP"); + + static final FieldName bossHPMax = FieldName.forField("BossHPMax"); + + static final FieldName totalScore = FieldName.forField("TotalScore"); + + static final FieldName simulate = FieldName.forField("Simulate"); + + static final FieldName record = FieldName.forField("Record"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName teams = FieldName.forField("Teams"); + } + } + + /** + * Protobuf type {@code JointDrillTeam} + */ + public static final class JointDrillTeam extends ProtoMessage<JointDrillTeam> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 5;</code> + */ + private long buildId; + + /** + * <code>optional uint32 BuildScore = 2;</code> + */ + private int buildScore; + + /** + * <code>optional uint32 Damage = 3;</code> + */ + private int damage; + + /** + * <code>optional uint32 Time = 4;</code> + */ + private int time; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .JointDrillChar Chars = 1;</code> + */ + private final RepeatedMessage<JointDrillChar> chars = RepeatedMessage.newEmptyInstance(JointDrillChar.getFactory()); + + private JointDrillTeam() { + } + + /** + * @return a new empty instance of {@code JointDrillTeam} + */ + public static JointDrillTeam newInstance() { + return new JointDrillTeam(); + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return this + */ + public JointDrillTeam clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 5;</code> + * @param value the buildId to set + * @return this + */ + public JointDrillTeam setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 BuildScore = 2;</code> + * @return whether the buildScore field is set + */ + public boolean hasBuildScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 BuildScore = 2;</code> + * @return this + */ + public JointDrillTeam clearBuildScore() { + bitField0_ &= ~0x00000002; + buildScore = 0; + return this; + } + + /** + * <code>optional uint32 BuildScore = 2;</code> + * @return the buildScore + */ + public int getBuildScore() { + return buildScore; + } + + /** + * <code>optional uint32 BuildScore = 2;</code> + * @param value the buildScore to set + * @return this + */ + public JointDrillTeam setBuildScore(final int value) { + bitField0_ |= 0x00000002; + buildScore = value; + return this; + } + + /** + * <code>optional uint32 Damage = 3;</code> + * @return whether the damage field is set + */ + public boolean hasDamage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Damage = 3;</code> + * @return this + */ + public JointDrillTeam clearDamage() { + bitField0_ &= ~0x00000004; + damage = 0; + return this; + } + + /** + * <code>optional uint32 Damage = 3;</code> + * @return the damage + */ + public int getDamage() { + return damage; + } + + /** + * <code>optional uint32 Damage = 3;</code> + * @param value the damage to set + * @return this + */ + public JointDrillTeam setDamage(final int value) { + bitField0_ |= 0x00000004; + damage = value; + return this; + } + + /** + * <code>optional uint32 Time = 4;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Time = 4;</code> + * @return this + */ + public JointDrillTeam clearTime() { + bitField0_ &= ~0x00000008; + time = 0; + return this; + } + + /** + * <code>optional uint32 Time = 4;</code> + * @return the time + */ + public int getTime() { + return time; + } + + /** + * <code>optional uint32 Time = 4;</code> + * @param value the time to set + * @return this + */ + public JointDrillTeam setTime(final int value) { + bitField0_ |= 0x00000008; + time = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public JointDrillTeam clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public JointDrillTeam addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public JointDrillTeam addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public JointDrillTeam setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .JointDrillChar Chars = 1;</code> + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated .JointDrillChar Chars = 1;</code> + * @return this + */ + public JointDrillTeam clearChars() { + bitField0_ &= ~0x00000020; + chars.clear(); + return this; + } + + /** + * <code>repeated .JointDrillChar Chars = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<JointDrillChar> getChars() { + return chars; + } + + /** + * <code>repeated .JointDrillChar Chars = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<JointDrillChar> getMutableChars() { + bitField0_ |= 0x00000020; + return chars; + } + + /** + * <code>repeated .JointDrillChar Chars = 1;</code> + * @param value the chars to add + * @return this + */ + public JointDrillTeam addChars(final JointDrillChar value) { + bitField0_ |= 0x00000020; + chars.add(value); + return this; + } + + /** + * <code>repeated .JointDrillChar Chars = 1;</code> + * @param values the chars to add + * @return this + */ + public JointDrillTeam addAllChars(final JointDrillChar... values) { + bitField0_ |= 0x00000020; + chars.addAll(values); + return this; + } + + @Override + public JointDrillTeam copyFrom(final JointDrillTeam other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + buildScore = other.buildScore; + damage = other.damage; + time = other.time; + nextPackage.copyFrom(other.nextPackage); + chars.copyFrom(other.chars); + } + return this; + } + + @Override + public JointDrillTeam mergeFrom(final JointDrillTeam other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasBuildScore()) { + setBuildScore(other.buildScore); + } + if (other.hasDamage()) { + setDamage(other.damage); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + return this; + } + + @Override + public JointDrillTeam clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + buildScore = 0; + damage = 0; + time = 0; + nextPackage.clear(); + chars.clear(); + return this; + } + + @Override + public JointDrillTeam clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chars.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillTeam)) { + return false; + } + JointDrillTeam other = (JointDrillTeam) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasBuildScore() || buildScore == other.buildScore) + && (!hasDamage() || damage == other.damage) + && (!hasTime() || time == other.time) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasChars() || chars.equals(other.chars)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(buildScore); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(chars.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(buildScore); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(damage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillTeam mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // buildScore + buildScore = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // damage + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.buildScore, buildScore); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.damage, damage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + output.endObject(); + } + + @Override + public JointDrillTeam mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1511471332: { + if (input.isAtField(FieldNames.buildScore)) { + if (!input.trySkipNullValue()) { + buildScore = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2039707535: { + if (input.isAtField(FieldNames.damage)) { + if (!input.trySkipNullValue()) { + damage = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillTeam clone() { + return new JointDrillTeam().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillTeam parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillTeam(), data).checkInitialized(); + } + + public static JointDrillTeam parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillTeam(), input).checkInitialized(); + } + + public static JointDrillTeam parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillTeam(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillTeam messages + */ + public static MessageFactory<JointDrillTeam> getFactory() { + return JointDrillTeamFactory.INSTANCE; + } + + private enum JointDrillTeamFactory implements MessageFactory<JointDrillTeam> { + INSTANCE; + + @Override + public JointDrillTeam create() { + return JointDrillTeam.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName buildScore = FieldName.forField("BuildScore"); + + static final FieldName damage = FieldName.forField("Damage"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName chars = FieldName.forField("Chars"); + } + } + + /** + * Protobuf type {@code JointDrillChar} + */ + public static final class JointDrillChar extends ProtoMessage<JointDrillChar> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional uint32 CharLevel = 2;</code> + */ + private int charLevel; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillChar() { + } + + /** + * @return a new empty instance of {@code JointDrillChar} + */ + public static JointDrillChar newInstance() { + return new JointDrillChar(); + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public JointDrillChar clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public JointDrillChar setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * <code>optional uint32 CharLevel = 2;</code> + * @return whether the charLevel field is set + */ + public boolean hasCharLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 CharLevel = 2;</code> + * @return this + */ + public JointDrillChar clearCharLevel() { + bitField0_ &= ~0x00000002; + charLevel = 0; + return this; + } + + /** + * <code>optional uint32 CharLevel = 2;</code> + * @return the charLevel + */ + public int getCharLevel() { + return charLevel; + } + + /** + * <code>optional uint32 CharLevel = 2;</code> + * @param value the charLevel to set + * @return this + */ + public JointDrillChar setCharLevel(final int value) { + bitField0_ |= 0x00000002; + charLevel = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public JointDrillChar clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public JointDrillChar addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public JointDrillChar addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public JointDrillChar setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillChar copyFrom(final JointDrillChar other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + charLevel = other.charLevel; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillChar mergeFrom(final JointDrillChar other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasCharLevel()) { + setCharLevel(other.charLevel); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillChar clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + charLevel = 0; + nextPackage.clear(); + return this; + } + + @Override + public JointDrillChar clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillChar)) { + return false; + } + JointDrillChar other = (JointDrillChar) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasCharLevel() || charLevel == other.charLevel) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(charLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillChar mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // charLevel + charLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.charLevel, charLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillChar mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -746136146: { + if (input.isAtField(FieldNames.charLevel)) { + if (!input.trySkipNullValue()) { + charLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillChar clone() { + return new JointDrillChar().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillChar parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillChar(), data).checkInitialized(); + } + + public static JointDrillChar parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillChar(), input).checkInitialized(); + } + + public static JointDrillChar parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillChar(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillChar messages + */ + public static MessageFactory<JointDrillChar> getFactory() { + return JointDrillCharFactory.INSTANCE; + } + + private enum JointDrillCharFactory implements MessageFactory<JointDrillChar> { + INSTANCE; + + @Override + public JointDrillChar create() { + return JointDrillChar.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName charLevel = FieldName.forField("CharLevel"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code JointDrillLevel} + */ + public static final class JointDrillLevel extends ProtoMessage<JointDrillLevel> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 LevelId = 1;</code> + */ + private int levelId; + + /** + * <code>optional uint32 Score = 2;</code> + */ + private int score; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private JointDrillLevel() { + } + + /** + * @return a new empty instance of {@code JointDrillLevel} + */ + public static JointDrillLevel newInstance() { + return new JointDrillLevel(); + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return this + */ + public JointDrillLevel clearLevelId() { + bitField0_ &= ~0x00000001; + levelId = 0; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @param value the levelId to set + * @return this + */ + public JointDrillLevel setLevelId(final int value) { + bitField0_ |= 0x00000001; + levelId = value; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return this + */ + public JointDrillLevel clearScore() { + bitField0_ &= ~0x00000002; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @param value the score to set + * @return this + */ + public JointDrillLevel setScore(final int value) { + bitField0_ |= 0x00000002; + score = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public JointDrillLevel clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public JointDrillLevel addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public JointDrillLevel addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public JointDrillLevel setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public JointDrillLevel copyFrom(final JointDrillLevel other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + levelId = other.levelId; + score = other.score; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillLevel mergeFrom(final JointDrillLevel other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public JointDrillLevel clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + levelId = 0; + score = 0; + nextPackage.clear(); + return this; + } + + @Override + public JointDrillLevel clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillLevel)) { + return false; + } + JointDrillLevel other = (JointDrillLevel) o; + return bitField0_ == other.bitField0_ + && (!hasLevelId() || levelId == other.levelId) + && (!hasScore() || score == other.score) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillLevel mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public JointDrillLevel mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillLevel clone() { + return new JointDrillLevel().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillLevel parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillLevel(), data).checkInitialized(); + } + + public static JointDrillLevel parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillLevel(), input).checkInitialized(); + } + + public static JointDrillLevel parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillLevel(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillLevel messages + */ + public static MessageFactory<JointDrillLevel> getFactory() { + return JointDrillLevelFactory.INSTANCE; + } + + private enum JointDrillLevelFactory implements MessageFactory<JointDrillLevel> { + INSTANCE; + + @Override + public JointDrillLevel create() { + return JointDrillLevel.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code JointDrillSettle} + */ + public static final class JointDrillSettle extends ProtoMessage<JointDrillSettle> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 FightScore = 3;</code> + */ + private int fightScore; + + /** + * <code>optional uint32 HpScore = 4;</code> + */ + private int hpScore; + + /** + * <code>optional uint32 DifficultyScore = 5;</code> + */ + private int difficultyScore; + + /** + * <code>optional uint32 Old = 13;</code> + */ + private int old; + + /** + * <code>optional uint32 New = 14;</code> + */ + private int new_; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string Token = 15;</code> + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Items = 2;</code> + */ + private final RepeatedMessage<Public.ItemTpl> items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private JointDrillSettle() { + } + + /** + * @return a new empty instance of {@code JointDrillSettle} + */ + public static JointDrillSettle newInstance() { + return new JointDrillSettle(); + } + + /** + * <code>optional uint32 FightScore = 3;</code> + * @return whether the fightScore field is set + */ + public boolean hasFightScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 FightScore = 3;</code> + * @return this + */ + public JointDrillSettle clearFightScore() { + bitField0_ &= ~0x00000001; + fightScore = 0; + return this; + } + + /** + * <code>optional uint32 FightScore = 3;</code> + * @return the fightScore + */ + public int getFightScore() { + return fightScore; + } + + /** + * <code>optional uint32 FightScore = 3;</code> + * @param value the fightScore to set + * @return this + */ + public JointDrillSettle setFightScore(final int value) { + bitField0_ |= 0x00000001; + fightScore = value; + return this; + } + + /** + * <code>optional uint32 HpScore = 4;</code> + * @return whether the hpScore field is set + */ + public boolean hasHpScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 HpScore = 4;</code> + * @return this + */ + public JointDrillSettle clearHpScore() { + bitField0_ &= ~0x00000002; + hpScore = 0; + return this; + } + + /** + * <code>optional uint32 HpScore = 4;</code> + * @return the hpScore + */ + public int getHpScore() { + return hpScore; + } + + /** + * <code>optional uint32 HpScore = 4;</code> + * @param value the hpScore to set + * @return this + */ + public JointDrillSettle setHpScore(final int value) { + bitField0_ |= 0x00000002; + hpScore = value; + return this; + } + + /** + * <code>optional uint32 DifficultyScore = 5;</code> + * @return whether the difficultyScore field is set + */ + public boolean hasDifficultyScore() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 DifficultyScore = 5;</code> + * @return this + */ + public JointDrillSettle clearDifficultyScore() { + bitField0_ &= ~0x00000004; + difficultyScore = 0; + return this; + } + + /** + * <code>optional uint32 DifficultyScore = 5;</code> + * @return the difficultyScore + */ + public int getDifficultyScore() { + return difficultyScore; + } + + /** + * <code>optional uint32 DifficultyScore = 5;</code> + * @param value the difficultyScore to set + * @return this + */ + public JointDrillSettle setDifficultyScore(final int value) { + bitField0_ |= 0x00000004; + difficultyScore = value; + return this; + } + + /** + * <code>optional uint32 Old = 13;</code> + * @return whether the old field is set + */ + public boolean hasOld() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Old = 13;</code> + * @return this + */ + public JointDrillSettle clearOld() { + bitField0_ &= ~0x00000008; + old = 0; + return this; + } + + /** + * <code>optional uint32 Old = 13;</code> + * @return the old + */ + public int getOld() { + return old; + } + + /** + * <code>optional uint32 Old = 13;</code> + * @param value the old to set + * @return this + */ + public JointDrillSettle setOld(final int value) { + bitField0_ |= 0x00000008; + old = value; + return this; + } + + /** + * <code>optional uint32 New = 14;</code> + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 New = 14;</code> + * @return this + */ + public JointDrillSettle clearNew() { + bitField0_ &= ~0x00000010; + new_ = 0; + return this; + } + + /** + * <code>optional uint32 New = 14;</code> + * @return the new_ + */ + public int getNew() { + return new_; + } + + /** + * <code>optional uint32 New = 14;</code> + * @param value the new_ to set + * @return this + */ + public JointDrillSettle setNew(final int value) { + bitField0_ |= 0x00000010; + new_ = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public JointDrillSettle clearChange() { + bitField0_ &= ~0x00000020; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000020; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public JointDrillSettle setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000020; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public JointDrillSettle clearNextPackage() { + bitField0_ &= ~0x00000040; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000040; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public JointDrillSettle addNextPackage(final byte value) { + bitField0_ |= 0x00000040; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public JointDrillSettle addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public JointDrillSettle setNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string Token = 15;</code> + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional string Token = 15;</code> + * @return this + */ + public JointDrillSettle clearToken() { + bitField0_ &= ~0x00000080; + token.clear(); + return this; + } + + /** + * <code>optional string Token = 15;</code> + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * <code>optional string Token = 15;</code> + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * <code>optional string Token = 15;</code> + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000080; + return this.token; + } + + /** + * <code>optional string Token = 15;</code> + * @param value the token to set + * @return this + */ + public JointDrillSettle setToken(final CharSequence value) { + bitField0_ |= 0x00000080; + token.copyFrom(value); + return this; + } + + /** + * <code>optional string Token = 15;</code> + * @param value the token to set + * @return this + */ + public JointDrillSettle setToken(final Utf8String value) { + bitField0_ |= 0x00000080; + token.copyFrom(value); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @return this + */ + public JointDrillSettle clearItems() { + bitField0_ &= ~0x00000100; + items.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getItems() { + return items; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableItems() { + bitField0_ |= 0x00000100; + return items; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @param value the items to add + * @return this + */ + public JointDrillSettle addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000100; + items.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @param values the items to add + * @return this + */ + public JointDrillSettle addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000100; + items.addAll(values); + return this; + } + + @Override + public JointDrillSettle copyFrom(final JointDrillSettle other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + fightScore = other.fightScore; + hpScore = other.hpScore; + difficultyScore = other.difficultyScore; + old = other.old; + new_ = other.new_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + token.copyFrom(other.token); + items.copyFrom(other.items); + } + return this; + } + + @Override + public JointDrillSettle mergeFrom(final JointDrillSettle other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFightScore()) { + setFightScore(other.fightScore); + } + if (other.hasHpScore()) { + setHpScore(other.hpScore); + } + if (other.hasDifficultyScore()) { + setDifficultyScore(other.difficultyScore); + } + if (other.hasOld()) { + setOld(other.old); + } + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public JointDrillSettle clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + fightScore = 0; + hpScore = 0; + difficultyScore = 0; + old = 0; + new_ = 0; + change.clear(); + nextPackage.clear(); + token.clear(); + items.clear(); + return this; + } + + @Override + public JointDrillSettle clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + token.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof JointDrillSettle)) { + return false; + } + JointDrillSettle other = (JointDrillSettle) o; + return bitField0_ == other.bitField0_ + && (!hasFightScore() || fightScore == other.fightScore) + && (!hasHpScore() || hpScore == other.hpScore) + && (!hasDifficultyScore() || difficultyScore == other.difficultyScore) + && (!hasOld() || old == other.old) + && (!hasNew() || new_ == other.new_) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasToken() || token.equals(other.token)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(fightScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(hpScore); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(difficultyScore); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 104); + output.writeUInt32NoTag(old); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(new_); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 122); + output.writeStringNoTag(token); + } + if ((bitField0_ & 0x00000100) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(fightScore); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(hpScore); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(difficultyScore); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(old); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(new_); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + if ((bitField0_ & 0x00000100) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public JointDrillSettle mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // fightScore + fightScore = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // hpScore + hpScore = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // difficultyScore + difficultyScore = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 104) { + break; + } + } + case 104: { + // old + old = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // new_ + new_ = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // token + input.readString(token); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000100; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.fightScore, fightScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.hpScore, hpScore); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.difficultyScore, difficultyScore); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.old, old); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeString(FieldNames.token, token); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public JointDrillSettle mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1342567294: { + if (input.isAtField(FieldNames.fightScore)) { + if (!input.trySkipNullValue()) { + fightScore = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1533034934: { + if (input.isAtField(FieldNames.hpScore)) { + if (!input.trySkipNullValue()) { + hpScore = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2025608329: { + if (input.isAtField(FieldNames.difficultyScore)) { + if (!input.trySkipNullValue()) { + difficultyScore = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79367: { + if (input.isAtField(FieldNames.old)) { + if (!input.trySkipNullValue()) { + old = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80988633: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public JointDrillSettle clone() { + return new JointDrillSettle().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static JointDrillSettle parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new JointDrillSettle(), data).checkInitialized(); + } + + public static JointDrillSettle parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSettle(), input).checkInitialized(); + } + + public static JointDrillSettle parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new JointDrillSettle(), input).checkInitialized(); + } + + /** + * @return factory for creating JointDrillSettle messages + */ + public static MessageFactory<JointDrillSettle> getFactory() { + return JointDrillSettleFactory.INSTANCE; + } + + private enum JointDrillSettleFactory implements MessageFactory<JointDrillSettle> { + INSTANCE; + + @Override + public JointDrillSettle create() { + return JointDrillSettle.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName fightScore = FieldName.forField("FightScore"); + + static final FieldName hpScore = FieldName.forField("HpScore"); + + static final FieldName difficultyScore = FieldName.forField("DifficultyScore"); + + static final FieldName old = FieldName.forField("Old"); + + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName token = FieldName.forField("Token"); + + static final FieldName items = FieldName.forField("Items"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PublicMining.java b/src/generated/main/emu/nebula/proto/PublicMining.java new file mode 100644 index 0000000..4c7840b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PublicMining.java @@ -0,0 +1,4187 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoEnum; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class PublicMining { + /** + * Protobuf enum {@code MiningGridType} + */ + public enum MiningGridType implements ProtoEnum<MiningGridType> { + /** + * <code>Destroyed = 0;</code> + */ + Destroyed("Destroyed", 0), + + /** + * <code>Fragile = 1;</code> + */ + Fragile("Fragile", 1), + + /** + * <code>Normal = 2;</code> + */ + Normal("Normal", 2), + + /** + * <code>Hard = 3;</code> + */ + Hard("Hard", 3), + + /** + * <code>SuperHard = 4;</code> + */ + SuperHard("SuperHard", 4), + + /** + * <code>TypeCounter = 5;</code> + */ + TypeCounter("TypeCounter", 5); + + /** + * <code>Destroyed = 0;</code> + */ + public static final int Destroyed_VALUE = 0; + + /** + * <code>Fragile = 1;</code> + */ + public static final int Fragile_VALUE = 1; + + /** + * <code>Normal = 2;</code> + */ + public static final int Normal_VALUE = 2; + + /** + * <code>Hard = 3;</code> + */ + public static final int Hard_VALUE = 3; + + /** + * <code>SuperHard = 4;</code> + */ + public static final int SuperHard_VALUE = 4; + + /** + * <code>TypeCounter = 5;</code> + */ + public static final int TypeCounter_VALUE = 5; + + private final String name; + + private final int number; + + private MiningGridType(String name, int number) { + this.name = name; + this.number = number; + } + + /** + * @return the string representation of enum entry + */ + @Override + public String getName() { + return name; + } + + /** + * @return the numeric wire value of this enum entry + */ + @Override + public int getNumber() { + return number; + } + + /** + * @return a converter that maps between this enum's numeric and text representations + */ + public static ProtoEnum.EnumConverter<MiningGridType> converter() { + return MiningGridTypeConverter.INSTANCE; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value, or null if unknown. + */ + public static MiningGridType forNumber(int value) { + return MiningGridTypeConverter.INSTANCE.forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @param other Fallback value in case the value is not known. + * @return The enum associated with the given numeric wire value, or the fallback value if unknown. + */ + public static MiningGridType forNumberOr(int number, MiningGridType other) { + MiningGridType value = forNumber(number); + return value == null ? other : value; + } + + enum MiningGridTypeConverter implements ProtoEnum.EnumConverter<MiningGridType> { + INSTANCE; + + private static final MiningGridType[] lookup = new MiningGridType[6]; + + static { + lookup[0] = Destroyed; + lookup[1] = Fragile; + lookup[2] = Normal; + lookup[3] = Hard; + lookup[4] = SuperHard; + lookup[5] = TypeCounter; + } + + @Override + public final MiningGridType forNumber(final int value) { + if (value >= 0 && value < lookup.length) { + return lookup[value]; + } + return null; + } + + @Override + public final MiningGridType forName(final CharSequence value) { + switch (value.length()) { + case 4: { + if (ProtoUtil.isEqual("Hard", value)) { + return Hard; + } + break; + } + case 6: { + if (ProtoUtil.isEqual("Normal", value)) { + return Normal; + } + break; + } + case 7: { + if (ProtoUtil.isEqual("Fragile", value)) { + return Fragile; + } + break; + } + case 9: { + if (ProtoUtil.isEqual("Destroyed", value)) { + return Destroyed; + } + if (ProtoUtil.isEqual("SuperHard", value)) { + return SuperHard; + } + break; + } + case 11: { + if (ProtoUtil.isEqual("TypeCounter", value)) { + return TypeCounter; + } + break; + } + } + return null; + } + } + } + + /** + * Protobuf type {@code MiningTreasure} + */ + public static final class MiningTreasure extends ProtoMessage<MiningTreasure> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bool Received = 3;</code> + */ + private boolean received; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 PosIndex = 2;</code> + */ + private final RepeatedInt posIndex = RepeatedInt.newEmptyInstance(); + + private MiningTreasure() { + } + + /** + * @return a new empty instance of {@code MiningTreasure} + */ + public static MiningTreasure newInstance() { + return new MiningTreasure(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public MiningTreasure clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public MiningTreasure setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional bool Received = 3;</code> + * @return whether the received field is set + */ + public boolean hasReceived() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Received = 3;</code> + * @return this + */ + public MiningTreasure clearReceived() { + bitField0_ &= ~0x00000002; + received = false; + return this; + } + + /** + * <code>optional bool Received = 3;</code> + * @return the received + */ + public boolean getReceived() { + return received; + } + + /** + * <code>optional bool Received = 3;</code> + * @param value the received to set + * @return this + */ + public MiningTreasure setReceived(final boolean value) { + bitField0_ |= 0x00000002; + received = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MiningTreasure clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MiningTreasure addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MiningTreasure addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MiningTreasure setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 PosIndex = 2;</code> + * @return whether the posIndex field is set + */ + public boolean hasPosIndex() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 PosIndex = 2;</code> + * @return this + */ + public MiningTreasure clearPosIndex() { + bitField0_ &= ~0x00000008; + posIndex.clear(); + return this; + } + + /** + * <code>repeated uint32 PosIndex = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePosIndex()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getPosIndex() { + return posIndex; + } + + /** + * <code>repeated uint32 PosIndex = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutablePosIndex() { + bitField0_ |= 0x00000008; + return posIndex; + } + + /** + * <code>repeated uint32 PosIndex = 2;</code> + * @param value the posIndex to add + * @return this + */ + public MiningTreasure addPosIndex(final int value) { + bitField0_ |= 0x00000008; + posIndex.add(value); + return this; + } + + /** + * <code>repeated uint32 PosIndex = 2;</code> + * @param values the posIndex to add + * @return this + */ + public MiningTreasure addAllPosIndex(final int... values) { + bitField0_ |= 0x00000008; + posIndex.addAll(values); + return this; + } + + @Override + public MiningTreasure copyFrom(final MiningTreasure other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + received = other.received; + nextPackage.copyFrom(other.nextPackage); + posIndex.copyFrom(other.posIndex); + } + return this; + } + + @Override + public MiningTreasure mergeFrom(final MiningTreasure other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasReceived()) { + setReceived(other.received); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasPosIndex()) { + getMutablePosIndex().addAll(other.posIndex); + } + return this; + } + + @Override + public MiningTreasure clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + received = false; + nextPackage.clear(); + posIndex.clear(); + return this; + } + + @Override + public MiningTreasure clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + posIndex.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MiningTreasure)) { + return false; + } + MiningTreasure other = (MiningTreasure) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasReceived() || received == other.received) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasPosIndex() || posIndex.equals(other.posIndex)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(received); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < posIndex.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(posIndex.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * posIndex.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(posIndex); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MiningTreasure mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // received + received = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // posIndex [packed=true] + input.readPackedUInt32(posIndex, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // posIndex [packed=false] + tag = input.readRepeatedUInt32(posIndex, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.received, received); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.posIndex, posIndex); + } + output.endObject(); + } + + @Override + public MiningTreasure mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -744075775: { + if (input.isAtField(FieldNames.received)) { + if (!input.trySkipNullValue()) { + received = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 782712574: { + if (input.isAtField(FieldNames.posIndex)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(posIndex); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MiningTreasure clone() { + return new MiningTreasure().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MiningTreasure parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MiningTreasure(), data).checkInitialized(); + } + + public static MiningTreasure parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningTreasure(), input).checkInitialized(); + } + + public static MiningTreasure parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningTreasure(), input).checkInitialized(); + } + + /** + * @return factory for creating MiningTreasure messages + */ + public static MessageFactory<MiningTreasure> getFactory() { + return MiningTreasureFactory.INSTANCE; + } + + private enum MiningTreasureFactory implements MessageFactory<MiningTreasure> { + INSTANCE; + + @Override + public MiningTreasure create() { + return MiningTreasure.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName received = FieldName.forField("Received"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName posIndex = FieldName.forField("PosIndex"); + } + } + + /** + * Protobuf type {@code MiningGrid} + */ + public static final class MiningGrid extends ProtoMessage<MiningGrid> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 PosIndex = 2;</code> + */ + private int posIndex; + + /** + * <code>optional .MiningGridType GridType = 3;</code> + */ + private int gridType; + + /** + * <code>optional bool Marked = 4;</code> + */ + private boolean marked; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private MiningGrid() { + } + + /** + * @return a new empty instance of {@code MiningGrid} + */ + public static MiningGrid newInstance() { + return new MiningGrid(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public MiningGrid clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public MiningGrid setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 PosIndex = 2;</code> + * @return whether the posIndex field is set + */ + public boolean hasPosIndex() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 PosIndex = 2;</code> + * @return this + */ + public MiningGrid clearPosIndex() { + bitField0_ &= ~0x00000002; + posIndex = 0; + return this; + } + + /** + * <code>optional uint32 PosIndex = 2;</code> + * @return the posIndex + */ + public int getPosIndex() { + return posIndex; + } + + /** + * <code>optional uint32 PosIndex = 2;</code> + * @param value the posIndex to set + * @return this + */ + public MiningGrid setPosIndex(final int value) { + bitField0_ |= 0x00000002; + posIndex = value; + return this; + } + + /** + * <code>optional .MiningGridType GridType = 3;</code> + * @return whether the gridType field is set + */ + public boolean hasGridType() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .MiningGridType GridType = 3;</code> + * @return this + */ + public MiningGrid clearGridType() { + bitField0_ &= ~0x00000004; + gridType = 0; + return this; + } + + /** + * <code>optional .MiningGridType GridType = 3;</code> + * @return the gridType + */ + public MiningGridType getGridType() { + return MiningGridType.forNumber(gridType); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link MiningGrid#getGridType()}.getNumber(). + * + * @return numeric wire representation + */ + public int getGridTypeValue() { + return gridType; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link MiningGridType}. Setting an invalid value + * can cause {@link MiningGrid#getGridType()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public MiningGrid setGridTypeValue(final int value) { + bitField0_ |= 0x00000004; + gridType = value; + return this; + } + + /** + * <code>optional .MiningGridType GridType = 3;</code> + * @param value the gridType to set + * @return this + */ + public MiningGrid setGridType(final MiningGridType value) { + bitField0_ |= 0x00000004; + gridType = value.getNumber(); + return this; + } + + /** + * <code>optional bool Marked = 4;</code> + * @return whether the marked field is set + */ + public boolean hasMarked() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool Marked = 4;</code> + * @return this + */ + public MiningGrid clearMarked() { + bitField0_ &= ~0x00000008; + marked = false; + return this; + } + + /** + * <code>optional bool Marked = 4;</code> + * @return the marked + */ + public boolean getMarked() { + return marked; + } + + /** + * <code>optional bool Marked = 4;</code> + * @param value the marked to set + * @return this + */ + public MiningGrid setMarked(final boolean value) { + bitField0_ |= 0x00000008; + marked = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MiningGrid clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MiningGrid addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MiningGrid addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MiningGrid setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public MiningGrid copyFrom(final MiningGrid other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + posIndex = other.posIndex; + gridType = other.gridType; + marked = other.marked; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MiningGrid mergeFrom(final MiningGrid other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasPosIndex()) { + setPosIndex(other.posIndex); + } + if (other.hasGridType()) { + setGridTypeValue(other.gridType); + } + if (other.hasMarked()) { + setMarked(other.marked); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MiningGrid clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + posIndex = 0; + gridType = 0; + marked = false; + nextPackage.clear(); + return this; + } + + @Override + public MiningGrid clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MiningGrid)) { + return false; + } + MiningGrid other = (MiningGrid) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasPosIndex() || posIndex == other.posIndex) + && (!hasGridType() || gridType == other.gridType) + && (!hasMarked() || marked == other.marked) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(posIndex); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeEnumNoTag(gridType); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(marked); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(posIndex); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(gridType); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MiningGrid mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // posIndex + posIndex = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // gridType + final int value = input.readInt32(); + if (MiningGridType.forNumber(value) != null) { + gridType = value; + bitField0_ |= 0x00000004; + } + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // marked + marked = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.posIndex, posIndex); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeEnum(FieldNames.gridType, gridType, MiningGridType.converter()); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.marked, marked); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public MiningGrid mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 782712574: { + if (input.isAtField(FieldNames.posIndex)) { + if (!input.trySkipNullValue()) { + posIndex = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 382721984: { + if (input.isAtField(FieldNames.gridType)) { + if (!input.trySkipNullValue()) { + final MiningGridType value = input.readEnum(MiningGridType.converter()); + if (value != null) { + gridType = value.getNumber(); + bitField0_ |= 0x00000004; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case -1997438900: { + if (input.isAtField(FieldNames.marked)) { + if (!input.trySkipNullValue()) { + marked = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MiningGrid clone() { + return new MiningGrid().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MiningGrid parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MiningGrid(), data).checkInitialized(); + } + + public static MiningGrid parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningGrid(), input).checkInitialized(); + } + + public static MiningGrid parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningGrid(), input).checkInitialized(); + } + + /** + * @return factory for creating MiningGrid messages + */ + public static MessageFactory<MiningGrid> getFactory() { + return MiningGridFactory.INSTANCE; + } + + private enum MiningGridFactory implements MessageFactory<MiningGrid> { + INSTANCE; + + @Override + public MiningGrid create() { + return MiningGrid.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName posIndex = FieldName.forField("PosIndex"); + + static final FieldName gridType = FieldName.forField("GridType"); + + static final FieldName marked = FieldName.forField("Marked"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code MiningSupport} + */ + public static final class MiningSupport extends ProtoMessage<MiningSupport> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 UsableCount = 2;</code> + */ + private int usableCount; + + /** + * <code>optional int32 UsedCount = 3;</code> + */ + private int usedCount; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private MiningSupport() { + } + + /** + * @return a new empty instance of {@code MiningSupport} + */ + public static MiningSupport newInstance() { + return new MiningSupport(); + } + + /** + * <code>optional int32 UsableCount = 2;</code> + * @return whether the usableCount field is set + */ + public boolean hasUsableCount() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 UsableCount = 2;</code> + * @return this + */ + public MiningSupport clearUsableCount() { + bitField0_ &= ~0x00000001; + usableCount = 0; + return this; + } + + /** + * <code>optional int32 UsableCount = 2;</code> + * @return the usableCount + */ + public int getUsableCount() { + return usableCount; + } + + /** + * <code>optional int32 UsableCount = 2;</code> + * @param value the usableCount to set + * @return this + */ + public MiningSupport setUsableCount(final int value) { + bitField0_ |= 0x00000001; + usableCount = value; + return this; + } + + /** + * <code>optional int32 UsedCount = 3;</code> + * @return whether the usedCount field is set + */ + public boolean hasUsedCount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional int32 UsedCount = 3;</code> + * @return this + */ + public MiningSupport clearUsedCount() { + bitField0_ &= ~0x00000002; + usedCount = 0; + return this; + } + + /** + * <code>optional int32 UsedCount = 3;</code> + * @return the usedCount + */ + public int getUsedCount() { + return usedCount; + } + + /** + * <code>optional int32 UsedCount = 3;</code> + * @param value the usedCount to set + * @return this + */ + public MiningSupport setUsedCount(final int value) { + bitField0_ |= 0x00000002; + usedCount = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public MiningSupport clearId() { + bitField0_ &= ~0x00000004; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public MiningSupport setId(final int value) { + bitField0_ |= 0x00000004; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MiningSupport clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MiningSupport addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MiningSupport addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MiningSupport setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public MiningSupport copyFrom(final MiningSupport other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + usableCount = other.usableCount; + usedCount = other.usedCount; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MiningSupport mergeFrom(final MiningSupport other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasUsableCount()) { + setUsableCount(other.usableCount); + } + if (other.hasUsedCount()) { + setUsedCount(other.usedCount); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public MiningSupport clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + usableCount = 0; + usedCount = 0; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public MiningSupport clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MiningSupport)) { + return false; + } + MiningSupport other = (MiningSupport) o; + return bitField0_ == other.bitField0_ + && (!hasUsableCount() || usableCount == other.usableCount) + && (!hasUsedCount() || usedCount == other.usedCount) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(usableCount); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeInt32NoTag(usedCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(usableCount); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(usedCount); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MiningSupport mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // usableCount + usableCount = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // usedCount + usedCount = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.usableCount, usableCount); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.usedCount, usedCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public MiningSupport mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 544030423: { + if (input.isAtField(FieldNames.usableCount)) { + if (!input.trySkipNullValue()) { + usableCount = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1916691250: { + if (input.isAtField(FieldNames.usedCount)) { + if (!input.trySkipNullValue()) { + usedCount = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MiningSupport clone() { + return new MiningSupport().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MiningSupport parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MiningSupport(), data).checkInitialized(); + } + + public static MiningSupport parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningSupport(), input).checkInitialized(); + } + + public static MiningSupport parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningSupport(), input).checkInitialized(); + } + + /** + * @return factory for creating MiningSupport messages + */ + public static MessageFactory<MiningSupport> getFactory() { + return MiningSupportFactory.INSTANCE; + } + + private enum MiningSupportFactory implements MessageFactory<MiningSupport> { + INSTANCE; + + @Override + public MiningSupport create() { + return MiningSupport.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName usableCount = FieldName.forField("UsableCount"); + + static final FieldName usedCount = FieldName.forField("UsedCount"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code MiningMap} + */ + public static final class MiningMap extends ProtoMessage<MiningMap> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .MiningTreasure Treasures = 2;</code> + */ + private final RepeatedMessage<MiningTreasure> treasures = RepeatedMessage.newEmptyInstance(MiningTreasure.getFactory()); + + /** + * <code>repeated .MiningGrid Grids = 3;</code> + */ + private final RepeatedMessage<MiningGrid> grids = RepeatedMessage.newEmptyInstance(MiningGrid.getFactory()); + + private MiningMap() { + } + + /** + * @return a new empty instance of {@code MiningMap} + */ + public static MiningMap newInstance() { + return new MiningMap(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public MiningMap clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public MiningMap setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MiningMap clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MiningMap addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MiningMap addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MiningMap setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .MiningTreasure Treasures = 2;</code> + * @return whether the treasures field is set + */ + public boolean hasTreasures() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .MiningTreasure Treasures = 2;</code> + * @return this + */ + public MiningMap clearTreasures() { + bitField0_ &= ~0x00000004; + treasures.clear(); + return this; + } + + /** + * <code>repeated .MiningTreasure Treasures = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTreasures()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<MiningTreasure> getTreasures() { + return treasures; + } + + /** + * <code>repeated .MiningTreasure Treasures = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<MiningTreasure> getMutableTreasures() { + bitField0_ |= 0x00000004; + return treasures; + } + + /** + * <code>repeated .MiningTreasure Treasures = 2;</code> + * @param value the treasures to add + * @return this + */ + public MiningMap addTreasures(final MiningTreasure value) { + bitField0_ |= 0x00000004; + treasures.add(value); + return this; + } + + /** + * <code>repeated .MiningTreasure Treasures = 2;</code> + * @param values the treasures to add + * @return this + */ + public MiningMap addAllTreasures(final MiningTreasure... values) { + bitField0_ |= 0x00000004; + treasures.addAll(values); + return this; + } + + /** + * <code>repeated .MiningGrid Grids = 3;</code> + * @return whether the grids field is set + */ + public boolean hasGrids() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .MiningGrid Grids = 3;</code> + * @return this + */ + public MiningMap clearGrids() { + bitField0_ &= ~0x00000008; + grids.clear(); + return this; + } + + /** + * <code>repeated .MiningGrid Grids = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableGrids()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<MiningGrid> getGrids() { + return grids; + } + + /** + * <code>repeated .MiningGrid Grids = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<MiningGrid> getMutableGrids() { + bitField0_ |= 0x00000008; + return grids; + } + + /** + * <code>repeated .MiningGrid Grids = 3;</code> + * @param value the grids to add + * @return this + */ + public MiningMap addGrids(final MiningGrid value) { + bitField0_ |= 0x00000008; + grids.add(value); + return this; + } + + /** + * <code>repeated .MiningGrid Grids = 3;</code> + * @param values the grids to add + * @return this + */ + public MiningMap addAllGrids(final MiningGrid... values) { + bitField0_ |= 0x00000008; + grids.addAll(values); + return this; + } + + @Override + public MiningMap copyFrom(final MiningMap other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + treasures.copyFrom(other.treasures); + grids.copyFrom(other.grids); + } + return this; + } + + @Override + public MiningMap mergeFrom(final MiningMap other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasTreasures()) { + getMutableTreasures().addAll(other.treasures); + } + if (other.hasGrids()) { + getMutableGrids().addAll(other.grids); + } + return this; + } + + @Override + public MiningMap clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + treasures.clear(); + grids.clear(); + return this; + } + + @Override + public MiningMap clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + treasures.clearQuick(); + grids.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MiningMap)) { + return false; + } + MiningMap other = (MiningMap) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasTreasures() || treasures.equals(other.treasures)) + && (!hasGrids() || grids.equals(other.grids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < treasures.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(treasures.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < grids.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(grids.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * treasures.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(treasures); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * grids.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(grids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MiningMap mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // treasures + tag = input.readRepeatedMessage(treasures, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // grids + tag = input.readRepeatedMessage(grids, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.treasures, treasures); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.grids, grids); + } + output.endObject(); + } + + @Override + public MiningMap mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1939952516: { + if (input.isAtField(FieldNames.treasures)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(treasures); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 69070285: { + if (input.isAtField(FieldNames.grids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(grids); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MiningMap clone() { + return new MiningMap().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MiningMap parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MiningMap(), data).checkInitialized(); + } + + public static MiningMap parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningMap(), input).checkInitialized(); + } + + public static MiningMap parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningMap(), input).checkInitialized(); + } + + /** + * @return factory for creating MiningMap messages + */ + public static MessageFactory<MiningMap> getFactory() { + return MiningMapFactory.INSTANCE; + } + + private enum MiningMapFactory implements MessageFactory<MiningMap> { + INSTANCE; + + @Override + public MiningMap create() { + return MiningMap.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName treasures = FieldName.forField("Treasures"); + + static final FieldName grids = FieldName.forField("Grids"); + } + } + + /** + * Protobuf type {@code MiningLayer} + */ + public static final class MiningLayer extends ProtoMessage<MiningLayer> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Layer = 1;</code> + */ + private int layer; + + /** + * <code>optional .MiningMap Map = 3;</code> + */ + private final MiningMap map = MiningMap.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .MiningSupport Supports = 4;</code> + */ + private final RepeatedMessage<MiningSupport> supports = RepeatedMessage.newEmptyInstance(MiningSupport.getFactory()); + + private MiningLayer() { + } + + /** + * @return a new empty instance of {@code MiningLayer} + */ + public static MiningLayer newInstance() { + return new MiningLayer(); + } + + /** + * <code>optional uint32 Layer = 1;</code> + * @return whether the layer field is set + */ + public boolean hasLayer() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Layer = 1;</code> + * @return this + */ + public MiningLayer clearLayer() { + bitField0_ &= ~0x00000001; + layer = 0; + return this; + } + + /** + * <code>optional uint32 Layer = 1;</code> + * @return the layer + */ + public int getLayer() { + return layer; + } + + /** + * <code>optional uint32 Layer = 1;</code> + * @param value the layer to set + * @return this + */ + public MiningLayer setLayer(final int value) { + bitField0_ |= 0x00000001; + layer = value; + return this; + } + + /** + * <code>optional .MiningMap Map = 3;</code> + * @return whether the map field is set + */ + public boolean hasMap() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .MiningMap Map = 3;</code> + * @return this + */ + public MiningLayer clearMap() { + bitField0_ &= ~0x00000002; + map.clear(); + return this; + } + + /** + * <code>optional .MiningMap Map = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMap()} if you want to modify it. + * + * @return internal storage object for reading + */ + public MiningMap getMap() { + return map; + } + + /** + * <code>optional .MiningMap Map = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public MiningMap getMutableMap() { + bitField0_ |= 0x00000002; + return map; + } + + /** + * <code>optional .MiningMap Map = 3;</code> + * @param value the map to set + * @return this + */ + public MiningLayer setMap(final MiningMap value) { + bitField0_ |= 0x00000002; + map.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MiningLayer clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MiningLayer addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MiningLayer addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MiningLayer setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .MiningSupport Supports = 4;</code> + * @return whether the supports field is set + */ + public boolean hasSupports() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .MiningSupport Supports = 4;</code> + * @return this + */ + public MiningLayer clearSupports() { + bitField0_ &= ~0x00000008; + supports.clear(); + return this; + } + + /** + * <code>repeated .MiningSupport Supports = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSupports()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<MiningSupport> getSupports() { + return supports; + } + + /** + * <code>repeated .MiningSupport Supports = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<MiningSupport> getMutableSupports() { + bitField0_ |= 0x00000008; + return supports; + } + + /** + * <code>repeated .MiningSupport Supports = 4;</code> + * @param value the supports to add + * @return this + */ + public MiningLayer addSupports(final MiningSupport value) { + bitField0_ |= 0x00000008; + supports.add(value); + return this; + } + + /** + * <code>repeated .MiningSupport Supports = 4;</code> + * @param values the supports to add + * @return this + */ + public MiningLayer addAllSupports(final MiningSupport... values) { + bitField0_ |= 0x00000008; + supports.addAll(values); + return this; + } + + @Override + public MiningLayer copyFrom(final MiningLayer other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + layer = other.layer; + map.copyFrom(other.map); + nextPackage.copyFrom(other.nextPackage); + supports.copyFrom(other.supports); + } + return this; + } + + @Override + public MiningLayer mergeFrom(final MiningLayer other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLayer()) { + setLayer(other.layer); + } + if (other.hasMap()) { + getMutableMap().mergeFrom(other.map); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSupports()) { + getMutableSupports().addAll(other.supports); + } + return this; + } + + @Override + public MiningLayer clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + layer = 0; + map.clear(); + nextPackage.clear(); + supports.clear(); + return this; + } + + @Override + public MiningLayer clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + map.clearQuick(); + nextPackage.clear(); + supports.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MiningLayer)) { + return false; + } + MiningLayer other = (MiningLayer) o; + return bitField0_ == other.bitField0_ + && (!hasLayer() || layer == other.layer) + && (!hasMap() || map.equals(other.map)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSupports() || supports.equals(other.supports)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(map); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < supports.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(supports.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(layer); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(map); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * supports.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(supports); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MiningLayer mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // layer + layer = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // map + input.readMessage(map); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // supports + tag = input.readRepeatedMessage(supports, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.layer, layer); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.map, map); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.supports, supports); + } + output.endObject(); + } + + @Override + public MiningLayer mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73196849: { + if (input.isAtField(FieldNames.layer)) { + if (!input.trySkipNullValue()) { + layer = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 77116: { + if (input.isAtField(FieldNames.map)) { + if (!input.trySkipNullValue()) { + input.readMessage(map); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1598562652: { + if (input.isAtField(FieldNames.supports)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(supports); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MiningLayer clone() { + return new MiningLayer().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MiningLayer parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MiningLayer(), data).checkInitialized(); + } + + public static MiningLayer parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningLayer(), input).checkInitialized(); + } + + public static MiningLayer parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningLayer(), input).checkInitialized(); + } + + /** + * @return factory for creating MiningLayer messages + */ + public static MessageFactory<MiningLayer> getFactory() { + return MiningLayerFactory.INSTANCE; + } + + private enum MiningLayerFactory implements MessageFactory<MiningLayer> { + INSTANCE; + + @Override + public MiningLayer create() { + return MiningLayer.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName layer = FieldName.forField("Layer"); + + static final FieldName map = FieldName.forField("Map"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName supports = FieldName.forField("Supports"); + } + } + + /** + * Protobuf type {@code MiningProcess} + */ + public static final class MiningProcess extends ProtoMessage<MiningProcess> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 EffectType = 1;</code> + */ + private int effectType; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .MiningGrid EffectedGrids = 2;</code> + */ + private final RepeatedMessage<MiningGrid> effectedGrids = RepeatedMessage.newEmptyInstance(MiningGrid.getFactory()); + + private MiningProcess() { + } + + /** + * @return a new empty instance of {@code MiningProcess} + */ + public static MiningProcess newInstance() { + return new MiningProcess(); + } + + /** + * <code>optional int32 EffectType = 1;</code> + * @return whether the effectType field is set + */ + public boolean hasEffectType() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 EffectType = 1;</code> + * @return this + */ + public MiningProcess clearEffectType() { + bitField0_ &= ~0x00000001; + effectType = 0; + return this; + } + + /** + * <code>optional int32 EffectType = 1;</code> + * @return the effectType + */ + public int getEffectType() { + return effectType; + } + + /** + * <code>optional int32 EffectType = 1;</code> + * @param value the effectType to set + * @return this + */ + public MiningProcess setEffectType(final int value) { + bitField0_ |= 0x00000001; + effectType = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MiningProcess clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MiningProcess addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MiningProcess addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MiningProcess setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .MiningGrid EffectedGrids = 2;</code> + * @return whether the effectedGrids field is set + */ + public boolean hasEffectedGrids() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .MiningGrid EffectedGrids = 2;</code> + * @return this + */ + public MiningProcess clearEffectedGrids() { + bitField0_ &= ~0x00000004; + effectedGrids.clear(); + return this; + } + + /** + * <code>repeated .MiningGrid EffectedGrids = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEffectedGrids()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<MiningGrid> getEffectedGrids() { + return effectedGrids; + } + + /** + * <code>repeated .MiningGrid EffectedGrids = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<MiningGrid> getMutableEffectedGrids() { + bitField0_ |= 0x00000004; + return effectedGrids; + } + + /** + * <code>repeated .MiningGrid EffectedGrids = 2;</code> + * @param value the effectedGrids to add + * @return this + */ + public MiningProcess addEffectedGrids(final MiningGrid value) { + bitField0_ |= 0x00000004; + effectedGrids.add(value); + return this; + } + + /** + * <code>repeated .MiningGrid EffectedGrids = 2;</code> + * @param values the effectedGrids to add + * @return this + */ + public MiningProcess addAllEffectedGrids(final MiningGrid... values) { + bitField0_ |= 0x00000004; + effectedGrids.addAll(values); + return this; + } + + @Override + public MiningProcess copyFrom(final MiningProcess other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + effectType = other.effectType; + nextPackage.copyFrom(other.nextPackage); + effectedGrids.copyFrom(other.effectedGrids); + } + return this; + } + + @Override + public MiningProcess mergeFrom(final MiningProcess other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEffectType()) { + setEffectType(other.effectType); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEffectedGrids()) { + getMutableEffectedGrids().addAll(other.effectedGrids); + } + return this; + } + + @Override + public MiningProcess clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + effectType = 0; + nextPackage.clear(); + effectedGrids.clear(); + return this; + } + + @Override + public MiningProcess clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + effectedGrids.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MiningProcess)) { + return false; + } + MiningProcess other = (MiningProcess) o; + return bitField0_ == other.bitField0_ + && (!hasEffectType() || effectType == other.effectType) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEffectedGrids() || effectedGrids.equals(other.effectedGrids)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt32NoTag(effectType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < effectedGrids.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(effectedGrids.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(effectType); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * effectedGrids.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(effectedGrids); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MiningProcess mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // effectType + effectType = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // effectedGrids + tag = input.readRepeatedMessage(effectedGrids, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.effectType, effectType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.effectedGrids, effectedGrids); + } + output.endObject(); + } + + @Override + public MiningProcess mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -585668469: { + if (input.isAtField(FieldNames.effectType)) { + if (!input.trySkipNullValue()) { + effectType = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 71871933: { + if (input.isAtField(FieldNames.effectedGrids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(effectedGrids); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MiningProcess clone() { + return new MiningProcess().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MiningProcess parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MiningProcess(), data).checkInitialized(); + } + + public static MiningProcess parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningProcess(), input).checkInitialized(); + } + + public static MiningProcess parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningProcess(), input).checkInitialized(); + } + + /** + * @return factory for creating MiningProcess messages + */ + public static MessageFactory<MiningProcess> getFactory() { + return MiningProcessFactory.INSTANCE; + } + + private enum MiningProcessFactory implements MessageFactory<MiningProcess> { + INSTANCE; + + @Override + public MiningProcess create() { + return MiningProcess.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName effectType = FieldName.forField("EffectType"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName effectedGrids = FieldName.forField("EffectedGrids"); + } + } + + /** + * Protobuf type {@code MiningChangeInfo} + */ + public static final class MiningChangeInfo extends ProtoMessage<MiningChangeInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Score = 1;</code> + */ + private int score; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ReceivedTreasures = 3;</code> + */ + private final RepeatedInt receivedTreasures = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .MiningProcess Processes = 2;</code> + */ + private final RepeatedMessage<MiningProcess> processes = RepeatedMessage.newEmptyInstance(MiningProcess.getFactory()); + + private MiningChangeInfo() { + } + + /** + * @return a new empty instance of {@code MiningChangeInfo} + */ + public static MiningChangeInfo newInstance() { + return new MiningChangeInfo(); + } + + /** + * <code>optional uint32 Score = 1;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Score = 1;</code> + * @return this + */ + public MiningChangeInfo clearScore() { + bitField0_ &= ~0x00000001; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 1;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 1;</code> + * @param value the score to set + * @return this + */ + public MiningChangeInfo setScore(final int value) { + bitField0_ |= 0x00000001; + score = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public MiningChangeInfo clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public MiningChangeInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public MiningChangeInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public MiningChangeInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ReceivedTreasures = 3;</code> + * @return whether the receivedTreasures field is set + */ + public boolean hasReceivedTreasures() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 ReceivedTreasures = 3;</code> + * @return this + */ + public MiningChangeInfo clearReceivedTreasures() { + bitField0_ &= ~0x00000004; + receivedTreasures.clear(); + return this; + } + + /** + * <code>repeated uint32 ReceivedTreasures = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReceivedTreasures()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getReceivedTreasures() { + return receivedTreasures; + } + + /** + * <code>repeated uint32 ReceivedTreasures = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableReceivedTreasures() { + bitField0_ |= 0x00000004; + return receivedTreasures; + } + + /** + * <code>repeated uint32 ReceivedTreasures = 3;</code> + * @param value the receivedTreasures to add + * @return this + */ + public MiningChangeInfo addReceivedTreasures(final int value) { + bitField0_ |= 0x00000004; + receivedTreasures.add(value); + return this; + } + + /** + * <code>repeated uint32 ReceivedTreasures = 3;</code> + * @param values the receivedTreasures to add + * @return this + */ + public MiningChangeInfo addAllReceivedTreasures(final int... values) { + bitField0_ |= 0x00000004; + receivedTreasures.addAll(values); + return this; + } + + /** + * <code>repeated .MiningProcess Processes = 2;</code> + * @return whether the processes field is set + */ + public boolean hasProcesses() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .MiningProcess Processes = 2;</code> + * @return this + */ + public MiningChangeInfo clearProcesses() { + bitField0_ &= ~0x00000008; + processes.clear(); + return this; + } + + /** + * <code>repeated .MiningProcess Processes = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableProcesses()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<MiningProcess> getProcesses() { + return processes; + } + + /** + * <code>repeated .MiningProcess Processes = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<MiningProcess> getMutableProcesses() { + bitField0_ |= 0x00000008; + return processes; + } + + /** + * <code>repeated .MiningProcess Processes = 2;</code> + * @param value the processes to add + * @return this + */ + public MiningChangeInfo addProcesses(final MiningProcess value) { + bitField0_ |= 0x00000008; + processes.add(value); + return this; + } + + /** + * <code>repeated .MiningProcess Processes = 2;</code> + * @param values the processes to add + * @return this + */ + public MiningChangeInfo addAllProcesses(final MiningProcess... values) { + bitField0_ |= 0x00000008; + processes.addAll(values); + return this; + } + + @Override + public MiningChangeInfo copyFrom(final MiningChangeInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + score = other.score; + nextPackage.copyFrom(other.nextPackage); + receivedTreasures.copyFrom(other.receivedTreasures); + processes.copyFrom(other.processes); + } + return this; + } + + @Override + public MiningChangeInfo mergeFrom(final MiningChangeInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasReceivedTreasures()) { + getMutableReceivedTreasures().addAll(other.receivedTreasures); + } + if (other.hasProcesses()) { + getMutableProcesses().addAll(other.processes); + } + return this; + } + + @Override + public MiningChangeInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + score = 0; + nextPackage.clear(); + receivedTreasures.clear(); + processes.clear(); + return this; + } + + @Override + public MiningChangeInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + receivedTreasures.clear(); + processes.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof MiningChangeInfo)) { + return false; + } + MiningChangeInfo other = (MiningChangeInfo) o; + return bitField0_ == other.bitField0_ + && (!hasScore() || score == other.score) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasReceivedTreasures() || receivedTreasures.equals(other.receivedTreasures)) + && (!hasProcesses() || processes.equals(other.processes)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < receivedTreasures.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(receivedTreasures.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < processes.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(processes.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * receivedTreasures.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(receivedTreasures); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * processes.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(processes); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public MiningChangeInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // receivedTreasures [packed=true] + input.readPackedUInt32(receivedTreasures, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // processes + tag = input.readRepeatedMessage(processes, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // receivedTreasures [packed=false] + tag = input.readRepeatedUInt32(receivedTreasures, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.receivedTreasures, receivedTreasures); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.processes, processes); + } + output.endObject(); + } + + @Override + public MiningChangeInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1350814045: { + if (input.isAtField(FieldNames.receivedTreasures)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(receivedTreasures); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 909208381: { + if (input.isAtField(FieldNames.processes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(processes); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public MiningChangeInfo clone() { + return new MiningChangeInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static MiningChangeInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new MiningChangeInfo(), data).checkInitialized(); + } + + public static MiningChangeInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningChangeInfo(), input).checkInitialized(); + } + + public static MiningChangeInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new MiningChangeInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating MiningChangeInfo messages + */ + public static MessageFactory<MiningChangeInfo> getFactory() { + return MiningChangeInfoFactory.INSTANCE; + } + + private enum MiningChangeInfoFactory implements MessageFactory<MiningChangeInfo> { + INSTANCE; + + @Override + public MiningChangeInfo create() { + return MiningChangeInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName score = FieldName.forField("Score"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName receivedTreasures = FieldName.forField("ReceivedTreasures"); + + static final FieldName processes = FieldName.forField("Processes"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/PublicStarTower.java b/src/generated/main/emu/nebula/proto/PublicStarTower.java new file mode 100644 index 0000000..c5c18b8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/PublicStarTower.java @@ -0,0 +1,33895 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedLong; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class PublicStarTower { + /** + * Protobuf type {@code StarTowerInfo} + */ + public static final class StarTowerInfo extends ProtoMessage<StarTowerInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .StarTowerMeta Meta = 1;</code> + */ + private final StarTowerMeta meta = StarTowerMeta.newInstance(); + + /** + * <code>optional .StarTowerRoom Room = 2;</code> + */ + private final StarTowerRoom room = StarTowerRoom.newInstance(); + + /** + * <code>optional .StarTowerBag Bag = 3;</code> + */ + private final StarTowerBag bag = StarTowerBag.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerInfo() { + } + + /** + * @return a new empty instance of {@code StarTowerInfo} + */ + public static StarTowerInfo newInstance() { + return new StarTowerInfo(); + } + + /** + * <code>optional .StarTowerMeta Meta = 1;</code> + * @return whether the meta field is set + */ + public boolean hasMeta() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .StarTowerMeta Meta = 1;</code> + * @return this + */ + public StarTowerInfo clearMeta() { + bitField0_ &= ~0x00000001; + meta.clear(); + return this; + } + + /** + * <code>optional .StarTowerMeta Meta = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMeta()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerMeta getMeta() { + return meta; + } + + /** + * <code>optional .StarTowerMeta Meta = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerMeta getMutableMeta() { + bitField0_ |= 0x00000001; + return meta; + } + + /** + * <code>optional .StarTowerMeta Meta = 1;</code> + * @param value the meta to set + * @return this + */ + public StarTowerInfo setMeta(final StarTowerMeta value) { + bitField0_ |= 0x00000001; + meta.copyFrom(value); + return this; + } + + /** + * <code>optional .StarTowerRoom Room = 2;</code> + * @return whether the room field is set + */ + public boolean hasRoom() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .StarTowerRoom Room = 2;</code> + * @return this + */ + public StarTowerInfo clearRoom() { + bitField0_ &= ~0x00000002; + room.clear(); + return this; + } + + /** + * <code>optional .StarTowerRoom Room = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRoom()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerRoom getRoom() { + return room; + } + + /** + * <code>optional .StarTowerRoom Room = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerRoom getMutableRoom() { + bitField0_ |= 0x00000002; + return room; + } + + /** + * <code>optional .StarTowerRoom Room = 2;</code> + * @param value the room to set + * @return this + */ + public StarTowerInfo setRoom(final StarTowerRoom value) { + bitField0_ |= 0x00000002; + room.copyFrom(value); + return this; + } + + /** + * <code>optional .StarTowerBag Bag = 3;</code> + * @return whether the bag field is set + */ + public boolean hasBag() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .StarTowerBag Bag = 3;</code> + * @return this + */ + public StarTowerInfo clearBag() { + bitField0_ &= ~0x00000004; + bag.clear(); + return this; + } + + /** + * <code>optional .StarTowerBag Bag = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBag()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerBag getBag() { + return bag; + } + + /** + * <code>optional .StarTowerBag Bag = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerBag getMutableBag() { + bitField0_ |= 0x00000004; + return bag; + } + + /** + * <code>optional .StarTowerBag Bag = 3;</code> + * @param value the bag to set + * @return this + */ + public StarTowerInfo setBag(final StarTowerBag value) { + bitField0_ |= 0x00000004; + bag.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerInfo copyFrom(final StarTowerInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + meta.copyFrom(other.meta); + room.copyFrom(other.room); + bag.copyFrom(other.bag); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerInfo mergeFrom(final StarTowerInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMeta()) { + getMutableMeta().mergeFrom(other.meta); + } + if (other.hasRoom()) { + getMutableRoom().mergeFrom(other.room); + } + if (other.hasBag()) { + getMutableBag().mergeFrom(other.bag); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + meta.clear(); + room.clear(); + bag.clear(); + nextPackage.clear(); + return this; + } + + @Override + public StarTowerInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + meta.clearQuick(); + room.clearQuick(); + bag.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerInfo)) { + return false; + } + StarTowerInfo other = (StarTowerInfo) o; + return bitField0_ == other.bitField0_ + && (!hasMeta() || meta.equals(other.meta)) + && (!hasRoom() || room.equals(other.room)) + && (!hasBag() || bag.equals(other.bag)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(meta); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(room); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(bag); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(meta); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(room); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(bag); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // meta + input.readMessage(meta); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // room + input.readMessage(room); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // bag + input.readMessage(bag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.meta, meta); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.room, room); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.bag, bag); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2394661: { + if (input.isAtField(FieldNames.meta)) { + if (!input.trySkipNullValue()) { + input.readMessage(meta); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2553083: { + if (input.isAtField(FieldNames.room)) { + if (!input.trySkipNullValue()) { + input.readMessage(room); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66536: { + if (input.isAtField(FieldNames.bag)) { + if (!input.trySkipNullValue()) { + input.readMessage(bag); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerInfo clone() { + return new StarTowerInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerInfo(), data).checkInitialized(); + } + + public static StarTowerInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerInfo(), input).checkInitialized(); + } + + public static StarTowerInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerInfo messages + */ + public static MessageFactory<StarTowerInfo> getFactory() { + return StarTowerInfoFactory.INSTANCE; + } + + private enum StarTowerInfoFactory implements MessageFactory<StarTowerInfo> { + INSTANCE; + + @Override + public StarTowerInfo create() { + return StarTowerInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName meta = FieldName.forField("Meta"); + + static final FieldName room = FieldName.forField("Room"); + + static final FieldName bag = FieldName.forField("Bag"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerMeta} + */ + public static final class StarTowerMeta extends ProtoMessage<StarTowerMeta> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 16;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 CharHp = 2;</code> + */ + private int charHp; + + /** + * <code>optional uint32 TeamLevel = 3;</code> + */ + private int teamLevel; + + /** + * <code>optional uint32 TeamExp = 4;</code> + */ + private int teamExp; + + /** + * <code>optional uint32 DateLen = 7;</code> + */ + private int dateLen; + + /** + * <code>optional uint32 NPCInteractions = 10;</code> + */ + private int nPCInteractions; + + /** + * <code>optional uint32 ResurrectionCnt = 12;</code> + */ + private int resurrectionCnt; + + /** + * <code>optional uint32 TotalTime = 14;</code> + */ + private int totalTime; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string ClientData = 8;</code> + */ + private final Utf8String clientData = Utf8String.newEmptyInstance(); + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + */ + private final RepeatedLong totalDamages = RepeatedLong.newEmptyInstance(); + + /** + * <code>repeated uint32 ActiveSecondaryIds = 9;</code> + */ + private final RepeatedInt activeSecondaryIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 TowerGrowthNodes = 11;</code> + */ + private final RepeatedInt towerGrowthNodes = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .StarTowerChar Chars = 5;</code> + */ + private final RepeatedMessage<StarTowerChar> chars = RepeatedMessage.newEmptyInstance(StarTowerChar.getFactory()); + + /** + * <code>repeated .StarTowerDisc Discs = 6;</code> + */ + private final RepeatedMessage<StarTowerDisc> discs = RepeatedMessage.newEmptyInstance(StarTowerDisc.getFactory()); + + private StarTowerMeta() { + } + + /** + * @return a new empty instance of {@code StarTowerMeta} + */ + public static StarTowerMeta newInstance() { + return new StarTowerMeta(); + } + + /** + * <code>optional uint64 BuildId = 16;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 16;</code> + * @return this + */ + public StarTowerMeta clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 16;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 16;</code> + * @param value the buildId to set + * @return this + */ + public StarTowerMeta setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerMeta clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerMeta setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint32 CharHp = 2;</code> + * @return whether the charHp field is set + */ + public boolean hasCharHp() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 CharHp = 2;</code> + * @return this + */ + public StarTowerMeta clearCharHp() { + bitField0_ &= ~0x00000004; + charHp = 0; + return this; + } + + /** + * <code>optional uint32 CharHp = 2;</code> + * @return the charHp + */ + public int getCharHp() { + return charHp; + } + + /** + * <code>optional uint32 CharHp = 2;</code> + * @param value the charHp to set + * @return this + */ + public StarTowerMeta setCharHp(final int value) { + bitField0_ |= 0x00000004; + charHp = value; + return this; + } + + /** + * <code>optional uint32 TeamLevel = 3;</code> + * @return whether the teamLevel field is set + */ + public boolean hasTeamLevel() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 TeamLevel = 3;</code> + * @return this + */ + public StarTowerMeta clearTeamLevel() { + bitField0_ &= ~0x00000008; + teamLevel = 0; + return this; + } + + /** + * <code>optional uint32 TeamLevel = 3;</code> + * @return the teamLevel + */ + public int getTeamLevel() { + return teamLevel; + } + + /** + * <code>optional uint32 TeamLevel = 3;</code> + * @param value the teamLevel to set + * @return this + */ + public StarTowerMeta setTeamLevel(final int value) { + bitField0_ |= 0x00000008; + teamLevel = value; + return this; + } + + /** + * <code>optional uint32 TeamExp = 4;</code> + * @return whether the teamExp field is set + */ + public boolean hasTeamExp() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 TeamExp = 4;</code> + * @return this + */ + public StarTowerMeta clearTeamExp() { + bitField0_ &= ~0x00000010; + teamExp = 0; + return this; + } + + /** + * <code>optional uint32 TeamExp = 4;</code> + * @return the teamExp + */ + public int getTeamExp() { + return teamExp; + } + + /** + * <code>optional uint32 TeamExp = 4;</code> + * @param value the teamExp to set + * @return this + */ + public StarTowerMeta setTeamExp(final int value) { + bitField0_ |= 0x00000010; + teamExp = value; + return this; + } + + /** + * <code>optional uint32 DateLen = 7;</code> + * @return whether the dateLen field is set + */ + public boolean hasDateLen() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 DateLen = 7;</code> + * @return this + */ + public StarTowerMeta clearDateLen() { + bitField0_ &= ~0x00000020; + dateLen = 0; + return this; + } + + /** + * <code>optional uint32 DateLen = 7;</code> + * @return the dateLen + */ + public int getDateLen() { + return dateLen; + } + + /** + * <code>optional uint32 DateLen = 7;</code> + * @param value the dateLen to set + * @return this + */ + public StarTowerMeta setDateLen(final int value) { + bitField0_ |= 0x00000020; + dateLen = value; + return this; + } + + /** + * <code>optional uint32 NPCInteractions = 10;</code> + * @return whether the nPCInteractions field is set + */ + public boolean hasNPCInteractions() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 NPCInteractions = 10;</code> + * @return this + */ + public StarTowerMeta clearNPCInteractions() { + bitField0_ &= ~0x00000040; + nPCInteractions = 0; + return this; + } + + /** + * <code>optional uint32 NPCInteractions = 10;</code> + * @return the nPCInteractions + */ + public int getNPCInteractions() { + return nPCInteractions; + } + + /** + * <code>optional uint32 NPCInteractions = 10;</code> + * @param value the nPCInteractions to set + * @return this + */ + public StarTowerMeta setNPCInteractions(final int value) { + bitField0_ |= 0x00000040; + nPCInteractions = value; + return this; + } + + /** + * <code>optional uint32 ResurrectionCnt = 12;</code> + * @return whether the resurrectionCnt field is set + */ + public boolean hasResurrectionCnt() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional uint32 ResurrectionCnt = 12;</code> + * @return this + */ + public StarTowerMeta clearResurrectionCnt() { + bitField0_ &= ~0x00000080; + resurrectionCnt = 0; + return this; + } + + /** + * <code>optional uint32 ResurrectionCnt = 12;</code> + * @return the resurrectionCnt + */ + public int getResurrectionCnt() { + return resurrectionCnt; + } + + /** + * <code>optional uint32 ResurrectionCnt = 12;</code> + * @param value the resurrectionCnt to set + * @return this + */ + public StarTowerMeta setResurrectionCnt(final int value) { + bitField0_ |= 0x00000080; + resurrectionCnt = value; + return this; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return whether the totalTime field is set + */ + public boolean hasTotalTime() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return this + */ + public StarTowerMeta clearTotalTime() { + bitField0_ &= ~0x00000100; + totalTime = 0; + return this; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return the totalTime + */ + public int getTotalTime() { + return totalTime; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @param value the totalTime to set + * @return this + */ + public StarTowerMeta setTotalTime(final int value) { + bitField0_ |= 0x00000100; + totalTime = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerMeta clearNextPackage() { + bitField0_ &= ~0x00000200; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000200; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerMeta addNextPackage(final byte value) { + bitField0_ |= 0x00000200; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerMeta addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerMeta setNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string ClientData = 8;</code> + * @return whether the clientData field is set + */ + public boolean hasClientData() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>optional string ClientData = 8;</code> + * @return this + */ + public StarTowerMeta clearClientData() { + bitField0_ &= ~0x00000400; + clientData.clear(); + return this; + } + + /** + * <code>optional string ClientData = 8;</code> + * @return the clientData + */ + public String getClientData() { + return clientData.getString(); + } + + /** + * <code>optional string ClientData = 8;</code> + * @return internal {@code Utf8String} representation of clientData for reading + */ + public Utf8String getClientDataBytes() { + return this.clientData; + } + + /** + * <code>optional string ClientData = 8;</code> + * @return internal {@code Utf8String} representation of clientData for modifications + */ + public Utf8String getMutableClientDataBytes() { + bitField0_ |= 0x00000400; + return this.clientData; + } + + /** + * <code>optional string ClientData = 8;</code> + * @param value the clientData to set + * @return this + */ + public StarTowerMeta setClientData(final CharSequence value) { + bitField0_ |= 0x00000400; + clientData.copyFrom(value); + return this; + } + + /** + * <code>optional string ClientData = 8;</code> + * @param value the clientData to set + * @return this + */ + public StarTowerMeta setClientData(final Utf8String value) { + bitField0_ |= 0x00000400; + clientData.copyFrom(value); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @return whether the totalDamages field is set + */ + public boolean hasTotalDamages() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @return this + */ + public StarTowerMeta clearTotalDamages() { + bitField0_ &= ~0x00000800; + totalDamages.clear(); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTotalDamages()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getTotalDamages() { + return totalDamages; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableTotalDamages() { + bitField0_ |= 0x00000800; + return totalDamages; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @param value the totalDamages to add + * @return this + */ + public StarTowerMeta addTotalDamages(final long value) { + bitField0_ |= 0x00000800; + totalDamages.add(value); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @param values the totalDamages to add + * @return this + */ + public StarTowerMeta addAllTotalDamages(final long... values) { + bitField0_ |= 0x00000800; + totalDamages.addAll(values); + return this; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 9;</code> + * @return whether the activeSecondaryIds field is set + */ + public boolean hasActiveSecondaryIds() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 9;</code> + * @return this + */ + public StarTowerMeta clearActiveSecondaryIds() { + bitField0_ &= ~0x00001000; + activeSecondaryIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 9;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableActiveSecondaryIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getActiveSecondaryIds() { + return activeSecondaryIds; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 9;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableActiveSecondaryIds() { + bitField0_ |= 0x00001000; + return activeSecondaryIds; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 9;</code> + * @param value the activeSecondaryIds to add + * @return this + */ + public StarTowerMeta addActiveSecondaryIds(final int value) { + bitField0_ |= 0x00001000; + activeSecondaryIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 9;</code> + * @param values the activeSecondaryIds to add + * @return this + */ + public StarTowerMeta addAllActiveSecondaryIds(final int... values) { + bitField0_ |= 0x00001000; + activeSecondaryIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 TowerGrowthNodes = 11;</code> + * @return whether the towerGrowthNodes field is set + */ + public boolean hasTowerGrowthNodes() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * <code>repeated uint32 TowerGrowthNodes = 11;</code> + * @return this + */ + public StarTowerMeta clearTowerGrowthNodes() { + bitField0_ &= ~0x00002000; + towerGrowthNodes.clear(); + return this; + } + + /** + * <code>repeated uint32 TowerGrowthNodes = 11;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTowerGrowthNodes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getTowerGrowthNodes() { + return towerGrowthNodes; + } + + /** + * <code>repeated uint32 TowerGrowthNodes = 11;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableTowerGrowthNodes() { + bitField0_ |= 0x00002000; + return towerGrowthNodes; + } + + /** + * <code>repeated uint32 TowerGrowthNodes = 11;</code> + * @param value the towerGrowthNodes to add + * @return this + */ + public StarTowerMeta addTowerGrowthNodes(final int value) { + bitField0_ |= 0x00002000; + towerGrowthNodes.add(value); + return this; + } + + /** + * <code>repeated uint32 TowerGrowthNodes = 11;</code> + * @param values the towerGrowthNodes to add + * @return this + */ + public StarTowerMeta addAllTowerGrowthNodes(final int... values) { + bitField0_ |= 0x00002000; + towerGrowthNodes.addAll(values); + return this; + } + + /** + * <code>repeated .StarTowerChar Chars = 5;</code> + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x00004000) != 0; + } + + /** + * <code>repeated .StarTowerChar Chars = 5;</code> + * @return this + */ + public StarTowerMeta clearChars() { + bitField0_ &= ~0x00004000; + chars.clear(); + return this; + } + + /** + * <code>repeated .StarTowerChar Chars = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StarTowerChar> getChars() { + return chars; + } + + /** + * <code>repeated .StarTowerChar Chars = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StarTowerChar> getMutableChars() { + bitField0_ |= 0x00004000; + return chars; + } + + /** + * <code>repeated .StarTowerChar Chars = 5;</code> + * @param value the chars to add + * @return this + */ + public StarTowerMeta addChars(final StarTowerChar value) { + bitField0_ |= 0x00004000; + chars.add(value); + return this; + } + + /** + * <code>repeated .StarTowerChar Chars = 5;</code> + * @param values the chars to add + * @return this + */ + public StarTowerMeta addAllChars(final StarTowerChar... values) { + bitField0_ |= 0x00004000; + chars.addAll(values); + return this; + } + + /** + * <code>repeated .StarTowerDisc Discs = 6;</code> + * @return whether the discs field is set + */ + public boolean hasDiscs() { + return (bitField0_ & 0x00008000) != 0; + } + + /** + * <code>repeated .StarTowerDisc Discs = 6;</code> + * @return this + */ + public StarTowerMeta clearDiscs() { + bitField0_ &= ~0x00008000; + discs.clear(); + return this; + } + + /** + * <code>repeated .StarTowerDisc Discs = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDiscs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StarTowerDisc> getDiscs() { + return discs; + } + + /** + * <code>repeated .StarTowerDisc Discs = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StarTowerDisc> getMutableDiscs() { + bitField0_ |= 0x00008000; + return discs; + } + + /** + * <code>repeated .StarTowerDisc Discs = 6;</code> + * @param value the discs to add + * @return this + */ + public StarTowerMeta addDiscs(final StarTowerDisc value) { + bitField0_ |= 0x00008000; + discs.add(value); + return this; + } + + /** + * <code>repeated .StarTowerDisc Discs = 6;</code> + * @param values the discs to add + * @return this + */ + public StarTowerMeta addAllDiscs(final StarTowerDisc... values) { + bitField0_ |= 0x00008000; + discs.addAll(values); + return this; + } + + @Override + public StarTowerMeta copyFrom(final StarTowerMeta other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + charHp = other.charHp; + teamLevel = other.teamLevel; + teamExp = other.teamExp; + dateLen = other.dateLen; + nPCInteractions = other.nPCInteractions; + resurrectionCnt = other.resurrectionCnt; + totalTime = other.totalTime; + nextPackage.copyFrom(other.nextPackage); + clientData.copyFrom(other.clientData); + totalDamages.copyFrom(other.totalDamages); + activeSecondaryIds.copyFrom(other.activeSecondaryIds); + towerGrowthNodes.copyFrom(other.towerGrowthNodes); + chars.copyFrom(other.chars); + discs.copyFrom(other.discs); + } + return this; + } + + @Override + public StarTowerMeta mergeFrom(final StarTowerMeta other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasCharHp()) { + setCharHp(other.charHp); + } + if (other.hasTeamLevel()) { + setTeamLevel(other.teamLevel); + } + if (other.hasTeamExp()) { + setTeamExp(other.teamExp); + } + if (other.hasDateLen()) { + setDateLen(other.dateLen); + } + if (other.hasNPCInteractions()) { + setNPCInteractions(other.nPCInteractions); + } + if (other.hasResurrectionCnt()) { + setResurrectionCnt(other.resurrectionCnt); + } + if (other.hasTotalTime()) { + setTotalTime(other.totalTime); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasClientData()) { + getMutableClientDataBytes().copyFrom(other.clientData); + } + if (other.hasTotalDamages()) { + getMutableTotalDamages().addAll(other.totalDamages); + } + if (other.hasActiveSecondaryIds()) { + getMutableActiveSecondaryIds().addAll(other.activeSecondaryIds); + } + if (other.hasTowerGrowthNodes()) { + getMutableTowerGrowthNodes().addAll(other.towerGrowthNodes); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + if (other.hasDiscs()) { + getMutableDiscs().addAll(other.discs); + } + return this; + } + + @Override + public StarTowerMeta clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + charHp = 0; + teamLevel = 0; + teamExp = 0; + dateLen = 0; + nPCInteractions = 0; + resurrectionCnt = 0; + totalTime = 0; + nextPackage.clear(); + clientData.clear(); + totalDamages.clear(); + activeSecondaryIds.clear(); + towerGrowthNodes.clear(); + chars.clear(); + discs.clear(); + return this; + } + + @Override + public StarTowerMeta clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + clientData.clear(); + totalDamages.clear(); + activeSecondaryIds.clear(); + towerGrowthNodes.clear(); + chars.clearQuick(); + discs.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerMeta)) { + return false; + } + StarTowerMeta other = (StarTowerMeta) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasCharHp() || charHp == other.charHp) + && (!hasTeamLevel() || teamLevel == other.teamLevel) + && (!hasTeamExp() || teamExp == other.teamExp) + && (!hasDateLen() || dateLen == other.dateLen) + && (!hasNPCInteractions() || nPCInteractions == other.nPCInteractions) + && (!hasResurrectionCnt() || resurrectionCnt == other.resurrectionCnt) + && (!hasTotalTime() || totalTime == other.totalTime) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasClientData() || clientData.equals(other.clientData)) + && (!hasTotalDamages() || totalDamages.equals(other.totalDamages)) + && (!hasActiveSecondaryIds() || activeSecondaryIds.equals(other.activeSecondaryIds)) + && (!hasTowerGrowthNodes() || towerGrowthNodes.equals(other.towerGrowthNodes)) + && (!hasChars() || chars.equals(other.chars)) + && (!hasDiscs() || discs.equals(other.discs)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 384); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(charHp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(teamLevel); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(teamExp); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(dateLen); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(nPCInteractions); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(resurrectionCnt); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(totalTime); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 66); + output.writeStringNoTag(clientData); + } + if ((bitField0_ & 0x00000800) != 0) { + for (int i = 0; i < totalDamages.length(); i++) { + output.writeRawByte((byte) 120); + output.writeUInt64NoTag(totalDamages.array()[i]); + } + } + if ((bitField0_ & 0x00001000) != 0) { + for (int i = 0; i < activeSecondaryIds.length(); i++) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(activeSecondaryIds.array()[i]); + } + } + if ((bitField0_ & 0x00002000) != 0) { + for (int i = 0; i < towerGrowthNodes.length(); i++) { + output.writeRawByte((byte) 88); + output.writeUInt32NoTag(towerGrowthNodes.array()[i]); + } + } + if ((bitField0_ & 0x00004000) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(chars.get(i)); + } + } + if ((bitField0_ & 0x00008000) != 0) { + for (int i = 0; i < discs.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(discs.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charHp); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(teamLevel); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(teamExp); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(dateLen); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(nPCInteractions); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(resurrectionCnt); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(totalTime); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(clientData); + } + if ((bitField0_ & 0x00000800) != 0) { + size += (1 * totalDamages.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(totalDamages); + } + if ((bitField0_ & 0x00001000) != 0) { + size += (1 * activeSecondaryIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(activeSecondaryIds); + } + if ((bitField0_ & 0x00002000) != 0) { + size += (1 * towerGrowthNodes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(towerGrowthNodes); + } + if ((bitField0_ & 0x00004000) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + if ((bitField0_ & 0x00008000) != 0) { + size += (1 * discs.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(discs); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerMeta mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 128: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // charHp + charHp = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // teamLevel + teamLevel = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // teamExp + teamExp = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // dateLen + dateLen = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 80) { + break; + } + } + case 80: { + // nPCInteractions + nPCInteractions = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 96) { + break; + } + } + case 96: { + // resurrectionCnt + resurrectionCnt = input.readUInt32(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // totalTime + totalTime = input.readUInt32(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // clientData + input.readString(clientData); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // totalDamages [packed=true] + input.readPackedUInt64(totalDamages, tag); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // activeSecondaryIds [packed=true] + input.readPackedUInt32(activeSecondaryIds, tag); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 90) { + break; + } + } + case 90: { + // towerGrowthNodes [packed=true] + input.readPackedUInt32(towerGrowthNodes, tag); + bitField0_ |= 0x00002000; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x00004000; + if (tag != 50) { + break; + } + } + case 50: { + // discs + tag = input.readRepeatedMessage(discs, tag); + bitField0_ |= 0x00008000; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 120: { + // totalDamages [packed=false] + tag = input.readRepeatedUInt64(totalDamages, tag); + bitField0_ |= 0x00000800; + break; + } + case 72: { + // activeSecondaryIds [packed=false] + tag = input.readRepeatedUInt32(activeSecondaryIds, tag); + bitField0_ |= 0x00001000; + break; + } + case 88: { + // towerGrowthNodes [packed=false] + tag = input.readRepeatedUInt32(towerGrowthNodes, tag); + bitField0_ |= 0x00002000; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.charHp, charHp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.teamLevel, teamLevel); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.teamExp, teamExp); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.dateLen, dateLen); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.nPCInteractions, nPCInteractions); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeUInt32(FieldNames.resurrectionCnt, resurrectionCnt); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeUInt32(FieldNames.totalTime, totalTime); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeString(FieldNames.clientData, clientData); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRepeatedUInt64(FieldNames.totalDamages, totalDamages); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRepeatedUInt32(FieldNames.activeSecondaryIds, activeSecondaryIds); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRepeatedUInt32(FieldNames.towerGrowthNodes, towerGrowthNodes); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeRepeatedMessage(FieldNames.discs, discs); + } + output.endObject(); + } + + @Override + public StarTowerMeta mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017200926: { + if (input.isAtField(FieldNames.charHp)) { + if (!input.trySkipNullValue()) { + charHp = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1810266887: { + if (input.isAtField(FieldNames.teamLevel)) { + if (!input.trySkipNullValue()) { + teamLevel = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 225341024: { + if (input.isAtField(FieldNames.teamExp)) { + if (!input.trySkipNullValue()) { + teamExp = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1187017881: { + if (input.isAtField(FieldNames.dateLen)) { + if (!input.trySkipNullValue()) { + dateLen = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1146200574: { + if (input.isAtField(FieldNames.nPCInteractions)) { + if (!input.trySkipNullValue()) { + nPCInteractions = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 21242370: { + if (input.isAtField(FieldNames.resurrectionCnt)) { + if (!input.trySkipNullValue()) { + resurrectionCnt = input.readUInt32(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1426685969: { + if (input.isAtField(FieldNames.totalTime)) { + if (!input.trySkipNullValue()) { + totalTime = input.readUInt32(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1199548875: { + if (input.isAtField(FieldNames.clientData)) { + if (!input.trySkipNullValue()) { + input.readString(clientData); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2138865888: { + if (input.isAtField(FieldNames.totalDamages)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(totalDamages); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1499070186: { + if (input.isAtField(FieldNames.activeSecondaryIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(activeSecondaryIds); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -727074175: { + if (input.isAtField(FieldNames.towerGrowthNodes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(towerGrowthNodes); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x00004000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 66041182: { + if (input.isAtField(FieldNames.discs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(discs); + bitField0_ |= 0x00008000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerMeta clone() { + return new StarTowerMeta().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerMeta parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerMeta(), data).checkInitialized(); + } + + public static StarTowerMeta parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerMeta(), input).checkInitialized(); + } + + public static StarTowerMeta parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerMeta(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerMeta messages + */ + public static MessageFactory<StarTowerMeta> getFactory() { + return StarTowerMetaFactory.INSTANCE; + } + + private enum StarTowerMetaFactory implements MessageFactory<StarTowerMeta> { + INSTANCE; + + @Override + public StarTowerMeta create() { + return StarTowerMeta.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName charHp = FieldName.forField("CharHp"); + + static final FieldName teamLevel = FieldName.forField("TeamLevel"); + + static final FieldName teamExp = FieldName.forField("TeamExp"); + + static final FieldName dateLen = FieldName.forField("DateLen"); + + static final FieldName nPCInteractions = FieldName.forField("NPCInteractions"); + + static final FieldName resurrectionCnt = FieldName.forField("ResurrectionCnt"); + + static final FieldName totalTime = FieldName.forField("TotalTime"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName clientData = FieldName.forField("ClientData"); + + static final FieldName totalDamages = FieldName.forField("TotalDamages"); + + static final FieldName activeSecondaryIds = FieldName.forField("ActiveSecondaryIds"); + + static final FieldName towerGrowthNodes = FieldName.forField("TowerGrowthNodes"); + + static final FieldName chars = FieldName.forField("Chars"); + + static final FieldName discs = FieldName.forField("Discs"); + } + } + + /** + * Protobuf type {@code StarTowerDisc} + */ + public static final class StarTowerDisc extends ProtoMessage<StarTowerDisc> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional uint32 Phase = 3;</code> + */ + private int phase; + + /** + * <code>optional uint32 Star = 4;</code> + */ + private int star; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerDisc() { + } + + /** + * @return a new empty instance of {@code StarTowerDisc} + */ + public static StarTowerDisc newInstance() { + return new StarTowerDisc(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerDisc clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerDisc setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return this + */ + public StarTowerDisc clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public StarTowerDisc setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * <code>optional uint32 Phase = 3;</code> + * @return whether the phase field is set + */ + public boolean hasPhase() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Phase = 3;</code> + * @return this + */ + public StarTowerDisc clearPhase() { + bitField0_ &= ~0x00000004; + phase = 0; + return this; + } + + /** + * <code>optional uint32 Phase = 3;</code> + * @return the phase + */ + public int getPhase() { + return phase; + } + + /** + * <code>optional uint32 Phase = 3;</code> + * @param value the phase to set + * @return this + */ + public StarTowerDisc setPhase(final int value) { + bitField0_ |= 0x00000004; + phase = value; + return this; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @return this + */ + public StarTowerDisc clearStar() { + bitField0_ &= ~0x00000008; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 4;</code> + * @param value the star to set + * @return this + */ + public StarTowerDisc setStar(final int value) { + bitField0_ |= 0x00000008; + star = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerDisc clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerDisc addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerDisc addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerDisc setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerDisc copyFrom(final StarTowerDisc other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + level = other.level; + phase = other.phase; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerDisc mergeFrom(final StarTowerDisc other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasPhase()) { + setPhase(other.phase); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerDisc clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + level = 0; + phase = 0; + star = 0; + nextPackage.clear(); + return this; + } + + @Override + public StarTowerDisc clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerDisc)) { + return false; + } + StarTowerDisc other = (StarTowerDisc) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasLevel() || level == other.level) + && (!hasPhase() || phase == other.phase) + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(phase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(phase); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerDisc mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // phase + phase = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.phase, phase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerDisc mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 77076827: { + if (input.isAtField(FieldNames.phase)) { + if (!input.trySkipNullValue()) { + phase = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerDisc clone() { + return new StarTowerDisc().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerDisc parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerDisc(), data).checkInitialized(); + } + + public static StarTowerDisc parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerDisc(), input).checkInitialized(); + } + + public static StarTowerDisc parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerDisc(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerDisc messages + */ + public static MessageFactory<StarTowerDisc> getFactory() { + return StarTowerDiscFactory.INSTANCE; + } + + private enum StarTowerDiscFactory implements MessageFactory<StarTowerDisc> { + INSTANCE; + + @Override + public StarTowerDisc create() { + return StarTowerDisc.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName phase = FieldName.forField("Phase"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerChar} + */ + public static final class StarTowerChar extends ProtoMessage<StarTowerChar> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Level = 3;</code> + */ + private int level; + + /** + * <code>optional uint32 AffinityLevel = 5;</code> + */ + private int affinityLevel; + + /** + * <code>optional uint32 Advance = 6;</code> + */ + private int advance; + + /** + * <code>optional bytes TalentNodes = 7;</code> + */ + private final RepeatedByte talentNodes = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 SkillLvs = 4;</code> + */ + private final RepeatedInt skillLvs = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .StarTowerCharGem Gems = 2;</code> + */ + private final RepeatedMessage<StarTowerCharGem> gems = RepeatedMessage.newEmptyInstance(StarTowerCharGem.getFactory()); + + private StarTowerChar() { + } + + /** + * @return a new empty instance of {@code StarTowerChar} + */ + public static StarTowerChar newInstance() { + return new StarTowerChar(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerChar clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerChar setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Level = 3;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Level = 3;</code> + * @return this + */ + public StarTowerChar clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 3;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 3;</code> + * @param value the level to set + * @return this + */ + public StarTowerChar setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * <code>optional uint32 AffinityLevel = 5;</code> + * @return whether the affinityLevel field is set + */ + public boolean hasAffinityLevel() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 AffinityLevel = 5;</code> + * @return this + */ + public StarTowerChar clearAffinityLevel() { + bitField0_ &= ~0x00000004; + affinityLevel = 0; + return this; + } + + /** + * <code>optional uint32 AffinityLevel = 5;</code> + * @return the affinityLevel + */ + public int getAffinityLevel() { + return affinityLevel; + } + + /** + * <code>optional uint32 AffinityLevel = 5;</code> + * @param value the affinityLevel to set + * @return this + */ + public StarTowerChar setAffinityLevel(final int value) { + bitField0_ |= 0x00000004; + affinityLevel = value; + return this; + } + + /** + * <code>optional uint32 Advance = 6;</code> + * @return whether the advance field is set + */ + public boolean hasAdvance() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Advance = 6;</code> + * @return this + */ + public StarTowerChar clearAdvance() { + bitField0_ &= ~0x00000008; + advance = 0; + return this; + } + + /** + * <code>optional uint32 Advance = 6;</code> + * @return the advance + */ + public int getAdvance() { + return advance; + } + + /** + * <code>optional uint32 Advance = 6;</code> + * @param value the advance to set + * @return this + */ + public StarTowerChar setAdvance(final int value) { + bitField0_ |= 0x00000008; + advance = value; + return this; + } + + /** + * <code>optional bytes TalentNodes = 7;</code> + * @return whether the talentNodes field is set + */ + public boolean hasTalentNodes() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes TalentNodes = 7;</code> + * @return this + */ + public StarTowerChar clearTalentNodes() { + bitField0_ &= ~0x00000010; + talentNodes.clear(); + return this; + } + + /** + * <code>optional bytes TalentNodes = 7;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTalentNodes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getTalentNodes() { + return talentNodes; + } + + /** + * <code>optional bytes TalentNodes = 7;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableTalentNodes() { + bitField0_ |= 0x00000010; + return talentNodes; + } + + /** + * <code>optional bytes TalentNodes = 7;</code> + * @param value the talentNodes to add + * @return this + */ + public StarTowerChar addTalentNodes(final byte value) { + bitField0_ |= 0x00000010; + talentNodes.add(value); + return this; + } + + /** + * <code>optional bytes TalentNodes = 7;</code> + * @param values the talentNodes to add + * @return this + */ + public StarTowerChar addAllTalentNodes(final byte... values) { + bitField0_ |= 0x00000010; + talentNodes.addAll(values); + return this; + } + + /** + * <code>optional bytes TalentNodes = 7;</code> + * @param values the talentNodes to set + * @return this + */ + public StarTowerChar setTalentNodes(final byte... values) { + bitField0_ |= 0x00000010; + talentNodes.copyFrom(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerChar clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerChar addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerChar addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerChar setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 SkillLvs = 4;</code> + * @return whether the skillLvs field is set + */ + public boolean hasSkillLvs() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated uint32 SkillLvs = 4;</code> + * @return this + */ + public StarTowerChar clearSkillLvs() { + bitField0_ &= ~0x00000040; + skillLvs.clear(); + return this; + } + + /** + * <code>repeated uint32 SkillLvs = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSkillLvs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getSkillLvs() { + return skillLvs; + } + + /** + * <code>repeated uint32 SkillLvs = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableSkillLvs() { + bitField0_ |= 0x00000040; + return skillLvs; + } + + /** + * <code>repeated uint32 SkillLvs = 4;</code> + * @param value the skillLvs to add + * @return this + */ + public StarTowerChar addSkillLvs(final int value) { + bitField0_ |= 0x00000040; + skillLvs.add(value); + return this; + } + + /** + * <code>repeated uint32 SkillLvs = 4;</code> + * @param values the skillLvs to add + * @return this + */ + public StarTowerChar addAllSkillLvs(final int... values) { + bitField0_ |= 0x00000040; + skillLvs.addAll(values); + return this; + } + + /** + * <code>repeated .StarTowerCharGem Gems = 2;</code> + * @return whether the gems field is set + */ + public boolean hasGems() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>repeated .StarTowerCharGem Gems = 2;</code> + * @return this + */ + public StarTowerChar clearGems() { + bitField0_ &= ~0x00000080; + gems.clear(); + return this; + } + + /** + * <code>repeated .StarTowerCharGem Gems = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableGems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StarTowerCharGem> getGems() { + return gems; + } + + /** + * <code>repeated .StarTowerCharGem Gems = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StarTowerCharGem> getMutableGems() { + bitField0_ |= 0x00000080; + return gems; + } + + /** + * <code>repeated .StarTowerCharGem Gems = 2;</code> + * @param value the gems to add + * @return this + */ + public StarTowerChar addGems(final StarTowerCharGem value) { + bitField0_ |= 0x00000080; + gems.add(value); + return this; + } + + /** + * <code>repeated .StarTowerCharGem Gems = 2;</code> + * @param values the gems to add + * @return this + */ + public StarTowerChar addAllGems(final StarTowerCharGem... values) { + bitField0_ |= 0x00000080; + gems.addAll(values); + return this; + } + + @Override + public StarTowerChar copyFrom(final StarTowerChar other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + level = other.level; + affinityLevel = other.affinityLevel; + advance = other.advance; + talentNodes.copyFrom(other.talentNodes); + nextPackage.copyFrom(other.nextPackage); + skillLvs.copyFrom(other.skillLvs); + gems.copyFrom(other.gems); + } + return this; + } + + @Override + public StarTowerChar mergeFrom(final StarTowerChar other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasAffinityLevel()) { + setAffinityLevel(other.affinityLevel); + } + if (other.hasAdvance()) { + setAdvance(other.advance); + } + if (other.hasTalentNodes()) { + getMutableTalentNodes().copyFrom(other.talentNodes); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSkillLvs()) { + getMutableSkillLvs().addAll(other.skillLvs); + } + if (other.hasGems()) { + getMutableGems().addAll(other.gems); + } + return this; + } + + @Override + public StarTowerChar clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + level = 0; + affinityLevel = 0; + advance = 0; + talentNodes.clear(); + nextPackage.clear(); + skillLvs.clear(); + gems.clear(); + return this; + } + + @Override + public StarTowerChar clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + talentNodes.clear(); + nextPackage.clear(); + skillLvs.clear(); + gems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerChar)) { + return false; + } + StarTowerChar other = (StarTowerChar) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasLevel() || level == other.level) + && (!hasAffinityLevel() || affinityLevel == other.affinityLevel) + && (!hasAdvance() || advance == other.advance) + && (!hasTalentNodes() || talentNodes.equals(other.talentNodes)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSkillLvs() || skillLvs.equals(other.skillLvs)) + && (!hasGems() || gems.equals(other.gems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(affinityLevel); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(advance); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 58); + output.writeBytesNoTag(talentNodes); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < skillLvs.length(); i++) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(skillLvs.array()[i]); + } + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < gems.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(gems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinityLevel); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(advance); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(talentNodes); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * skillLvs.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(skillLvs); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * gems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(gems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerChar mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // affinityLevel + affinityLevel = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // advance + advance = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // talentNodes + input.readBytes(talentNodes); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // skillLvs [packed=true] + input.readPackedUInt32(skillLvs, tag); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // gems + tag = input.readRepeatedMessage(gems, tag); + bitField0_ |= 0x00000080; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 32: { + // skillLvs [packed=false] + tag = input.readRepeatedUInt32(skillLvs, tag); + bitField0_ |= 0x00000040; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.affinityLevel, affinityLevel); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.advance, advance); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.talentNodes, talentNodes); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedUInt32(FieldNames.skillLvs, skillLvs); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedMessage(FieldNames.gems, gems); + } + output.endObject(); + } + + @Override + public StarTowerChar mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1094331164: { + if (input.isAtField(FieldNames.affinityLevel)) { + if (!input.trySkipNullValue()) { + affinityLevel = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 533086306: { + if (input.isAtField(FieldNames.advance)) { + if (!input.trySkipNullValue()) { + advance = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2029178117: { + if (input.isAtField(FieldNames.talentNodes)) { + if (!input.trySkipNullValue()) { + input.readBytes(talentNodes); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2087888840: { + if (input.isAtField(FieldNames.skillLvs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(skillLvs); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2215716: { + if (input.isAtField(FieldNames.gems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(gems); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerChar clone() { + return new StarTowerChar().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerChar parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerChar(), data).checkInitialized(); + } + + public static StarTowerChar parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerChar(), input).checkInitialized(); + } + + public static StarTowerChar parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerChar(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerChar messages + */ + public static MessageFactory<StarTowerChar> getFactory() { + return StarTowerCharFactory.INSTANCE; + } + + private enum StarTowerCharFactory implements MessageFactory<StarTowerChar> { + INSTANCE; + + @Override + public StarTowerChar create() { + return StarTowerChar.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName affinityLevel = FieldName.forField("AffinityLevel"); + + static final FieldName advance = FieldName.forField("Advance"); + + static final FieldName talentNodes = FieldName.forField("TalentNodes"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName skillLvs = FieldName.forField("SkillLvs"); + + static final FieldName gems = FieldName.forField("Gems"); + } + } + + /** + * Protobuf type {@code StarTowerCharGem} + */ + public static final class StarTowerCharGem extends ProtoMessage<StarTowerCharGem> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 SlotId = 2;</code> + */ + private int slotId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Attributes = 1;</code> + */ + private final RepeatedInt attributes = RepeatedInt.newEmptyInstance(); + + private StarTowerCharGem() { + } + + /** + * @return a new empty instance of {@code StarTowerCharGem} + */ + public static StarTowerCharGem newInstance() { + return new StarTowerCharGem(); + } + + /** + * <code>optional uint32 SlotId = 2;</code> + * @return whether the slotId field is set + */ + public boolean hasSlotId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 SlotId = 2;</code> + * @return this + */ + public StarTowerCharGem clearSlotId() { + bitField0_ &= ~0x00000001; + slotId = 0; + return this; + } + + /** + * <code>optional uint32 SlotId = 2;</code> + * @return the slotId + */ + public int getSlotId() { + return slotId; + } + + /** + * <code>optional uint32 SlotId = 2;</code> + * @param value the slotId to set + * @return this + */ + public StarTowerCharGem setSlotId(final int value) { + bitField0_ |= 0x00000001; + slotId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerCharGem clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerCharGem addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerCharGem addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerCharGem setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Attributes = 1;</code> + * @return whether the attributes field is set + */ + public boolean hasAttributes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Attributes = 1;</code> + * @return this + */ + public StarTowerCharGem clearAttributes() { + bitField0_ &= ~0x00000004; + attributes.clear(); + return this; + } + + /** + * <code>repeated uint32 Attributes = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAttributes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getAttributes() { + return attributes; + } + + /** + * <code>repeated uint32 Attributes = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableAttributes() { + bitField0_ |= 0x00000004; + return attributes; + } + + /** + * <code>repeated uint32 Attributes = 1;</code> + * @param value the attributes to add + * @return this + */ + public StarTowerCharGem addAttributes(final int value) { + bitField0_ |= 0x00000004; + attributes.add(value); + return this; + } + + /** + * <code>repeated uint32 Attributes = 1;</code> + * @param values the attributes to add + * @return this + */ + public StarTowerCharGem addAllAttributes(final int... values) { + bitField0_ |= 0x00000004; + attributes.addAll(values); + return this; + } + + @Override + public StarTowerCharGem copyFrom(final StarTowerCharGem other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + slotId = other.slotId; + nextPackage.copyFrom(other.nextPackage); + attributes.copyFrom(other.attributes); + } + return this; + } + + @Override + public StarTowerCharGem mergeFrom(final StarTowerCharGem other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSlotId()) { + setSlotId(other.slotId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAttributes()) { + getMutableAttributes().addAll(other.attributes); + } + return this; + } + + @Override + public StarTowerCharGem clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + slotId = 0; + nextPackage.clear(); + attributes.clear(); + return this; + } + + @Override + public StarTowerCharGem clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + attributes.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerCharGem)) { + return false; + } + StarTowerCharGem other = (StarTowerCharGem) o; + return bitField0_ == other.bitField0_ + && (!hasSlotId() || slotId == other.slotId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAttributes() || attributes.equals(other.attributes)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(slotId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < attributes.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(attributes.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(slotId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * attributes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(attributes); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerCharGem mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // slotId + slotId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // attributes [packed=true] + input.readPackedUInt32(attributes, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // attributes [packed=false] + tag = input.readRepeatedUInt32(attributes, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.slotId, slotId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.attributes, attributes); + } + output.endObject(); + } + + @Override + public StarTowerCharGem mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1815586855: { + if (input.isAtField(FieldNames.slotId)) { + if (!input.trySkipNullValue()) { + slotId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1895856777: { + if (input.isAtField(FieldNames.attributes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(attributes); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerCharGem clone() { + return new StarTowerCharGem().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerCharGem parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerCharGem(), data).checkInitialized(); + } + + public static StarTowerCharGem parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerCharGem(), input).checkInitialized(); + } + + public static StarTowerCharGem parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerCharGem(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerCharGem messages + */ + public static MessageFactory<StarTowerCharGem> getFactory() { + return StarTowerCharGemFactory.INSTANCE; + } + + private enum StarTowerCharGemFactory implements MessageFactory<StarTowerCharGem> { + INSTANCE; + + @Override + public StarTowerCharGem create() { + return StarTowerCharGem.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName slotId = FieldName.forField("SlotId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName attributes = FieldName.forField("Attributes"); + } + } + + /** + * Protobuf type {@code StarTowerBag} + */ + public static final class StarTowerBag extends ProtoMessage<StarTowerBag> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .FateCardInfo FateCard = 1;</code> + */ + private final RepeatedMessage<FateCardInfo> fateCard = RepeatedMessage.newEmptyInstance(FateCardInfo.getFactory()); + + /** + * <code>repeated .PotentialInfo Potentials = 2;</code> + */ + private final RepeatedMessage<PotentialInfo> potentials = RepeatedMessage.newEmptyInstance(PotentialInfo.getFactory()); + + /** + * <code>repeated .TowerItemInfo Items = 3;</code> + */ + private final RepeatedMessage<TowerItemInfo> items = RepeatedMessage.newEmptyInstance(TowerItemInfo.getFactory()); + + /** + * <code>repeated .TowerResInfo Res = 4;</code> + */ + private final RepeatedMessage<TowerResInfo> res = RepeatedMessage.newEmptyInstance(TowerResInfo.getFactory()); + + private StarTowerBag() { + } + + /** + * @return a new empty instance of {@code StarTowerBag} + */ + public static StarTowerBag newInstance() { + return new StarTowerBag(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBag clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBag addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBag addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBag setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .FateCardInfo FateCard = 1;</code> + * @return whether the fateCard field is set + */ + public boolean hasFateCard() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .FateCardInfo FateCard = 1;</code> + * @return this + */ + public StarTowerBag clearFateCard() { + bitField0_ &= ~0x00000002; + fateCard.clear(); + return this; + } + + /** + * <code>repeated .FateCardInfo FateCard = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFateCard()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<FateCardInfo> getFateCard() { + return fateCard; + } + + /** + * <code>repeated .FateCardInfo FateCard = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<FateCardInfo> getMutableFateCard() { + bitField0_ |= 0x00000002; + return fateCard; + } + + /** + * <code>repeated .FateCardInfo FateCard = 1;</code> + * @param value the fateCard to add + * @return this + */ + public StarTowerBag addFateCard(final FateCardInfo value) { + bitField0_ |= 0x00000002; + fateCard.add(value); + return this; + } + + /** + * <code>repeated .FateCardInfo FateCard = 1;</code> + * @param values the fateCard to add + * @return this + */ + public StarTowerBag addAllFateCard(final FateCardInfo... values) { + bitField0_ |= 0x00000002; + fateCard.addAll(values); + return this; + } + + /** + * <code>repeated .PotentialInfo Potentials = 2;</code> + * @return whether the potentials field is set + */ + public boolean hasPotentials() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .PotentialInfo Potentials = 2;</code> + * @return this + */ + public StarTowerBag clearPotentials() { + bitField0_ &= ~0x00000004; + potentials.clear(); + return this; + } + + /** + * <code>repeated .PotentialInfo Potentials = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePotentials()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PotentialInfo> getPotentials() { + return potentials; + } + + /** + * <code>repeated .PotentialInfo Potentials = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PotentialInfo> getMutablePotentials() { + bitField0_ |= 0x00000004; + return potentials; + } + + /** + * <code>repeated .PotentialInfo Potentials = 2;</code> + * @param value the potentials to add + * @return this + */ + public StarTowerBag addPotentials(final PotentialInfo value) { + bitField0_ |= 0x00000004; + potentials.add(value); + return this; + } + + /** + * <code>repeated .PotentialInfo Potentials = 2;</code> + * @param values the potentials to add + * @return this + */ + public StarTowerBag addAllPotentials(final PotentialInfo... values) { + bitField0_ |= 0x00000004; + potentials.addAll(values); + return this; + } + + /** + * <code>repeated .TowerItemInfo Items = 3;</code> + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .TowerItemInfo Items = 3;</code> + * @return this + */ + public StarTowerBag clearItems() { + bitField0_ &= ~0x00000008; + items.clear(); + return this; + } + + /** + * <code>repeated .TowerItemInfo Items = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<TowerItemInfo> getItems() { + return items; + } + + /** + * <code>repeated .TowerItemInfo Items = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<TowerItemInfo> getMutableItems() { + bitField0_ |= 0x00000008; + return items; + } + + /** + * <code>repeated .TowerItemInfo Items = 3;</code> + * @param value the items to add + * @return this + */ + public StarTowerBag addItems(final TowerItemInfo value) { + bitField0_ |= 0x00000008; + items.add(value); + return this; + } + + /** + * <code>repeated .TowerItemInfo Items = 3;</code> + * @param values the items to add + * @return this + */ + public StarTowerBag addAllItems(final TowerItemInfo... values) { + bitField0_ |= 0x00000008; + items.addAll(values); + return this; + } + + /** + * <code>repeated .TowerResInfo Res = 4;</code> + * @return whether the res field is set + */ + public boolean hasRes() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .TowerResInfo Res = 4;</code> + * @return this + */ + public StarTowerBag clearRes() { + bitField0_ &= ~0x00000010; + res.clear(); + return this; + } + + /** + * <code>repeated .TowerResInfo Res = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<TowerResInfo> getRes() { + return res; + } + + /** + * <code>repeated .TowerResInfo Res = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<TowerResInfo> getMutableRes() { + bitField0_ |= 0x00000010; + return res; + } + + /** + * <code>repeated .TowerResInfo Res = 4;</code> + * @param value the res to add + * @return this + */ + public StarTowerBag addRes(final TowerResInfo value) { + bitField0_ |= 0x00000010; + res.add(value); + return this; + } + + /** + * <code>repeated .TowerResInfo Res = 4;</code> + * @param values the res to add + * @return this + */ + public StarTowerBag addAllRes(final TowerResInfo... values) { + bitField0_ |= 0x00000010; + res.addAll(values); + return this; + } + + @Override + public StarTowerBag copyFrom(final StarTowerBag other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + fateCard.copyFrom(other.fateCard); + potentials.copyFrom(other.potentials); + items.copyFrom(other.items); + res.copyFrom(other.res); + } + return this; + } + + @Override + public StarTowerBag mergeFrom(final StarTowerBag other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasFateCard()) { + getMutableFateCard().addAll(other.fateCard); + } + if (other.hasPotentials()) { + getMutablePotentials().addAll(other.potentials); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + if (other.hasRes()) { + getMutableRes().addAll(other.res); + } + return this; + } + + @Override + public StarTowerBag clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + fateCard.clear(); + potentials.clear(); + items.clear(); + res.clear(); + return this; + } + + @Override + public StarTowerBag clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + fateCard.clearQuick(); + potentials.clearQuick(); + items.clearQuick(); + res.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBag)) { + return false; + } + StarTowerBag other = (StarTowerBag) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasFateCard() || fateCard.equals(other.fateCard)) + && (!hasPotentials() || potentials.equals(other.potentials)) + && (!hasItems() || items.equals(other.items)) + && (!hasRes() || res.equals(other.res)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < fateCard.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(fateCard.get(i)); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < potentials.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(potentials.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(items.get(i)); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < res.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(res.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * fateCard.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(fateCard); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * potentials.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(potentials); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * res.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(res); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBag mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // fateCard + tag = input.readRepeatedMessage(fateCard, tag); + bitField0_ |= 0x00000002; + if (tag != 18) { + break; + } + } + case 18: { + // potentials + tag = input.readRepeatedMessage(potentials, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000008; + if (tag != 34) { + break; + } + } + case 34: { + // res + tag = input.readRepeatedMessage(res, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.fateCard, fateCard); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.potentials, potentials); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.res, res); + } + output.endObject(); + } + + @Override + public StarTowerBag mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1047532988: { + if (input.isAtField(FieldNames.fateCard)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(fateCard); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1405493301: { + if (input.isAtField(FieldNames.potentials)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(potentials); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 82048: { + if (input.isAtField(FieldNames.res)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(res); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBag clone() { + return new StarTowerBag().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBag parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBag(), data).checkInitialized(); + } + + public static StarTowerBag parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBag(), input).checkInitialized(); + } + + public static StarTowerBag parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBag(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBag messages + */ + public static MessageFactory<StarTowerBag> getFactory() { + return StarTowerBagFactory.INSTANCE; + } + + private enum StarTowerBagFactory implements MessageFactory<StarTowerBag> { + INSTANCE; + + @Override + public StarTowerBag create() { + return StarTowerBag.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName fateCard = FieldName.forField("FateCard"); + + static final FieldName potentials = FieldName.forField("Potentials"); + + static final FieldName items = FieldName.forField("Items"); + + static final FieldName res = FieldName.forField("Res"); + } + } + + /** + * Protobuf type {@code StarTowerRoom} + */ + public static final class StarTowerRoom extends ProtoMessage<StarTowerRoom> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .StarTowerRoomData Data = 1;</code> + */ + private final StarTowerRoomData data = StarTowerRoomData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + */ + private final RepeatedMessage<StarTowerRoomCase> cases = RepeatedMessage.newEmptyInstance(StarTowerRoomCase.getFactory()); + + private StarTowerRoom() { + } + + /** + * @return a new empty instance of {@code StarTowerRoom} + */ + public static StarTowerRoom newInstance() { + return new StarTowerRoom(); + } + + /** + * <code>optional .StarTowerRoomData Data = 1;</code> + * @return whether the data field is set + */ + public boolean hasData() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .StarTowerRoomData Data = 1;</code> + * @return this + */ + public StarTowerRoom clearData() { + bitField0_ &= ~0x00000001; + data.clear(); + return this; + } + + /** + * <code>optional .StarTowerRoomData Data = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableData()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerRoomData getData() { + return data; + } + + /** + * <code>optional .StarTowerRoomData Data = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerRoomData getMutableData() { + bitField0_ |= 0x00000001; + return data; + } + + /** + * <code>optional .StarTowerRoomData Data = 1;</code> + * @param value the data to set + * @return this + */ + public StarTowerRoom setData(final StarTowerRoomData value) { + bitField0_ |= 0x00000001; + data.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerRoom clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerRoom addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerRoom addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerRoom setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @return whether the cases field is set + */ + public boolean hasCases() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @return this + */ + public StarTowerRoom clearCases() { + bitField0_ &= ~0x00000004; + cases.clear(); + return this; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCases()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StarTowerRoomCase> getCases() { + return cases; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StarTowerRoomCase> getMutableCases() { + bitField0_ |= 0x00000004; + return cases; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @param value the cases to add + * @return this + */ + public StarTowerRoom addCases(final StarTowerRoomCase value) { + bitField0_ |= 0x00000004; + cases.add(value); + return this; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @param values the cases to add + * @return this + */ + public StarTowerRoom addAllCases(final StarTowerRoomCase... values) { + bitField0_ |= 0x00000004; + cases.addAll(values); + return this; + } + + @Override + public StarTowerRoom copyFrom(final StarTowerRoom other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + data.copyFrom(other.data); + nextPackage.copyFrom(other.nextPackage); + cases.copyFrom(other.cases); + } + return this; + } + + @Override + public StarTowerRoom mergeFrom(final StarTowerRoom other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasData()) { + getMutableData().mergeFrom(other.data); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCases()) { + getMutableCases().addAll(other.cases); + } + return this; + } + + @Override + public StarTowerRoom clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + data.clear(); + nextPackage.clear(); + cases.clear(); + return this; + } + + @Override + public StarTowerRoom clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + data.clearQuick(); + nextPackage.clear(); + cases.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerRoom)) { + return false; + } + StarTowerRoom other = (StarTowerRoom) o; + return bitField0_ == other.bitField0_ + && (!hasData() || data.equals(other.data)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCases() || cases.equals(other.cases)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(data); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < cases.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(cases.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(data); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * cases.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(cases); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerRoom mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // data + input.readMessage(data); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // cases + tag = input.readRepeatedMessage(cases, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.data, data); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.cases, cases); + } + output.endObject(); + } + + @Override + public StarTowerRoom mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2122698: { + if (input.isAtField(FieldNames.data)) { + if (!input.trySkipNullValue()) { + input.readMessage(data); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64879395: { + if (input.isAtField(FieldNames.cases)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(cases); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerRoom clone() { + return new StarTowerRoom().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerRoom parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerRoom(), data).checkInitialized(); + } + + public static StarTowerRoom parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerRoom(), input).checkInitialized(); + } + + public static StarTowerRoom parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerRoom(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerRoom messages + */ + public static MessageFactory<StarTowerRoom> getFactory() { + return StarTowerRoomFactory.INSTANCE; + } + + private enum StarTowerRoomFactory implements MessageFactory<StarTowerRoom> { + INSTANCE; + + @Override + public StarTowerRoom create() { + return StarTowerRoom.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName data = FieldName.forField("Data"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cases = FieldName.forField("Cases"); + } + } + + /** + * Protobuf type {@code StarTowerRoomData} + */ + public static final class StarTowerRoomData extends ProtoMessage<StarTowerRoomData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Floor = 1;</code> + */ + private int floor; + + /** + * <code>optional uint32 MapId = 2;</code> + */ + private int mapId; + + /** + * <code>optional uint32 ParamId = 3;</code> + */ + private int paramId; + + /** + * <code>optional uint32 RoomType = 4;</code> + */ + private int roomType; + + /** + * <code>optional uint32 MapTableId = 6;</code> + */ + private int mapTableId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string MapParam = 5;</code> + */ + private final Utf8String mapParam = Utf8String.newEmptyInstance(); + + private StarTowerRoomData() { + } + + /** + * @return a new empty instance of {@code StarTowerRoomData} + */ + public static StarTowerRoomData newInstance() { + return new StarTowerRoomData(); + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @return this + */ + public StarTowerRoomData clearFloor() { + bitField0_ &= ~0x00000001; + floor = 0; + return this; + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @param value the floor to set + * @return this + */ + public StarTowerRoomData setFloor(final int value) { + bitField0_ |= 0x00000001; + floor = value; + return this; + } + + /** + * <code>optional uint32 MapId = 2;</code> + * @return whether the mapId field is set + */ + public boolean hasMapId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 MapId = 2;</code> + * @return this + */ + public StarTowerRoomData clearMapId() { + bitField0_ &= ~0x00000002; + mapId = 0; + return this; + } + + /** + * <code>optional uint32 MapId = 2;</code> + * @return the mapId + */ + public int getMapId() { + return mapId; + } + + /** + * <code>optional uint32 MapId = 2;</code> + * @param value the mapId to set + * @return this + */ + public StarTowerRoomData setMapId(final int value) { + bitField0_ |= 0x00000002; + mapId = value; + return this; + } + + /** + * <code>optional uint32 ParamId = 3;</code> + * @return whether the paramId field is set + */ + public boolean hasParamId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 ParamId = 3;</code> + * @return this + */ + public StarTowerRoomData clearParamId() { + bitField0_ &= ~0x00000004; + paramId = 0; + return this; + } + + /** + * <code>optional uint32 ParamId = 3;</code> + * @return the paramId + */ + public int getParamId() { + return paramId; + } + + /** + * <code>optional uint32 ParamId = 3;</code> + * @param value the paramId to set + * @return this + */ + public StarTowerRoomData setParamId(final int value) { + bitField0_ |= 0x00000004; + paramId = value; + return this; + } + + /** + * <code>optional uint32 RoomType = 4;</code> + * @return whether the roomType field is set + */ + public boolean hasRoomType() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 RoomType = 4;</code> + * @return this + */ + public StarTowerRoomData clearRoomType() { + bitField0_ &= ~0x00000008; + roomType = 0; + return this; + } + + /** + * <code>optional uint32 RoomType = 4;</code> + * @return the roomType + */ + public int getRoomType() { + return roomType; + } + + /** + * <code>optional uint32 RoomType = 4;</code> + * @param value the roomType to set + * @return this + */ + public StarTowerRoomData setRoomType(final int value) { + bitField0_ |= 0x00000008; + roomType = value; + return this; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @return whether the mapTableId field is set + */ + public boolean hasMapTableId() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @return this + */ + public StarTowerRoomData clearMapTableId() { + bitField0_ &= ~0x00000010; + mapTableId = 0; + return this; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @return the mapTableId + */ + public int getMapTableId() { + return mapTableId; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @param value the mapTableId to set + * @return this + */ + public StarTowerRoomData setMapTableId(final int value) { + bitField0_ |= 0x00000010; + mapTableId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerRoomData clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerRoomData addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerRoomData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerRoomData setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return whether the mapParam field is set + */ + public boolean hasMapParam() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return this + */ + public StarTowerRoomData clearMapParam() { + bitField0_ &= ~0x00000040; + mapParam.clear(); + return this; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return the mapParam + */ + public String getMapParam() { + return mapParam.getString(); + } + + /** + * <code>optional string MapParam = 5;</code> + * @return internal {@code Utf8String} representation of mapParam for reading + */ + public Utf8String getMapParamBytes() { + return this.mapParam; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return internal {@code Utf8String} representation of mapParam for modifications + */ + public Utf8String getMutableMapParamBytes() { + bitField0_ |= 0x00000040; + return this.mapParam; + } + + /** + * <code>optional string MapParam = 5;</code> + * @param value the mapParam to set + * @return this + */ + public StarTowerRoomData setMapParam(final CharSequence value) { + bitField0_ |= 0x00000040; + mapParam.copyFrom(value); + return this; + } + + /** + * <code>optional string MapParam = 5;</code> + * @param value the mapParam to set + * @return this + */ + public StarTowerRoomData setMapParam(final Utf8String value) { + bitField0_ |= 0x00000040; + mapParam.copyFrom(value); + return this; + } + + @Override + public StarTowerRoomData copyFrom(final StarTowerRoomData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + floor = other.floor; + mapId = other.mapId; + paramId = other.paramId; + roomType = other.roomType; + mapTableId = other.mapTableId; + nextPackage.copyFrom(other.nextPackage); + mapParam.copyFrom(other.mapParam); + } + return this; + } + + @Override + public StarTowerRoomData mergeFrom(final StarTowerRoomData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasMapId()) { + setMapId(other.mapId); + } + if (other.hasParamId()) { + setParamId(other.paramId); + } + if (other.hasRoomType()) { + setRoomType(other.roomType); + } + if (other.hasMapTableId()) { + setMapTableId(other.mapTableId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasMapParam()) { + getMutableMapParamBytes().copyFrom(other.mapParam); + } + return this; + } + + @Override + public StarTowerRoomData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + floor = 0; + mapId = 0; + paramId = 0; + roomType = 0; + mapTableId = 0; + nextPackage.clear(); + mapParam.clear(); + return this; + } + + @Override + public StarTowerRoomData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + mapParam.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerRoomData)) { + return false; + } + StarTowerRoomData other = (StarTowerRoomData) o; + return bitField0_ == other.bitField0_ + && (!hasFloor() || floor == other.floor) + && (!hasMapId() || mapId == other.mapId) + && (!hasParamId() || paramId == other.paramId) + && (!hasRoomType() || roomType == other.roomType) + && (!hasMapTableId() || mapTableId == other.mapTableId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasMapParam() || mapParam.equals(other.mapParam)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(mapId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(paramId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(roomType); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(mapTableId); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 42); + output.writeStringNoTag(mapParam); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mapId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(paramId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(roomType); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mapTableId); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(mapParam); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerRoomData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // mapId + mapId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // paramId + paramId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // roomType + roomType = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // mapTableId + mapTableId = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // mapParam + input.readString(mapParam); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.mapId, mapId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.paramId, paramId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.roomType, roomType); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.mapTableId, mapTableId); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeString(FieldNames.mapParam, mapParam); + } + output.endObject(); + } + + @Override + public StarTowerRoomData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 74110839: { + if (input.isAtField(FieldNames.mapId)) { + if (!input.trySkipNullValue()) { + mapId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 871156328: { + if (input.isAtField(FieldNames.paramId)) { + if (!input.trySkipNullValue()) { + paramId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -108657963: { + if (input.isAtField(FieldNames.roomType)) { + if (!input.trySkipNullValue()) { + roomType = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 556914861: { + if (input.isAtField(FieldNames.mapTableId)) { + if (!input.trySkipNullValue()) { + mapTableId = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 229302449: { + if (input.isAtField(FieldNames.mapParam)) { + if (!input.trySkipNullValue()) { + input.readString(mapParam); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerRoomData clone() { + return new StarTowerRoomData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerRoomData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerRoomData(), data).checkInitialized(); + } + + public static StarTowerRoomData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerRoomData(), input).checkInitialized(); + } + + public static StarTowerRoomData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerRoomData(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerRoomData messages + */ + public static MessageFactory<StarTowerRoomData> getFactory() { + return StarTowerRoomDataFactory.INSTANCE; + } + + private enum StarTowerRoomDataFactory implements MessageFactory<StarTowerRoomData> { + INSTANCE; + + @Override + public StarTowerRoomData create() { + return StarTowerRoomData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName mapId = FieldName.forField("MapId"); + + static final FieldName paramId = FieldName.forField("ParamId"); + + static final FieldName roomType = FieldName.forField("RoomType"); + + static final FieldName mapTableId = FieldName.forField("MapTableId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName mapParam = FieldName.forField("MapParam"); + } + } + + /** + * Protobuf type {@code StarTowerRoomCase} + */ + public static final class StarTowerRoomCase extends ProtoMessage<StarTowerRoomCase> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional .BattleCaseData BattleCase = 2;</code> + */ + private final BattleCaseData battleCase = BattleCaseData.newInstance(); + + /** + * <code>optional .DoorCaseData DoorCase = 3;</code> + */ + private final DoorCaseData doorCase = DoorCaseData.newInstance(); + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 4;</code> + */ + private final SelectSpecialPotentialCaseData selectSpecialPotentialCase = SelectSpecialPotentialCaseData.newInstance(); + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 5;</code> + */ + private final SelectPotentialCaseData selectPotentialCase = SelectPotentialCaseData.newInstance(); + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 6;</code> + */ + private final SelectFateCardCaseData selectFateCardCase = SelectFateCardCaseData.newInstance(); + + /** + * <code>optional .SelectOptionsEventCaseData SelectOptionsEventCase = 8;</code> + */ + private final SelectOptionsEventCaseData selectOptionsEventCase = SelectOptionsEventCaseData.newInstance(); + + /** + * <code>optional .RecoveryHPCaseData RecoveryHPCase = 9;</code> + */ + private final RecoveryHPCaseData recoveryHPCase = RecoveryHPCaseData.newInstance(); + + /** + * <code>optional .NpcRecoveryHPCaseData NpcRecoveryHPCase = 10;</code> + */ + private final NpcRecoveryHPCaseData npcRecoveryHPCase = NpcRecoveryHPCaseData.newInstance(); + + /** + * <code>optional .HawkerCaseData HawkerCase = 11;</code> + */ + private final HawkerCaseData hawkerCase = HawkerCaseData.newInstance(); + + /** + * <code>optional .StrengthenMachineCaseData StrengthenMachineCase = 12;</code> + */ + private final StrengthenMachineCaseData strengthenMachineCase = StrengthenMachineCaseData.newInstance(); + + /** + * <code>optional .SyncHPCaseData SyncHPCase = 15;</code> + */ + private final SyncHPCaseData syncHPCase = SyncHPCaseData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerRoomCase() { + } + + /** + * @return a new empty instance of {@code StarTowerRoomCase} + */ + public static StarTowerRoomCase newInstance() { + return new StarTowerRoomCase(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerRoomCase clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerRoomCase setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional .BattleCaseData BattleCase = 2;</code> + * @return whether the battleCase field is set + */ + public boolean hasBattleCase() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .BattleCaseData BattleCase = 2;</code> + * @return this + */ + public StarTowerRoomCase clearBattleCase() { + bitField0_ &= ~0x00000002; + battleCase.clear(); + return this; + } + + /** + * <code>optional .BattleCaseData BattleCase = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBattleCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public BattleCaseData getBattleCase() { + return battleCase; + } + + /** + * <code>optional .BattleCaseData BattleCase = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public BattleCaseData getMutableBattleCase() { + bitField0_ |= 0x00000002; + return battleCase; + } + + /** + * <code>optional .BattleCaseData BattleCase = 2;</code> + * @param value the battleCase to set + * @return this + */ + public StarTowerRoomCase setBattleCase(final BattleCaseData value) { + bitField0_ |= 0x00000002; + battleCase.copyFrom(value); + return this; + } + + /** + * <code>optional .DoorCaseData DoorCase = 3;</code> + * @return whether the doorCase field is set + */ + public boolean hasDoorCase() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .DoorCaseData DoorCase = 3;</code> + * @return this + */ + public StarTowerRoomCase clearDoorCase() { + bitField0_ &= ~0x00000004; + doorCase.clear(); + return this; + } + + /** + * <code>optional .DoorCaseData DoorCase = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDoorCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public DoorCaseData getDoorCase() { + return doorCase; + } + + /** + * <code>optional .DoorCaseData DoorCase = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public DoorCaseData getMutableDoorCase() { + bitField0_ |= 0x00000004; + return doorCase; + } + + /** + * <code>optional .DoorCaseData DoorCase = 3;</code> + * @param value the doorCase to set + * @return this + */ + public StarTowerRoomCase setDoorCase(final DoorCaseData value) { + bitField0_ |= 0x00000004; + doorCase.copyFrom(value); + return this; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 4;</code> + * @return whether the selectSpecialPotentialCase field is set + */ + public boolean hasSelectSpecialPotentialCase() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 4;</code> + * @return this + */ + public StarTowerRoomCase clearSelectSpecialPotentialCase() { + bitField0_ &= ~0x00000008; + selectSpecialPotentialCase.clear(); + return this; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectSpecialPotentialCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SelectSpecialPotentialCaseData getSelectSpecialPotentialCase() { + return selectSpecialPotentialCase; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SelectSpecialPotentialCaseData getMutableSelectSpecialPotentialCase() { + bitField0_ |= 0x00000008; + return selectSpecialPotentialCase; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 4;</code> + * @param value the selectSpecialPotentialCase to set + * @return this + */ + public StarTowerRoomCase setSelectSpecialPotentialCase( + final SelectSpecialPotentialCaseData value) { + bitField0_ |= 0x00000008; + selectSpecialPotentialCase.copyFrom(value); + return this; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 5;</code> + * @return whether the selectPotentialCase field is set + */ + public boolean hasSelectPotentialCase() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 5;</code> + * @return this + */ + public StarTowerRoomCase clearSelectPotentialCase() { + bitField0_ &= ~0x00000010; + selectPotentialCase.clear(); + return this; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectPotentialCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SelectPotentialCaseData getSelectPotentialCase() { + return selectPotentialCase; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SelectPotentialCaseData getMutableSelectPotentialCase() { + bitField0_ |= 0x00000010; + return selectPotentialCase; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 5;</code> + * @param value the selectPotentialCase to set + * @return this + */ + public StarTowerRoomCase setSelectPotentialCase(final SelectPotentialCaseData value) { + bitField0_ |= 0x00000010; + selectPotentialCase.copyFrom(value); + return this; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 6;</code> + * @return whether the selectFateCardCase field is set + */ + public boolean hasSelectFateCardCase() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 6;</code> + * @return this + */ + public StarTowerRoomCase clearSelectFateCardCase() { + bitField0_ &= ~0x00000020; + selectFateCardCase.clear(); + return this; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectFateCardCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SelectFateCardCaseData getSelectFateCardCase() { + return selectFateCardCase; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SelectFateCardCaseData getMutableSelectFateCardCase() { + bitField0_ |= 0x00000020; + return selectFateCardCase; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 6;</code> + * @param value the selectFateCardCase to set + * @return this + */ + public StarTowerRoomCase setSelectFateCardCase(final SelectFateCardCaseData value) { + bitField0_ |= 0x00000020; + selectFateCardCase.copyFrom(value); + return this; + } + + /** + * <code>optional .SelectOptionsEventCaseData SelectOptionsEventCase = 8;</code> + * @return whether the selectOptionsEventCase field is set + */ + public boolean hasSelectOptionsEventCase() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional .SelectOptionsEventCaseData SelectOptionsEventCase = 8;</code> + * @return this + */ + public StarTowerRoomCase clearSelectOptionsEventCase() { + bitField0_ &= ~0x00000040; + selectOptionsEventCase.clear(); + return this; + } + + /** + * <code>optional .SelectOptionsEventCaseData SelectOptionsEventCase = 8;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectOptionsEventCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SelectOptionsEventCaseData getSelectOptionsEventCase() { + return selectOptionsEventCase; + } + + /** + * <code>optional .SelectOptionsEventCaseData SelectOptionsEventCase = 8;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SelectOptionsEventCaseData getMutableSelectOptionsEventCase() { + bitField0_ |= 0x00000040; + return selectOptionsEventCase; + } + + /** + * <code>optional .SelectOptionsEventCaseData SelectOptionsEventCase = 8;</code> + * @param value the selectOptionsEventCase to set + * @return this + */ + public StarTowerRoomCase setSelectOptionsEventCase(final SelectOptionsEventCaseData value) { + bitField0_ |= 0x00000040; + selectOptionsEventCase.copyFrom(value); + return this; + } + + /** + * <code>optional .RecoveryHPCaseData RecoveryHPCase = 9;</code> + * @return whether the recoveryHPCase field is set + */ + public boolean hasRecoveryHPCase() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional .RecoveryHPCaseData RecoveryHPCase = 9;</code> + * @return this + */ + public StarTowerRoomCase clearRecoveryHPCase() { + bitField0_ &= ~0x00000080; + recoveryHPCase.clear(); + return this; + } + + /** + * <code>optional .RecoveryHPCaseData RecoveryHPCase = 9;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecoveryHPCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RecoveryHPCaseData getRecoveryHPCase() { + return recoveryHPCase; + } + + /** + * <code>optional .RecoveryHPCaseData RecoveryHPCase = 9;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RecoveryHPCaseData getMutableRecoveryHPCase() { + bitField0_ |= 0x00000080; + return recoveryHPCase; + } + + /** + * <code>optional .RecoveryHPCaseData RecoveryHPCase = 9;</code> + * @param value the recoveryHPCase to set + * @return this + */ + public StarTowerRoomCase setRecoveryHPCase(final RecoveryHPCaseData value) { + bitField0_ |= 0x00000080; + recoveryHPCase.copyFrom(value); + return this; + } + + /** + * <code>optional .NpcRecoveryHPCaseData NpcRecoveryHPCase = 10;</code> + * @return whether the npcRecoveryHPCase field is set + */ + public boolean hasNpcRecoveryHPCase() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional .NpcRecoveryHPCaseData NpcRecoveryHPCase = 10;</code> + * @return this + */ + public StarTowerRoomCase clearNpcRecoveryHPCase() { + bitField0_ &= ~0x00000100; + npcRecoveryHPCase.clear(); + return this; + } + + /** + * <code>optional .NpcRecoveryHPCaseData NpcRecoveryHPCase = 10;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNpcRecoveryHPCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public NpcRecoveryHPCaseData getNpcRecoveryHPCase() { + return npcRecoveryHPCase; + } + + /** + * <code>optional .NpcRecoveryHPCaseData NpcRecoveryHPCase = 10;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public NpcRecoveryHPCaseData getMutableNpcRecoveryHPCase() { + bitField0_ |= 0x00000100; + return npcRecoveryHPCase; + } + + /** + * <code>optional .NpcRecoveryHPCaseData NpcRecoveryHPCase = 10;</code> + * @param value the npcRecoveryHPCase to set + * @return this + */ + public StarTowerRoomCase setNpcRecoveryHPCase(final NpcRecoveryHPCaseData value) { + bitField0_ |= 0x00000100; + npcRecoveryHPCase.copyFrom(value); + return this; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 11;</code> + * @return whether the hawkerCase field is set + */ + public boolean hasHawkerCase() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 11;</code> + * @return this + */ + public StarTowerRoomCase clearHawkerCase() { + bitField0_ &= ~0x00000200; + hawkerCase.clear(); + return this; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 11;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHawkerCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public HawkerCaseData getHawkerCase() { + return hawkerCase; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 11;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public HawkerCaseData getMutableHawkerCase() { + bitField0_ |= 0x00000200; + return hawkerCase; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 11;</code> + * @param value the hawkerCase to set + * @return this + */ + public StarTowerRoomCase setHawkerCase(final HawkerCaseData value) { + bitField0_ |= 0x00000200; + hawkerCase.copyFrom(value); + return this; + } + + /** + * <code>optional .StrengthenMachineCaseData StrengthenMachineCase = 12;</code> + * @return whether the strengthenMachineCase field is set + */ + public boolean hasStrengthenMachineCase() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>optional .StrengthenMachineCaseData StrengthenMachineCase = 12;</code> + * @return this + */ + public StarTowerRoomCase clearStrengthenMachineCase() { + bitField0_ &= ~0x00000400; + strengthenMachineCase.clear(); + return this; + } + + /** + * <code>optional .StrengthenMachineCaseData StrengthenMachineCase = 12;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStrengthenMachineCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StrengthenMachineCaseData getStrengthenMachineCase() { + return strengthenMachineCase; + } + + /** + * <code>optional .StrengthenMachineCaseData StrengthenMachineCase = 12;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StrengthenMachineCaseData getMutableStrengthenMachineCase() { + bitField0_ |= 0x00000400; + return strengthenMachineCase; + } + + /** + * <code>optional .StrengthenMachineCaseData StrengthenMachineCase = 12;</code> + * @param value the strengthenMachineCase to set + * @return this + */ + public StarTowerRoomCase setStrengthenMachineCase(final StrengthenMachineCaseData value) { + bitField0_ |= 0x00000400; + strengthenMachineCase.copyFrom(value); + return this; + } + + /** + * <code>optional .SyncHPCaseData SyncHPCase = 15;</code> + * @return whether the syncHPCase field is set + */ + public boolean hasSyncHPCase() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>optional .SyncHPCaseData SyncHPCase = 15;</code> + * @return this + */ + public StarTowerRoomCase clearSyncHPCase() { + bitField0_ &= ~0x00000800; + syncHPCase.clear(); + return this; + } + + /** + * <code>optional .SyncHPCaseData SyncHPCase = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSyncHPCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SyncHPCaseData getSyncHPCase() { + return syncHPCase; + } + + /** + * <code>optional .SyncHPCaseData SyncHPCase = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SyncHPCaseData getMutableSyncHPCase() { + bitField0_ |= 0x00000800; + return syncHPCase; + } + + /** + * <code>optional .SyncHPCaseData SyncHPCase = 15;</code> + * @param value the syncHPCase to set + * @return this + */ + public StarTowerRoomCase setSyncHPCase(final SyncHPCaseData value) { + bitField0_ |= 0x00000800; + syncHPCase.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerRoomCase clearNextPackage() { + bitField0_ &= ~0x00001000; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00001000; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerRoomCase addNextPackage(final byte value) { + bitField0_ |= 0x00001000; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerRoomCase addAllNextPackage(final byte... values) { + bitField0_ |= 0x00001000; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerRoomCase setNextPackage(final byte... values) { + bitField0_ |= 0x00001000; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerRoomCase copyFrom(final StarTowerRoomCase other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + battleCase.copyFrom(other.battleCase); + doorCase.copyFrom(other.doorCase); + selectSpecialPotentialCase.copyFrom(other.selectSpecialPotentialCase); + selectPotentialCase.copyFrom(other.selectPotentialCase); + selectFateCardCase.copyFrom(other.selectFateCardCase); + selectOptionsEventCase.copyFrom(other.selectOptionsEventCase); + recoveryHPCase.copyFrom(other.recoveryHPCase); + npcRecoveryHPCase.copyFrom(other.npcRecoveryHPCase); + hawkerCase.copyFrom(other.hawkerCase); + strengthenMachineCase.copyFrom(other.strengthenMachineCase); + syncHPCase.copyFrom(other.syncHPCase); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerRoomCase mergeFrom(final StarTowerRoomCase other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasBattleCase()) { + getMutableBattleCase().mergeFrom(other.battleCase); + } + if (other.hasDoorCase()) { + getMutableDoorCase().mergeFrom(other.doorCase); + } + if (other.hasSelectSpecialPotentialCase()) { + getMutableSelectSpecialPotentialCase().mergeFrom(other.selectSpecialPotentialCase); + } + if (other.hasSelectPotentialCase()) { + getMutableSelectPotentialCase().mergeFrom(other.selectPotentialCase); + } + if (other.hasSelectFateCardCase()) { + getMutableSelectFateCardCase().mergeFrom(other.selectFateCardCase); + } + if (other.hasSelectOptionsEventCase()) { + getMutableSelectOptionsEventCase().mergeFrom(other.selectOptionsEventCase); + } + if (other.hasRecoveryHPCase()) { + getMutableRecoveryHPCase().mergeFrom(other.recoveryHPCase); + } + if (other.hasNpcRecoveryHPCase()) { + getMutableNpcRecoveryHPCase().mergeFrom(other.npcRecoveryHPCase); + } + if (other.hasHawkerCase()) { + getMutableHawkerCase().mergeFrom(other.hawkerCase); + } + if (other.hasStrengthenMachineCase()) { + getMutableStrengthenMachineCase().mergeFrom(other.strengthenMachineCase); + } + if (other.hasSyncHPCase()) { + getMutableSyncHPCase().mergeFrom(other.syncHPCase); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerRoomCase clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + battleCase.clear(); + doorCase.clear(); + selectSpecialPotentialCase.clear(); + selectPotentialCase.clear(); + selectFateCardCase.clear(); + selectOptionsEventCase.clear(); + recoveryHPCase.clear(); + npcRecoveryHPCase.clear(); + hawkerCase.clear(); + strengthenMachineCase.clear(); + syncHPCase.clear(); + nextPackage.clear(); + return this; + } + + @Override + public StarTowerRoomCase clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + battleCase.clearQuick(); + doorCase.clearQuick(); + selectSpecialPotentialCase.clearQuick(); + selectPotentialCase.clearQuick(); + selectFateCardCase.clearQuick(); + selectOptionsEventCase.clearQuick(); + recoveryHPCase.clearQuick(); + npcRecoveryHPCase.clearQuick(); + hawkerCase.clearQuick(); + strengthenMachineCase.clearQuick(); + syncHPCase.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerRoomCase)) { + return false; + } + StarTowerRoomCase other = (StarTowerRoomCase) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasBattleCase() || battleCase.equals(other.battleCase)) + && (!hasDoorCase() || doorCase.equals(other.doorCase)) + && (!hasSelectSpecialPotentialCase() || selectSpecialPotentialCase.equals(other.selectSpecialPotentialCase)) + && (!hasSelectPotentialCase() || selectPotentialCase.equals(other.selectPotentialCase)) + && (!hasSelectFateCardCase() || selectFateCardCase.equals(other.selectFateCardCase)) + && (!hasSelectOptionsEventCase() || selectOptionsEventCase.equals(other.selectOptionsEventCase)) + && (!hasRecoveryHPCase() || recoveryHPCase.equals(other.recoveryHPCase)) + && (!hasNpcRecoveryHPCase() || npcRecoveryHPCase.equals(other.npcRecoveryHPCase)) + && (!hasHawkerCase() || hawkerCase.equals(other.hawkerCase)) + && (!hasStrengthenMachineCase() || strengthenMachineCase.equals(other.strengthenMachineCase)) + && (!hasSyncHPCase() || syncHPCase.equals(other.syncHPCase)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(battleCase); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(doorCase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(selectSpecialPotentialCase); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(selectPotentialCase); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(selectFateCardCase); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(selectOptionsEventCase); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(recoveryHPCase); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(npcRecoveryHPCase); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 90); + output.writeMessageNoTag(hawkerCase); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 98); + output.writeMessageNoTag(strengthenMachineCase); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(syncHPCase); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(battleCase); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(doorCase); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectSpecialPotentialCase); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectPotentialCase); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectFateCardCase); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectOptionsEventCase); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(recoveryHPCase); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(npcRecoveryHPCase); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(hawkerCase); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(strengthenMachineCase); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(syncHPCase); + } + if ((bitField0_ & 0x00001000) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerRoomCase mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // battleCase + input.readMessage(battleCase); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // doorCase + input.readMessage(doorCase); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // selectSpecialPotentialCase + input.readMessage(selectSpecialPotentialCase); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // selectPotentialCase + input.readMessage(selectPotentialCase); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // selectFateCardCase + input.readMessage(selectFateCardCase); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // selectOptionsEventCase + input.readMessage(selectOptionsEventCase); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // recoveryHPCase + input.readMessage(recoveryHPCase); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // npcRecoveryHPCase + input.readMessage(npcRecoveryHPCase); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 90) { + break; + } + } + case 90: { + // hawkerCase + input.readMessage(hawkerCase); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 98) { + break; + } + } + case 98: { + // strengthenMachineCase + input.readMessage(strengthenMachineCase); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // syncHPCase + input.readMessage(syncHPCase); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.battleCase, battleCase); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.doorCase, doorCase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.selectSpecialPotentialCase, selectSpecialPotentialCase); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.selectPotentialCase, selectPotentialCase); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.selectFateCardCase, selectFateCardCase); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeMessage(FieldNames.selectOptionsEventCase, selectOptionsEventCase); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeMessage(FieldNames.recoveryHPCase, recoveryHPCase); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeMessage(FieldNames.npcRecoveryHPCase, npcRecoveryHPCase); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeMessage(FieldNames.hawkerCase, hawkerCase); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeMessage(FieldNames.strengthenMachineCase, strengthenMachineCase); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeMessage(FieldNames.syncHPCase, syncHPCase); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerRoomCase mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -248315864: { + if (input.isAtField(FieldNames.battleCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(battleCase); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1265889310: { + if (input.isAtField(FieldNames.doorCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(doorCase); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1667710095: { + if (input.isAtField(FieldNames.selectSpecialPotentialCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectSpecialPotentialCase); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 929377458: { + if (input.isAtField(FieldNames.selectPotentialCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectPotentialCase); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1348869672: { + if (input.isAtField(FieldNames.selectFateCardCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectFateCardCase); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1570218712: { + if (input.isAtField(FieldNames.selectOptionsEventCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectOptionsEventCase); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -688997299: { + if (input.isAtField(FieldNames.recoveryHPCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(recoveryHPCase); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -631535282: { + if (input.isAtField(FieldNames.npcRecoveryHPCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(npcRecoveryHPCase); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -79930006: { + if (input.isAtField(FieldNames.hawkerCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(hawkerCase); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -789171987: { + if (input.isAtField(FieldNames.strengthenMachineCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(strengthenMachineCase); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case -547976493: { + if (input.isAtField(FieldNames.syncHPCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(syncHPCase); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerRoomCase clone() { + return new StarTowerRoomCase().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerRoomCase parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerRoomCase(), data).checkInitialized(); + } + + public static StarTowerRoomCase parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerRoomCase(), input).checkInitialized(); + } + + public static StarTowerRoomCase parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerRoomCase(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerRoomCase messages + */ + public static MessageFactory<StarTowerRoomCase> getFactory() { + return StarTowerRoomCaseFactory.INSTANCE; + } + + private enum StarTowerRoomCaseFactory implements MessageFactory<StarTowerRoomCase> { + INSTANCE; + + @Override + public StarTowerRoomCase create() { + return StarTowerRoomCase.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName battleCase = FieldName.forField("BattleCase"); + + static final FieldName doorCase = FieldName.forField("DoorCase"); + + static final FieldName selectSpecialPotentialCase = FieldName.forField("SelectSpecialPotentialCase"); + + static final FieldName selectPotentialCase = FieldName.forField("SelectPotentialCase"); + + static final FieldName selectFateCardCase = FieldName.forField("SelectFateCardCase"); + + static final FieldName selectOptionsEventCase = FieldName.forField("SelectOptionsEventCase"); + + static final FieldName recoveryHPCase = FieldName.forField("RecoveryHPCase"); + + static final FieldName npcRecoveryHPCase = FieldName.forField("NpcRecoveryHPCase"); + + static final FieldName hawkerCase = FieldName.forField("HawkerCase"); + + static final FieldName strengthenMachineCase = FieldName.forField("StrengthenMachineCase"); + + static final FieldName syncHPCase = FieldName.forField("SyncHPCase"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code BattleCaseData} + */ + public static final class BattleCaseData extends ProtoMessage<BattleCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 SubNoteSkillNum = 3;</code> + */ + private int subNoteSkillNum; + + /** + * <code>optional bool TimeLimit = 1;</code> + */ + private boolean timeLimit; + + /** + * <code>optional bool FateCard = 2;</code> + */ + private boolean fateCard; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BattleCaseData() { + } + + /** + * @return a new empty instance of {@code BattleCaseData} + */ + public static BattleCaseData newInstance() { + return new BattleCaseData(); + } + + /** + * <code>optional uint32 SubNoteSkillNum = 3;</code> + * @return whether the subNoteSkillNum field is set + */ + public boolean hasSubNoteSkillNum() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 SubNoteSkillNum = 3;</code> + * @return this + */ + public BattleCaseData clearSubNoteSkillNum() { + bitField0_ &= ~0x00000001; + subNoteSkillNum = 0; + return this; + } + + /** + * <code>optional uint32 SubNoteSkillNum = 3;</code> + * @return the subNoteSkillNum + */ + public int getSubNoteSkillNum() { + return subNoteSkillNum; + } + + /** + * <code>optional uint32 SubNoteSkillNum = 3;</code> + * @param value the subNoteSkillNum to set + * @return this + */ + public BattleCaseData setSubNoteSkillNum(final int value) { + bitField0_ |= 0x00000001; + subNoteSkillNum = value; + return this; + } + + /** + * <code>optional bool TimeLimit = 1;</code> + * @return whether the timeLimit field is set + */ + public boolean hasTimeLimit() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool TimeLimit = 1;</code> + * @return this + */ + public BattleCaseData clearTimeLimit() { + bitField0_ &= ~0x00000002; + timeLimit = false; + return this; + } + + /** + * <code>optional bool TimeLimit = 1;</code> + * @return the timeLimit + */ + public boolean getTimeLimit() { + return timeLimit; + } + + /** + * <code>optional bool TimeLimit = 1;</code> + * @param value the timeLimit to set + * @return this + */ + public BattleCaseData setTimeLimit(final boolean value) { + bitField0_ |= 0x00000002; + timeLimit = value; + return this; + } + + /** + * <code>optional bool FateCard = 2;</code> + * @return whether the fateCard field is set + */ + public boolean hasFateCard() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool FateCard = 2;</code> + * @return this + */ + public BattleCaseData clearFateCard() { + bitField0_ &= ~0x00000004; + fateCard = false; + return this; + } + + /** + * <code>optional bool FateCard = 2;</code> + * @return the fateCard + */ + public boolean getFateCard() { + return fateCard; + } + + /** + * <code>optional bool FateCard = 2;</code> + * @param value the fateCard to set + * @return this + */ + public BattleCaseData setFateCard(final boolean value) { + bitField0_ |= 0x00000004; + fateCard = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public BattleCaseData clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public BattleCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public BattleCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public BattleCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BattleCaseData copyFrom(final BattleCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + subNoteSkillNum = other.subNoteSkillNum; + timeLimit = other.timeLimit; + fateCard = other.fateCard; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattleCaseData mergeFrom(final BattleCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSubNoteSkillNum()) { + setSubNoteSkillNum(other.subNoteSkillNum); + } + if (other.hasTimeLimit()) { + setTimeLimit(other.timeLimit); + } + if (other.hasFateCard()) { + setFateCard(other.fateCard); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BattleCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + subNoteSkillNum = 0; + timeLimit = false; + fateCard = false; + nextPackage.clear(); + return this; + } + + @Override + public BattleCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BattleCaseData)) { + return false; + } + BattleCaseData other = (BattleCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasSubNoteSkillNum() || subNoteSkillNum == other.subNoteSkillNum) + && (!hasTimeLimit() || timeLimit == other.timeLimit) + && (!hasFateCard() || fateCard == other.fateCard) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(subNoteSkillNum); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(timeLimit); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(fateCard); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(subNoteSkillNum); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BattleCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // subNoteSkillNum + subNoteSkillNum = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // timeLimit + timeLimit = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // fateCard + fateCard = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.subNoteSkillNum, subNoteSkillNum); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.timeLimit, timeLimit); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.fateCard, fateCard); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BattleCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1170696135: { + if (input.isAtField(FieldNames.subNoteSkillNum)) { + if (!input.trySkipNullValue()) { + subNoteSkillNum = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2022760654: { + if (input.isAtField(FieldNames.timeLimit)) { + if (!input.trySkipNullValue()) { + timeLimit = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1047532988: { + if (input.isAtField(FieldNames.fateCard)) { + if (!input.trySkipNullValue()) { + fateCard = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BattleCaseData clone() { + return new BattleCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BattleCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BattleCaseData(), data).checkInitialized(); + } + + public static BattleCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattleCaseData(), input).checkInitialized(); + } + + public static BattleCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BattleCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating BattleCaseData messages + */ + public static MessageFactory<BattleCaseData> getFactory() { + return BattleCaseDataFactory.INSTANCE; + } + + private enum BattleCaseDataFactory implements MessageFactory<BattleCaseData> { + INSTANCE; + + @Override + public BattleCaseData create() { + return BattleCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName subNoteSkillNum = FieldName.forField("SubNoteSkillNum"); + + static final FieldName timeLimit = FieldName.forField("TimeLimit"); + + static final FieldName fateCard = FieldName.forField("FateCard"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code DoorCaseData} + */ + public static final class DoorCaseData extends ProtoMessage<DoorCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Floor = 1;</code> + */ + private int floor; + + /** + * <code>optional uint32 Type = 2;</code> + */ + private int type; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private DoorCaseData() { + } + + /** + * @return a new empty instance of {@code DoorCaseData} + */ + public static DoorCaseData newInstance() { + return new DoorCaseData(); + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @return this + */ + public DoorCaseData clearFloor() { + bitField0_ &= ~0x00000001; + floor = 0; + return this; + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * <code>optional uint32 Floor = 1;</code> + * @param value the floor to set + * @return this + */ + public DoorCaseData setFloor(final int value) { + bitField0_ |= 0x00000001; + floor = value; + return this; + } + + /** + * <code>optional uint32 Type = 2;</code> + * @return whether the type field is set + */ + public boolean hasType() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Type = 2;</code> + * @return this + */ + public DoorCaseData clearType() { + bitField0_ &= ~0x00000002; + type = 0; + return this; + } + + /** + * <code>optional uint32 Type = 2;</code> + * @return the type + */ + public int getType() { + return type; + } + + /** + * <code>optional uint32 Type = 2;</code> + * @param value the type to set + * @return this + */ + public DoorCaseData setType(final int value) { + bitField0_ |= 0x00000002; + type = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public DoorCaseData clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public DoorCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public DoorCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public DoorCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public DoorCaseData copyFrom(final DoorCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + floor = other.floor; + type = other.type; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DoorCaseData mergeFrom(final DoorCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasType()) { + setType(other.type); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public DoorCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + floor = 0; + type = 0; + nextPackage.clear(); + return this; + } + + @Override + public DoorCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DoorCaseData)) { + return false; + } + DoorCaseData other = (DoorCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasFloor() || floor == other.floor) + && (!hasType() || type == other.type) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(type); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(type); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DoorCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // type + type = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.type, type); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public DoorCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2622298: { + if (input.isAtField(FieldNames.type)) { + if (!input.trySkipNullValue()) { + type = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DoorCaseData clone() { + return new DoorCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DoorCaseData parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DoorCaseData(), data).checkInitialized(); + } + + public static DoorCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DoorCaseData(), input).checkInitialized(); + } + + public static DoorCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DoorCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating DoorCaseData messages + */ + public static MessageFactory<DoorCaseData> getFactory() { + return DoorCaseDataFactory.INSTANCE; + } + + private enum DoorCaseDataFactory implements MessageFactory<DoorCaseData> { + INSTANCE; + + @Override + public DoorCaseData create() { + return DoorCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName type = FieldName.forField("Type"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code SelectSpecialPotentialCaseData} + */ + public static final class SelectSpecialPotentialCaseData extends ProtoMessage<SelectSpecialPotentialCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 TeamLevel = 2;</code> + */ + private int teamLevel; + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + */ + private int reRollPrice; + + /** + * <code>optional bool CanReRoll = 7;</code> + */ + private boolean canReRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Ids = 1;</code> + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 NewIds = 3;</code> + */ + private final RepeatedInt newIds = RepeatedInt.newEmptyInstance(); + + private SelectSpecialPotentialCaseData() { + } + + /** + * @return a new empty instance of {@code SelectSpecialPotentialCaseData} + */ + public static SelectSpecialPotentialCaseData newInstance() { + return new SelectSpecialPotentialCaseData(); + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @return whether the teamLevel field is set + */ + public boolean hasTeamLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @return this + */ + public SelectSpecialPotentialCaseData clearTeamLevel() { + bitField0_ &= ~0x00000001; + teamLevel = 0; + return this; + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @return the teamLevel + */ + public int getTeamLevel() { + return teamLevel; + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @param value the teamLevel to set + * @return this + */ + public SelectSpecialPotentialCaseData setTeamLevel(final int value) { + bitField0_ |= 0x00000001; + teamLevel = value; + return this; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return whether the reRollPrice field is set + */ + public boolean hasReRollPrice() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return this + */ + public SelectSpecialPotentialCaseData clearReRollPrice() { + bitField0_ &= ~0x00000002; + reRollPrice = 0; + return this; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return the reRollPrice + */ + public int getReRollPrice() { + return reRollPrice; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @param value the reRollPrice to set + * @return this + */ + public SelectSpecialPotentialCaseData setReRollPrice(final int value) { + bitField0_ |= 0x00000002; + reRollPrice = value; + return this; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return whether the canReRoll field is set + */ + public boolean hasCanReRoll() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return this + */ + public SelectSpecialPotentialCaseData clearCanReRoll() { + bitField0_ &= ~0x00000004; + canReRoll = false; + return this; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return the canReRoll + */ + public boolean getCanReRoll() { + return canReRoll; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @param value the canReRoll to set + * @return this + */ + public SelectSpecialPotentialCaseData setCanReRoll(final boolean value) { + bitField0_ |= 0x00000004; + canReRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SelectSpecialPotentialCaseData clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SelectSpecialPotentialCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SelectSpecialPotentialCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SelectSpecialPotentialCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @return this + */ + public SelectSpecialPotentialCaseData clearIds() { + bitField0_ &= ~0x00000010; + ids.clear(); + return this; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000010; + return ids; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @param value the ids to add + * @return this + */ + public SelectSpecialPotentialCaseData addIds(final int value) { + bitField0_ |= 0x00000010; + ids.add(value); + return this; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @param values the ids to add + * @return this + */ + public SelectSpecialPotentialCaseData addAllIds(final int... values) { + bitField0_ |= 0x00000010; + ids.addAll(values); + return this; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @return whether the newIds field is set + */ + public boolean hasNewIds() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @return this + */ + public SelectSpecialPotentialCaseData clearNewIds() { + bitField0_ &= ~0x00000020; + newIds.clear(); + return this; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNewIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getNewIds() { + return newIds; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableNewIds() { + bitField0_ |= 0x00000020; + return newIds; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @param value the newIds to add + * @return this + */ + public SelectSpecialPotentialCaseData addNewIds(final int value) { + bitField0_ |= 0x00000020; + newIds.add(value); + return this; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @param values the newIds to add + * @return this + */ + public SelectSpecialPotentialCaseData addAllNewIds(final int... values) { + bitField0_ |= 0x00000020; + newIds.addAll(values); + return this; + } + + @Override + public SelectSpecialPotentialCaseData copyFrom(final SelectSpecialPotentialCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + teamLevel = other.teamLevel; + reRollPrice = other.reRollPrice; + canReRoll = other.canReRoll; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + newIds.copyFrom(other.newIds); + } + return this; + } + + @Override + public SelectSpecialPotentialCaseData mergeFrom(final SelectSpecialPotentialCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTeamLevel()) { + setTeamLevel(other.teamLevel); + } + if (other.hasReRollPrice()) { + setReRollPrice(other.reRollPrice); + } + if (other.hasCanReRoll()) { + setCanReRoll(other.canReRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + if (other.hasNewIds()) { + getMutableNewIds().addAll(other.newIds); + } + return this; + } + + @Override + public SelectSpecialPotentialCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + teamLevel = 0; + reRollPrice = 0; + canReRoll = false; + nextPackage.clear(); + ids.clear(); + newIds.clear(); + return this; + } + + @Override + public SelectSpecialPotentialCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + newIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SelectSpecialPotentialCaseData)) { + return false; + } + SelectSpecialPotentialCaseData other = (SelectSpecialPotentialCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasTeamLevel() || teamLevel == other.teamLevel) + && (!hasReRollPrice() || reRollPrice == other.reRollPrice) + && (!hasCanReRoll() || canReRoll == other.canReRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)) + && (!hasNewIds() || newIds.equals(other.newIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(teamLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(reRollPrice); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(canReRoll); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < newIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(newIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(teamLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(reRollPrice); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * newIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(newIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SelectSpecialPotentialCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // teamLevel + teamLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // reRollPrice + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // canReRoll + canReRoll = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // newIds [packed=true] + input.readPackedUInt32(newIds, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000010; + break; + } + case 24: { + // newIds [packed=false] + tag = input.readRepeatedUInt32(newIds, tag); + bitField0_ |= 0x00000020; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.teamLevel, teamLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.reRollPrice, reRollPrice); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.canReRoll, canReRoll); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt32(FieldNames.newIds, newIds); + } + output.endObject(); + } + + @Override + public SelectSpecialPotentialCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1810266887: { + if (input.isAtField(FieldNames.teamLevel)) { + if (!input.trySkipNullValue()) { + teamLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1462629959: { + if (input.isAtField(FieldNames.reRollPrice)) { + if (!input.trySkipNullValue()) { + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1993089312: { + if (input.isAtField(FieldNames.canReRoll)) { + if (!input.trySkipNullValue()) { + canReRoll = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1964999400: { + if (input.isAtField(FieldNames.newIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(newIds); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SelectSpecialPotentialCaseData clone() { + return new SelectSpecialPotentialCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SelectSpecialPotentialCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SelectSpecialPotentialCaseData(), data).checkInitialized(); + } + + public static SelectSpecialPotentialCaseData parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new SelectSpecialPotentialCaseData(), input).checkInitialized(); + } + + public static SelectSpecialPotentialCaseData parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new SelectSpecialPotentialCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating SelectSpecialPotentialCaseData messages + */ + public static MessageFactory<SelectSpecialPotentialCaseData> getFactory() { + return SelectSpecialPotentialCaseDataFactory.INSTANCE; + } + + private enum SelectSpecialPotentialCaseDataFactory implements MessageFactory<SelectSpecialPotentialCaseData> { + INSTANCE; + + @Override + public SelectSpecialPotentialCaseData create() { + return SelectSpecialPotentialCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName teamLevel = FieldName.forField("TeamLevel"); + + static final FieldName reRollPrice = FieldName.forField("ReRollPrice"); + + static final FieldName canReRoll = FieldName.forField("CanReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + + static final FieldName newIds = FieldName.forField("NewIds"); + } + } + + /** + * Protobuf type {@code SelectPotentialCaseData} + */ + public static final class SelectPotentialCaseData extends ProtoMessage<SelectPotentialCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 TeamLevel = 2;</code> + */ + private int teamLevel; + + /** + * <code>optional uint32 ReRollPrice = 14;</code> + */ + private int reRollPrice; + + /** + * <code>optional uint32 Type = 15;</code> + */ + private int type; + + /** + * <code>optional bool CanReRoll = 13;</code> + */ + private boolean canReRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 NewIds = 3;</code> + */ + private final RepeatedInt newIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 LuckyIds = 12;</code> + */ + private final RepeatedInt luckyIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .PotentialInfo Infos = 1;</code> + */ + private final RepeatedMessage<PotentialInfo> infos = RepeatedMessage.newEmptyInstance(PotentialInfo.getFactory()); + + private SelectPotentialCaseData() { + } + + /** + * @return a new empty instance of {@code SelectPotentialCaseData} + */ + public static SelectPotentialCaseData newInstance() { + return new SelectPotentialCaseData(); + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @return whether the teamLevel field is set + */ + public boolean hasTeamLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @return this + */ + public SelectPotentialCaseData clearTeamLevel() { + bitField0_ &= ~0x00000001; + teamLevel = 0; + return this; + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @return the teamLevel + */ + public int getTeamLevel() { + return teamLevel; + } + + /** + * <code>optional uint32 TeamLevel = 2;</code> + * @param value the teamLevel to set + * @return this + */ + public SelectPotentialCaseData setTeamLevel(final int value) { + bitField0_ |= 0x00000001; + teamLevel = value; + return this; + } + + /** + * <code>optional uint32 ReRollPrice = 14;</code> + * @return whether the reRollPrice field is set + */ + public boolean hasReRollPrice() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 ReRollPrice = 14;</code> + * @return this + */ + public SelectPotentialCaseData clearReRollPrice() { + bitField0_ &= ~0x00000002; + reRollPrice = 0; + return this; + } + + /** + * <code>optional uint32 ReRollPrice = 14;</code> + * @return the reRollPrice + */ + public int getReRollPrice() { + return reRollPrice; + } + + /** + * <code>optional uint32 ReRollPrice = 14;</code> + * @param value the reRollPrice to set + * @return this + */ + public SelectPotentialCaseData setReRollPrice(final int value) { + bitField0_ |= 0x00000002; + reRollPrice = value; + return this; + } + + /** + * <code>optional uint32 Type = 15;</code> + * @return whether the type field is set + */ + public boolean hasType() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Type = 15;</code> + * @return this + */ + public SelectPotentialCaseData clearType() { + bitField0_ &= ~0x00000004; + type = 0; + return this; + } + + /** + * <code>optional uint32 Type = 15;</code> + * @return the type + */ + public int getType() { + return type; + } + + /** + * <code>optional uint32 Type = 15;</code> + * @param value the type to set + * @return this + */ + public SelectPotentialCaseData setType(final int value) { + bitField0_ |= 0x00000004; + type = value; + return this; + } + + /** + * <code>optional bool CanReRoll = 13;</code> + * @return whether the canReRoll field is set + */ + public boolean hasCanReRoll() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool CanReRoll = 13;</code> + * @return this + */ + public SelectPotentialCaseData clearCanReRoll() { + bitField0_ &= ~0x00000008; + canReRoll = false; + return this; + } + + /** + * <code>optional bool CanReRoll = 13;</code> + * @return the canReRoll + */ + public boolean getCanReRoll() { + return canReRoll; + } + + /** + * <code>optional bool CanReRoll = 13;</code> + * @param value the canReRoll to set + * @return this + */ + public SelectPotentialCaseData setCanReRoll(final boolean value) { + bitField0_ |= 0x00000008; + canReRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SelectPotentialCaseData clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SelectPotentialCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SelectPotentialCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SelectPotentialCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @return whether the newIds field is set + */ + public boolean hasNewIds() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @return this + */ + public SelectPotentialCaseData clearNewIds() { + bitField0_ &= ~0x00000020; + newIds.clear(); + return this; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNewIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getNewIds() { + return newIds; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableNewIds() { + bitField0_ |= 0x00000020; + return newIds; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @param value the newIds to add + * @return this + */ + public SelectPotentialCaseData addNewIds(final int value) { + bitField0_ |= 0x00000020; + newIds.add(value); + return this; + } + + /** + * <code>repeated uint32 NewIds = 3;</code> + * @param values the newIds to add + * @return this + */ + public SelectPotentialCaseData addAllNewIds(final int... values) { + bitField0_ |= 0x00000020; + newIds.addAll(values); + return this; + } + + /** + * <code>repeated uint32 LuckyIds = 12;</code> + * @return whether the luckyIds field is set + */ + public boolean hasLuckyIds() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated uint32 LuckyIds = 12;</code> + * @return this + */ + public SelectPotentialCaseData clearLuckyIds() { + bitField0_ &= ~0x00000040; + luckyIds.clear(); + return this; + } + + /** + * <code>repeated uint32 LuckyIds = 12;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLuckyIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getLuckyIds() { + return luckyIds; + } + + /** + * <code>repeated uint32 LuckyIds = 12;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableLuckyIds() { + bitField0_ |= 0x00000040; + return luckyIds; + } + + /** + * <code>repeated uint32 LuckyIds = 12;</code> + * @param value the luckyIds to add + * @return this + */ + public SelectPotentialCaseData addLuckyIds(final int value) { + bitField0_ |= 0x00000040; + luckyIds.add(value); + return this; + } + + /** + * <code>repeated uint32 LuckyIds = 12;</code> + * @param values the luckyIds to add + * @return this + */ + public SelectPotentialCaseData addAllLuckyIds(final int... values) { + bitField0_ |= 0x00000040; + luckyIds.addAll(values); + return this; + } + + /** + * <code>repeated .PotentialInfo Infos = 1;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>repeated .PotentialInfo Infos = 1;</code> + * @return this + */ + public SelectPotentialCaseData clearInfos() { + bitField0_ &= ~0x00000080; + infos.clear(); + return this; + } + + /** + * <code>repeated .PotentialInfo Infos = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PotentialInfo> getInfos() { + return infos; + } + + /** + * <code>repeated .PotentialInfo Infos = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PotentialInfo> getMutableInfos() { + bitField0_ |= 0x00000080; + return infos; + } + + /** + * <code>repeated .PotentialInfo Infos = 1;</code> + * @param value the infos to add + * @return this + */ + public SelectPotentialCaseData addInfos(final PotentialInfo value) { + bitField0_ |= 0x00000080; + infos.add(value); + return this; + } + + /** + * <code>repeated .PotentialInfo Infos = 1;</code> + * @param values the infos to add + * @return this + */ + public SelectPotentialCaseData addAllInfos(final PotentialInfo... values) { + bitField0_ |= 0x00000080; + infos.addAll(values); + return this; + } + + @Override + public SelectPotentialCaseData copyFrom(final SelectPotentialCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + teamLevel = other.teamLevel; + reRollPrice = other.reRollPrice; + type = other.type; + canReRoll = other.canReRoll; + nextPackage.copyFrom(other.nextPackage); + newIds.copyFrom(other.newIds); + luckyIds.copyFrom(other.luckyIds); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public SelectPotentialCaseData mergeFrom(final SelectPotentialCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTeamLevel()) { + setTeamLevel(other.teamLevel); + } + if (other.hasReRollPrice()) { + setReRollPrice(other.reRollPrice); + } + if (other.hasType()) { + setType(other.type); + } + if (other.hasCanReRoll()) { + setCanReRoll(other.canReRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNewIds()) { + getMutableNewIds().addAll(other.newIds); + } + if (other.hasLuckyIds()) { + getMutableLuckyIds().addAll(other.luckyIds); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public SelectPotentialCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + teamLevel = 0; + reRollPrice = 0; + type = 0; + canReRoll = false; + nextPackage.clear(); + newIds.clear(); + luckyIds.clear(); + infos.clear(); + return this; + } + + @Override + public SelectPotentialCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + newIds.clear(); + luckyIds.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SelectPotentialCaseData)) { + return false; + } + SelectPotentialCaseData other = (SelectPotentialCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasTeamLevel() || teamLevel == other.teamLevel) + && (!hasReRollPrice() || reRollPrice == other.reRollPrice) + && (!hasType() || type == other.type) + && (!hasCanReRoll() || canReRoll == other.canReRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNewIds() || newIds.equals(other.newIds)) + && (!hasLuckyIds() || luckyIds.equals(other.luckyIds)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(teamLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(reRollPrice); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(type); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 104); + output.writeBoolNoTag(canReRoll); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < newIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(newIds.array()[i]); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < luckyIds.length(); i++) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(luckyIds.array()[i]); + } + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(teamLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(reRollPrice); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(type); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * newIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(newIds); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * luckyIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(luckyIds); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SelectPotentialCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // teamLevel + teamLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // reRollPrice + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // type + type = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 104) { + break; + } + } + case 104: { + // canReRoll + canReRoll = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // newIds [packed=true] + input.readPackedUInt32(newIds, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 98) { + break; + } + } + case 98: { + // luckyIds [packed=true] + input.readPackedUInt32(luckyIds, tag); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000080; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // newIds [packed=false] + tag = input.readRepeatedUInt32(newIds, tag); + bitField0_ |= 0x00000020; + break; + } + case 96: { + // luckyIds [packed=false] + tag = input.readRepeatedUInt32(luckyIds, tag); + bitField0_ |= 0x00000040; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.teamLevel, teamLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.reRollPrice, reRollPrice); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.type, type); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.canReRoll, canReRoll); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt32(FieldNames.newIds, newIds); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedUInt32(FieldNames.luckyIds, luckyIds); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public SelectPotentialCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1810266887: { + if (input.isAtField(FieldNames.teamLevel)) { + if (!input.trySkipNullValue()) { + teamLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1462629959: { + if (input.isAtField(FieldNames.reRollPrice)) { + if (!input.trySkipNullValue()) { + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2622298: { + if (input.isAtField(FieldNames.type)) { + if (!input.trySkipNullValue()) { + type = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1993089312: { + if (input.isAtField(FieldNames.canReRoll)) { + if (!input.trySkipNullValue()) { + canReRoll = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1964999400: { + if (input.isAtField(FieldNames.newIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(newIds); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1289871664: { + if (input.isAtField(FieldNames.luckyIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(luckyIds); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SelectPotentialCaseData clone() { + return new SelectPotentialCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SelectPotentialCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SelectPotentialCaseData(), data).checkInitialized(); + } + + public static SelectPotentialCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectPotentialCaseData(), input).checkInitialized(); + } + + public static SelectPotentialCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectPotentialCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating SelectPotentialCaseData messages + */ + public static MessageFactory<SelectPotentialCaseData> getFactory() { + return SelectPotentialCaseDataFactory.INSTANCE; + } + + private enum SelectPotentialCaseDataFactory implements MessageFactory<SelectPotentialCaseData> { + INSTANCE; + + @Override + public SelectPotentialCaseData create() { + return SelectPotentialCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName teamLevel = FieldName.forField("TeamLevel"); + + static final FieldName reRollPrice = FieldName.forField("ReRollPrice"); + + static final FieldName type = FieldName.forField("Type"); + + static final FieldName canReRoll = FieldName.forField("CanReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName newIds = FieldName.forField("NewIds"); + + static final FieldName luckyIds = FieldName.forField("LuckyIds"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code SelectOptionsEventCaseData} + */ + public static final class SelectOptionsEventCaseData extends ProtoMessage<SelectOptionsEventCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 EvtId = 1;</code> + */ + private int evtId; + + /** + * <code>optional uint32 NPCId = 4;</code> + */ + private int nPCId; + + /** + * <code>optional bool Done = 5;</code> + */ + private boolean done; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Options = 2;</code> + */ + private final RepeatedInt options = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 FailedIdxes = 3;</code> + */ + private final RepeatedInt failedIdxes = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .NPCAffinityInfo Infos = 6;</code> + */ + private final RepeatedMessage<NPCAffinityInfo> infos = RepeatedMessage.newEmptyInstance(NPCAffinityInfo.getFactory()); + + private SelectOptionsEventCaseData() { + } + + /** + * @return a new empty instance of {@code SelectOptionsEventCaseData} + */ + public static SelectOptionsEventCaseData newInstance() { + return new SelectOptionsEventCaseData(); + } + + /** + * <code>optional uint32 EvtId = 1;</code> + * @return whether the evtId field is set + */ + public boolean hasEvtId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 EvtId = 1;</code> + * @return this + */ + public SelectOptionsEventCaseData clearEvtId() { + bitField0_ &= ~0x00000001; + evtId = 0; + return this; + } + + /** + * <code>optional uint32 EvtId = 1;</code> + * @return the evtId + */ + public int getEvtId() { + return evtId; + } + + /** + * <code>optional uint32 EvtId = 1;</code> + * @param value the evtId to set + * @return this + */ + public SelectOptionsEventCaseData setEvtId(final int value) { + bitField0_ |= 0x00000001; + evtId = value; + return this; + } + + /** + * <code>optional uint32 NPCId = 4;</code> + * @return whether the nPCId field is set + */ + public boolean hasNPCId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 NPCId = 4;</code> + * @return this + */ + public SelectOptionsEventCaseData clearNPCId() { + bitField0_ &= ~0x00000002; + nPCId = 0; + return this; + } + + /** + * <code>optional uint32 NPCId = 4;</code> + * @return the nPCId + */ + public int getNPCId() { + return nPCId; + } + + /** + * <code>optional uint32 NPCId = 4;</code> + * @param value the nPCId to set + * @return this + */ + public SelectOptionsEventCaseData setNPCId(final int value) { + bitField0_ |= 0x00000002; + nPCId = value; + return this; + } + + /** + * <code>optional bool Done = 5;</code> + * @return whether the done field is set + */ + public boolean hasDone() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool Done = 5;</code> + * @return this + */ + public SelectOptionsEventCaseData clearDone() { + bitField0_ &= ~0x00000004; + done = false; + return this; + } + + /** + * <code>optional bool Done = 5;</code> + * @return the done + */ + public boolean getDone() { + return done; + } + + /** + * <code>optional bool Done = 5;</code> + * @param value the done to set + * @return this + */ + public SelectOptionsEventCaseData setDone(final boolean value) { + bitField0_ |= 0x00000004; + done = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SelectOptionsEventCaseData clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SelectOptionsEventCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SelectOptionsEventCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SelectOptionsEventCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @return whether the options field is set + */ + public boolean hasOptions() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @return this + */ + public SelectOptionsEventCaseData clearOptions() { + bitField0_ &= ~0x00000010; + options.clear(); + return this; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableOptions()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getOptions() { + return options; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableOptions() { + bitField0_ |= 0x00000010; + return options; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @param value the options to add + * @return this + */ + public SelectOptionsEventCaseData addOptions(final int value) { + bitField0_ |= 0x00000010; + options.add(value); + return this; + } + + /** + * <code>repeated uint32 Options = 2;</code> + * @param values the options to add + * @return this + */ + public SelectOptionsEventCaseData addAllOptions(final int... values) { + bitField0_ |= 0x00000010; + options.addAll(values); + return this; + } + + /** + * <code>repeated uint32 FailedIdxes = 3;</code> + * @return whether the failedIdxes field is set + */ + public boolean hasFailedIdxes() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint32 FailedIdxes = 3;</code> + * @return this + */ + public SelectOptionsEventCaseData clearFailedIdxes() { + bitField0_ &= ~0x00000020; + failedIdxes.clear(); + return this; + } + + /** + * <code>repeated uint32 FailedIdxes = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFailedIdxes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getFailedIdxes() { + return failedIdxes; + } + + /** + * <code>repeated uint32 FailedIdxes = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableFailedIdxes() { + bitField0_ |= 0x00000020; + return failedIdxes; + } + + /** + * <code>repeated uint32 FailedIdxes = 3;</code> + * @param value the failedIdxes to add + * @return this + */ + public SelectOptionsEventCaseData addFailedIdxes(final int value) { + bitField0_ |= 0x00000020; + failedIdxes.add(value); + return this; + } + + /** + * <code>repeated uint32 FailedIdxes = 3;</code> + * @param values the failedIdxes to add + * @return this + */ + public SelectOptionsEventCaseData addAllFailedIdxes(final int... values) { + bitField0_ |= 0x00000020; + failedIdxes.addAll(values); + return this; + } + + /** + * <code>repeated .NPCAffinityInfo Infos = 6;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated .NPCAffinityInfo Infos = 6;</code> + * @return this + */ + public SelectOptionsEventCaseData clearInfos() { + bitField0_ &= ~0x00000040; + infos.clear(); + return this; + } + + /** + * <code>repeated .NPCAffinityInfo Infos = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<NPCAffinityInfo> getInfos() { + return infos; + } + + /** + * <code>repeated .NPCAffinityInfo Infos = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<NPCAffinityInfo> getMutableInfos() { + bitField0_ |= 0x00000040; + return infos; + } + + /** + * <code>repeated .NPCAffinityInfo Infos = 6;</code> + * @param value the infos to add + * @return this + */ + public SelectOptionsEventCaseData addInfos(final NPCAffinityInfo value) { + bitField0_ |= 0x00000040; + infos.add(value); + return this; + } + + /** + * <code>repeated .NPCAffinityInfo Infos = 6;</code> + * @param values the infos to add + * @return this + */ + public SelectOptionsEventCaseData addAllInfos(final NPCAffinityInfo... values) { + bitField0_ |= 0x00000040; + infos.addAll(values); + return this; + } + + @Override + public SelectOptionsEventCaseData copyFrom(final SelectOptionsEventCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + evtId = other.evtId; + nPCId = other.nPCId; + done = other.done; + nextPackage.copyFrom(other.nextPackage); + options.copyFrom(other.options); + failedIdxes.copyFrom(other.failedIdxes); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public SelectOptionsEventCaseData mergeFrom(final SelectOptionsEventCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEvtId()) { + setEvtId(other.evtId); + } + if (other.hasNPCId()) { + setNPCId(other.nPCId); + } + if (other.hasDone()) { + setDone(other.done); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasOptions()) { + getMutableOptions().addAll(other.options); + } + if (other.hasFailedIdxes()) { + getMutableFailedIdxes().addAll(other.failedIdxes); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public SelectOptionsEventCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + evtId = 0; + nPCId = 0; + done = false; + nextPackage.clear(); + options.clear(); + failedIdxes.clear(); + infos.clear(); + return this; + } + + @Override + public SelectOptionsEventCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + options.clear(); + failedIdxes.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SelectOptionsEventCaseData)) { + return false; + } + SelectOptionsEventCaseData other = (SelectOptionsEventCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasEvtId() || evtId == other.evtId) + && (!hasNPCId() || nPCId == other.nPCId) + && (!hasDone() || done == other.done) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasOptions() || options.equals(other.options)) + && (!hasFailedIdxes() || failedIdxes.equals(other.failedIdxes)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(evtId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(nPCId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 40); + output.writeBoolNoTag(done); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < options.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(options.array()[i]); + } + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < failedIdxes.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(failedIdxes.array()[i]); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(evtId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(nPCId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * options.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(options); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * failedIdxes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(failedIdxes); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SelectOptionsEventCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // evtId + evtId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // nPCId + nPCId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // done + done = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // options [packed=true] + input.readPackedUInt32(options, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // failedIdxes [packed=true] + input.readPackedUInt32(failedIdxes, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000040; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // options [packed=false] + tag = input.readRepeatedUInt32(options, tag); + bitField0_ |= 0x00000010; + break; + } + case 24: { + // failedIdxes [packed=false] + tag = input.readRepeatedUInt32(failedIdxes, tag); + bitField0_ |= 0x00000020; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.evtId, evtId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.nPCId, nPCId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.done, done); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.options, options); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt32(FieldNames.failedIdxes, failedIdxes); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public SelectOptionsEventCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 67352126: { + if (input.isAtField(FieldNames.evtId)) { + if (!input.trySkipNullValue()) { + evtId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 74484668: { + if (input.isAtField(FieldNames.nPCId)) { + if (!input.trySkipNullValue()) { + nPCId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2135970: { + if (input.isAtField(FieldNames.done)) { + if (!input.trySkipNullValue()) { + done = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 415178366: { + if (input.isAtField(FieldNames.options)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(options); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1998268878: { + if (input.isAtField(FieldNames.failedIdxes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(failedIdxes); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SelectOptionsEventCaseData clone() { + return new SelectOptionsEventCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SelectOptionsEventCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SelectOptionsEventCaseData(), data).checkInitialized(); + } + + public static SelectOptionsEventCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectOptionsEventCaseData(), input).checkInitialized(); + } + + public static SelectOptionsEventCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectOptionsEventCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating SelectOptionsEventCaseData messages + */ + public static MessageFactory<SelectOptionsEventCaseData> getFactory() { + return SelectOptionsEventCaseDataFactory.INSTANCE; + } + + private enum SelectOptionsEventCaseDataFactory implements MessageFactory<SelectOptionsEventCaseData> { + INSTANCE; + + @Override + public SelectOptionsEventCaseData create() { + return SelectOptionsEventCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName evtId = FieldName.forField("EvtId"); + + static final FieldName nPCId = FieldName.forField("NPCId"); + + static final FieldName done = FieldName.forField("Done"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName options = FieldName.forField("Options"); + + static final FieldName failedIdxes = FieldName.forField("FailedIdxes"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code SelectFateCardCaseData} + */ + public static final class SelectFateCardCaseData extends ProtoMessage<SelectFateCardCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + */ + private int reRollPrice; + + /** + * <code>optional bool Give = 3;</code> + */ + private boolean give; + + /** + * <code>optional bool CanReRoll = 7;</code> + */ + private boolean canReRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Ids = 1;</code> + */ + private final RepeatedInt ids = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 NewIds = 2;</code> + */ + private final RepeatedInt newIds = RepeatedInt.newEmptyInstance(); + + private SelectFateCardCaseData() { + } + + /** + * @return a new empty instance of {@code SelectFateCardCaseData} + */ + public static SelectFateCardCaseData newInstance() { + return new SelectFateCardCaseData(); + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return whether the reRollPrice field is set + */ + public boolean hasReRollPrice() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return this + */ + public SelectFateCardCaseData clearReRollPrice() { + bitField0_ &= ~0x00000001; + reRollPrice = 0; + return this; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return the reRollPrice + */ + public int getReRollPrice() { + return reRollPrice; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @param value the reRollPrice to set + * @return this + */ + public SelectFateCardCaseData setReRollPrice(final int value) { + bitField0_ |= 0x00000001; + reRollPrice = value; + return this; + } + + /** + * <code>optional bool Give = 3;</code> + * @return whether the give field is set + */ + public boolean hasGive() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Give = 3;</code> + * @return this + */ + public SelectFateCardCaseData clearGive() { + bitField0_ &= ~0x00000002; + give = false; + return this; + } + + /** + * <code>optional bool Give = 3;</code> + * @return the give + */ + public boolean getGive() { + return give; + } + + /** + * <code>optional bool Give = 3;</code> + * @param value the give to set + * @return this + */ + public SelectFateCardCaseData setGive(final boolean value) { + bitField0_ |= 0x00000002; + give = value; + return this; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return whether the canReRoll field is set + */ + public boolean hasCanReRoll() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return this + */ + public SelectFateCardCaseData clearCanReRoll() { + bitField0_ &= ~0x00000004; + canReRoll = false; + return this; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return the canReRoll + */ + public boolean getCanReRoll() { + return canReRoll; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @param value the canReRoll to set + * @return this + */ + public SelectFateCardCaseData setCanReRoll(final boolean value) { + bitField0_ |= 0x00000004; + canReRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SelectFateCardCaseData clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SelectFateCardCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SelectFateCardCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SelectFateCardCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @return whether the ids field is set + */ + public boolean hasIds() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @return this + */ + public SelectFateCardCaseData clearIds() { + bitField0_ &= ~0x00000010; + ids.clear(); + return this; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getIds() { + return ids; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableIds() { + bitField0_ |= 0x00000010; + return ids; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @param value the ids to add + * @return this + */ + public SelectFateCardCaseData addIds(final int value) { + bitField0_ |= 0x00000010; + ids.add(value); + return this; + } + + /** + * <code>repeated uint32 Ids = 1;</code> + * @param values the ids to add + * @return this + */ + public SelectFateCardCaseData addAllIds(final int... values) { + bitField0_ |= 0x00000010; + ids.addAll(values); + return this; + } + + /** + * <code>repeated uint32 NewIds = 2;</code> + * @return whether the newIds field is set + */ + public boolean hasNewIds() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint32 NewIds = 2;</code> + * @return this + */ + public SelectFateCardCaseData clearNewIds() { + bitField0_ &= ~0x00000020; + newIds.clear(); + return this; + } + + /** + * <code>repeated uint32 NewIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNewIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getNewIds() { + return newIds; + } + + /** + * <code>repeated uint32 NewIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableNewIds() { + bitField0_ |= 0x00000020; + return newIds; + } + + /** + * <code>repeated uint32 NewIds = 2;</code> + * @param value the newIds to add + * @return this + */ + public SelectFateCardCaseData addNewIds(final int value) { + bitField0_ |= 0x00000020; + newIds.add(value); + return this; + } + + /** + * <code>repeated uint32 NewIds = 2;</code> + * @param values the newIds to add + * @return this + */ + public SelectFateCardCaseData addAllNewIds(final int... values) { + bitField0_ |= 0x00000020; + newIds.addAll(values); + return this; + } + + @Override + public SelectFateCardCaseData copyFrom(final SelectFateCardCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + reRollPrice = other.reRollPrice; + give = other.give; + canReRoll = other.canReRoll; + nextPackage.copyFrom(other.nextPackage); + ids.copyFrom(other.ids); + newIds.copyFrom(other.newIds); + } + return this; + } + + @Override + public SelectFateCardCaseData mergeFrom(final SelectFateCardCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasReRollPrice()) { + setReRollPrice(other.reRollPrice); + } + if (other.hasGive()) { + setGive(other.give); + } + if (other.hasCanReRoll()) { + setCanReRoll(other.canReRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasIds()) { + getMutableIds().addAll(other.ids); + } + if (other.hasNewIds()) { + getMutableNewIds().addAll(other.newIds); + } + return this; + } + + @Override + public SelectFateCardCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + reRollPrice = 0; + give = false; + canReRoll = false; + nextPackage.clear(); + ids.clear(); + newIds.clear(); + return this; + } + + @Override + public SelectFateCardCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + ids.clear(); + newIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SelectFateCardCaseData)) { + return false; + } + SelectFateCardCaseData other = (SelectFateCardCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasReRollPrice() || reRollPrice == other.reRollPrice) + && (!hasGive() || give == other.give) + && (!hasCanReRoll() || canReRoll == other.canReRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasIds() || ids.equals(other.ids)) + && (!hasNewIds() || newIds.equals(other.newIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(reRollPrice); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(give); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(canReRoll); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < ids.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(ids.array()[i]); + } + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < newIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(newIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(reRollPrice); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * ids.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ids); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * newIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(newIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SelectFateCardCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 64: { + // reRollPrice + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // give + give = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // canReRoll + canReRoll = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // ids [packed=true] + input.readPackedUInt32(ids, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // newIds [packed=true] + input.readPackedUInt32(newIds, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // ids [packed=false] + tag = input.readRepeatedUInt32(ids, tag); + bitField0_ |= 0x00000010; + break; + } + case 16: { + // newIds [packed=false] + tag = input.readRepeatedUInt32(newIds, tag); + bitField0_ |= 0x00000020; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.reRollPrice, reRollPrice); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.give, give); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.canReRoll, canReRoll); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.ids, ids); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt32(FieldNames.newIds, newIds); + } + output.endObject(); + } + + @Override + public SelectFateCardCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1462629959: { + if (input.isAtField(FieldNames.reRollPrice)) { + if (!input.trySkipNullValue()) { + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2219825: { + if (input.isAtField(FieldNames.give)) { + if (!input.trySkipNullValue()) { + give = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1993089312: { + if (input.isAtField(FieldNames.canReRoll)) { + if (!input.trySkipNullValue()) { + canReRoll = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73368: { + if (input.isAtField(FieldNames.ids)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(ids); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1964999400: { + if (input.isAtField(FieldNames.newIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(newIds); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SelectFateCardCaseData clone() { + return new SelectFateCardCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SelectFateCardCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SelectFateCardCaseData(), data).checkInitialized(); + } + + public static SelectFateCardCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectFateCardCaseData(), input).checkInitialized(); + } + + public static SelectFateCardCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SelectFateCardCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating SelectFateCardCaseData messages + */ + public static MessageFactory<SelectFateCardCaseData> getFactory() { + return SelectFateCardCaseDataFactory.INSTANCE; + } + + private enum SelectFateCardCaseDataFactory implements MessageFactory<SelectFateCardCaseData> { + INSTANCE; + + @Override + public SelectFateCardCaseData create() { + return SelectFateCardCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName reRollPrice = FieldName.forField("ReRollPrice"); + + static final FieldName give = FieldName.forField("Give"); + + static final FieldName canReRoll = FieldName.forField("CanReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName ids = FieldName.forField("Ids"); + + static final FieldName newIds = FieldName.forField("NewIds"); + } + } + + /** + * Protobuf type {@code RecoveryHPCaseData} + */ + public static final class RecoveryHPCaseData extends ProtoMessage<RecoveryHPCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 EffectId = 1;</code> + */ + private int effectId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private RecoveryHPCaseData() { + } + + /** + * @return a new empty instance of {@code RecoveryHPCaseData} + */ + public static RecoveryHPCaseData newInstance() { + return new RecoveryHPCaseData(); + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @return whether the effectId field is set + */ + public boolean hasEffectId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @return this + */ + public RecoveryHPCaseData clearEffectId() { + bitField0_ &= ~0x00000001; + effectId = 0; + return this; + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @return the effectId + */ + public int getEffectId() { + return effectId; + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @param value the effectId to set + * @return this + */ + public RecoveryHPCaseData setEffectId(final int value) { + bitField0_ |= 0x00000001; + effectId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RecoveryHPCaseData clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RecoveryHPCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RecoveryHPCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RecoveryHPCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public RecoveryHPCaseData copyFrom(final RecoveryHPCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + effectId = other.effectId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RecoveryHPCaseData mergeFrom(final RecoveryHPCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEffectId()) { + setEffectId(other.effectId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RecoveryHPCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + effectId = 0; + nextPackage.clear(); + return this; + } + + @Override + public RecoveryHPCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RecoveryHPCaseData)) { + return false; + } + RecoveryHPCaseData other = (RecoveryHPCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasEffectId() || effectId == other.effectId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(effectId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(effectId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RecoveryHPCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // effectId + effectId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.effectId, effectId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public RecoveryHPCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -952564052: { + if (input.isAtField(FieldNames.effectId)) { + if (!input.trySkipNullValue()) { + effectId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RecoveryHPCaseData clone() { + return new RecoveryHPCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RecoveryHPCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RecoveryHPCaseData(), data).checkInitialized(); + } + + public static RecoveryHPCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RecoveryHPCaseData(), input).checkInitialized(); + } + + public static RecoveryHPCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RecoveryHPCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating RecoveryHPCaseData messages + */ + public static MessageFactory<RecoveryHPCaseData> getFactory() { + return RecoveryHPCaseDataFactory.INSTANCE; + } + + private enum RecoveryHPCaseDataFactory implements MessageFactory<RecoveryHPCaseData> { + INSTANCE; + + @Override + public RecoveryHPCaseData create() { + return RecoveryHPCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName effectId = FieldName.forField("EffectId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code NpcRecoveryHPCaseData} + */ + public static final class NpcRecoveryHPCaseData extends ProtoMessage<NpcRecoveryHPCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 EffectId = 1;</code> + */ + private int effectId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private NpcRecoveryHPCaseData() { + } + + /** + * @return a new empty instance of {@code NpcRecoveryHPCaseData} + */ + public static NpcRecoveryHPCaseData newInstance() { + return new NpcRecoveryHPCaseData(); + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @return whether the effectId field is set + */ + public boolean hasEffectId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @return this + */ + public NpcRecoveryHPCaseData clearEffectId() { + bitField0_ &= ~0x00000001; + effectId = 0; + return this; + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @return the effectId + */ + public int getEffectId() { + return effectId; + } + + /** + * <code>optional uint32 EffectId = 1;</code> + * @param value the effectId to set + * @return this + */ + public NpcRecoveryHPCaseData setEffectId(final int value) { + bitField0_ |= 0x00000001; + effectId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public NpcRecoveryHPCaseData clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public NpcRecoveryHPCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public NpcRecoveryHPCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public NpcRecoveryHPCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public NpcRecoveryHPCaseData copyFrom(final NpcRecoveryHPCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + effectId = other.effectId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NpcRecoveryHPCaseData mergeFrom(final NpcRecoveryHPCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEffectId()) { + setEffectId(other.effectId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NpcRecoveryHPCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + effectId = 0; + nextPackage.clear(); + return this; + } + + @Override + public NpcRecoveryHPCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NpcRecoveryHPCaseData)) { + return false; + } + NpcRecoveryHPCaseData other = (NpcRecoveryHPCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasEffectId() || effectId == other.effectId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(effectId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(effectId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NpcRecoveryHPCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // effectId + effectId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.effectId, effectId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public NpcRecoveryHPCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -952564052: { + if (input.isAtField(FieldNames.effectId)) { + if (!input.trySkipNullValue()) { + effectId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NpcRecoveryHPCaseData clone() { + return new NpcRecoveryHPCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NpcRecoveryHPCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NpcRecoveryHPCaseData(), data).checkInitialized(); + } + + public static NpcRecoveryHPCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NpcRecoveryHPCaseData(), input).checkInitialized(); + } + + public static NpcRecoveryHPCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NpcRecoveryHPCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating NpcRecoveryHPCaseData messages + */ + public static MessageFactory<NpcRecoveryHPCaseData> getFactory() { + return NpcRecoveryHPCaseDataFactory.INSTANCE; + } + + private enum NpcRecoveryHPCaseDataFactory implements MessageFactory<NpcRecoveryHPCaseData> { + INSTANCE; + + @Override + public NpcRecoveryHPCaseData create() { + return NpcRecoveryHPCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName effectId = FieldName.forField("EffectId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code SyncHPCaseData} + */ + public static final class SyncHPCaseData extends ProtoMessage<SyncHPCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SyncHPCaseData() { + } + + /** + * @return a new empty instance of {@code SyncHPCaseData} + */ + public static SyncHPCaseData newInstance() { + return new SyncHPCaseData(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SyncHPCaseData clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SyncHPCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SyncHPCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SyncHPCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SyncHPCaseData copyFrom(final SyncHPCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SyncHPCaseData mergeFrom(final SyncHPCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SyncHPCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public SyncHPCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SyncHPCaseData)) { + return false; + } + SyncHPCaseData other = (SyncHPCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SyncHPCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SyncHPCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SyncHPCaseData clone() { + return new SyncHPCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SyncHPCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SyncHPCaseData(), data).checkInitialized(); + } + + public static SyncHPCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SyncHPCaseData(), input).checkInitialized(); + } + + public static SyncHPCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SyncHPCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating SyncHPCaseData messages + */ + public static MessageFactory<SyncHPCaseData> getFactory() { + return SyncHPCaseDataFactory.INSTANCE; + } + + private enum SyncHPCaseDataFactory implements MessageFactory<SyncHPCaseData> { + INSTANCE; + + @Override + public SyncHPCaseData create() { + return SyncHPCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code HawkerGoods} + */ + public static final class HawkerGoods extends ProtoMessage<HawkerGoods> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Price = 4;</code> + */ + private int price; + + /** + * <code>optional int32 Discount = 5;</code> + */ + private int discount; + + /** + * <code>optional uint32 Sid = 1;</code> + */ + private int sid; + + /** + * <code>optional uint32 Idx = 2;</code> + */ + private int idx; + + /** + * <code>optional uint32 CharPos = 3;</code> + */ + private int charPos; + + /** + * <code>optional uint32 Type = 6;</code> + */ + private int type; + + /** + * <code>optional uint32 GoodsId = 7;</code> + */ + private int goodsId; + + /** + * <code>optional uint32 Tag = 15;</code> + */ + private int tag_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private HawkerGoods() { + } + + /** + * @return a new empty instance of {@code HawkerGoods} + */ + public static HawkerGoods newInstance() { + return new HawkerGoods(); + } + + /** + * <code>optional int32 Price = 4;</code> + * @return whether the price field is set + */ + public boolean hasPrice() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Price = 4;</code> + * @return this + */ + public HawkerGoods clearPrice() { + bitField0_ &= ~0x00000001; + price = 0; + return this; + } + + /** + * <code>optional int32 Price = 4;</code> + * @return the price + */ + public int getPrice() { + return price; + } + + /** + * <code>optional int32 Price = 4;</code> + * @param value the price to set + * @return this + */ + public HawkerGoods setPrice(final int value) { + bitField0_ |= 0x00000001; + price = value; + return this; + } + + /** + * <code>optional int32 Discount = 5;</code> + * @return whether the discount field is set + */ + public boolean hasDiscount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional int32 Discount = 5;</code> + * @return this + */ + public HawkerGoods clearDiscount() { + bitField0_ &= ~0x00000002; + discount = 0; + return this; + } + + /** + * <code>optional int32 Discount = 5;</code> + * @return the discount + */ + public int getDiscount() { + return discount; + } + + /** + * <code>optional int32 Discount = 5;</code> + * @param value the discount to set + * @return this + */ + public HawkerGoods setDiscount(final int value) { + bitField0_ |= 0x00000002; + discount = value; + return this; + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @return whether the sid field is set + */ + public boolean hasSid() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @return this + */ + public HawkerGoods clearSid() { + bitField0_ &= ~0x00000004; + sid = 0; + return this; + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @return the sid + */ + public int getSid() { + return sid; + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @param value the sid to set + * @return this + */ + public HawkerGoods setSid(final int value) { + bitField0_ |= 0x00000004; + sid = value; + return this; + } + + /** + * <code>optional uint32 Idx = 2;</code> + * @return whether the idx field is set + */ + public boolean hasIdx() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Idx = 2;</code> + * @return this + */ + public HawkerGoods clearIdx() { + bitField0_ &= ~0x00000008; + idx = 0; + return this; + } + + /** + * <code>optional uint32 Idx = 2;</code> + * @return the idx + */ + public int getIdx() { + return idx; + } + + /** + * <code>optional uint32 Idx = 2;</code> + * @param value the idx to set + * @return this + */ + public HawkerGoods setIdx(final int value) { + bitField0_ |= 0x00000008; + idx = value; + return this; + } + + /** + * <code>optional uint32 CharPos = 3;</code> + * @return whether the charPos field is set + */ + public boolean hasCharPos() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 CharPos = 3;</code> + * @return this + */ + public HawkerGoods clearCharPos() { + bitField0_ &= ~0x00000010; + charPos = 0; + return this; + } + + /** + * <code>optional uint32 CharPos = 3;</code> + * @return the charPos + */ + public int getCharPos() { + return charPos; + } + + /** + * <code>optional uint32 CharPos = 3;</code> + * @param value the charPos to set + * @return this + */ + public HawkerGoods setCharPos(final int value) { + bitField0_ |= 0x00000010; + charPos = value; + return this; + } + + /** + * <code>optional uint32 Type = 6;</code> + * @return whether the type field is set + */ + public boolean hasType() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 Type = 6;</code> + * @return this + */ + public HawkerGoods clearType() { + bitField0_ &= ~0x00000020; + type = 0; + return this; + } + + /** + * <code>optional uint32 Type = 6;</code> + * @return the type + */ + public int getType() { + return type; + } + + /** + * <code>optional uint32 Type = 6;</code> + * @param value the type to set + * @return this + */ + public HawkerGoods setType(final int value) { + bitField0_ |= 0x00000020; + type = value; + return this; + } + + /** + * <code>optional uint32 GoodsId = 7;</code> + * @return whether the goodsId field is set + */ + public boolean hasGoodsId() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 GoodsId = 7;</code> + * @return this + */ + public HawkerGoods clearGoodsId() { + bitField0_ &= ~0x00000040; + goodsId = 0; + return this; + } + + /** + * <code>optional uint32 GoodsId = 7;</code> + * @return the goodsId + */ + public int getGoodsId() { + return goodsId; + } + + /** + * <code>optional uint32 GoodsId = 7;</code> + * @param value the goodsId to set + * @return this + */ + public HawkerGoods setGoodsId(final int value) { + bitField0_ |= 0x00000040; + goodsId = value; + return this; + } + + /** + * <code>optional uint32 Tag = 15;</code> + * @return whether the tag_ field is set + */ + public boolean hasTag() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional uint32 Tag = 15;</code> + * @return this + */ + public HawkerGoods clearTag() { + bitField0_ &= ~0x00000080; + tag_ = 0; + return this; + } + + /** + * <code>optional uint32 Tag = 15;</code> + * @return the tag_ + */ + public int getTag() { + return tag_; + } + + /** + * <code>optional uint32 Tag = 15;</code> + * @param value the tag_ to set + * @return this + */ + public HawkerGoods setTag(final int value) { + bitField0_ |= 0x00000080; + tag_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public HawkerGoods clearNextPackage() { + bitField0_ &= ~0x00000100; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000100; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public HawkerGoods addNextPackage(final byte value) { + bitField0_ |= 0x00000100; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public HawkerGoods addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public HawkerGoods setNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.copyFrom(values); + return this; + } + + @Override + public HawkerGoods copyFrom(final HawkerGoods other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + price = other.price; + discount = other.discount; + sid = other.sid; + idx = other.idx; + charPos = other.charPos; + type = other.type; + goodsId = other.goodsId; + tag_ = other.tag_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HawkerGoods mergeFrom(final HawkerGoods other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPrice()) { + setPrice(other.price); + } + if (other.hasDiscount()) { + setDiscount(other.discount); + } + if (other.hasSid()) { + setSid(other.sid); + } + if (other.hasIdx()) { + setIdx(other.idx); + } + if (other.hasCharPos()) { + setCharPos(other.charPos); + } + if (other.hasType()) { + setType(other.type); + } + if (other.hasGoodsId()) { + setGoodsId(other.goodsId); + } + if (other.hasTag()) { + setTag(other.tag_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public HawkerGoods clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + price = 0; + discount = 0; + sid = 0; + idx = 0; + charPos = 0; + type = 0; + goodsId = 0; + tag_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public HawkerGoods clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof HawkerGoods)) { + return false; + } + HawkerGoods other = (HawkerGoods) o; + return bitField0_ == other.bitField0_ + && (!hasPrice() || price == other.price) + && (!hasDiscount() || discount == other.discount) + && (!hasSid() || sid == other.sid) + && (!hasIdx() || idx == other.idx) + && (!hasCharPos() || charPos == other.charPos) + && (!hasType() || type == other.type) + && (!hasGoodsId() || goodsId == other.goodsId) + && (!hasTag() || tag_ == other.tag_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeInt32NoTag(price); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 40); + output.writeInt32NoTag(discount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(sid); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(idx); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(charPos); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(type); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(goodsId); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(tag_); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(price); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(discount); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sid); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(idx); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charPos); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(type); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsId); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tag_); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public HawkerGoods mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // price + price = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // discount + discount = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // sid + sid = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // idx + idx = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // charPos + charPos = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // type + type = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // goodsId + goodsId = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // tag_ + tag_ = input.readUInt32(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.price, price); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.discount, discount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.sid, sid); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.idx, idx); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.charPos, charPos); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.type, type); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.goodsId, goodsId); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeUInt32(FieldNames.tag_, tag_); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public HawkerGoods mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 77381929: { + if (input.isAtField(FieldNames.price)) { + if (!input.trySkipNullValue()) { + price = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 337828193: { + if (input.isAtField(FieldNames.discount)) { + if (!input.trySkipNullValue()) { + discount = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 83118: { + if (input.isAtField(FieldNames.sid)) { + if (!input.trySkipNullValue()) { + sid = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73373: { + if (input.isAtField(FieldNames.idx)) { + if (!input.trySkipNullValue()) { + idx = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1891272962: { + if (input.isAtField(FieldNames.charPos)) { + if (!input.trySkipNullValue()) { + charPos = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2622298: { + if (input.isAtField(FieldNames.type)) { + if (!input.trySkipNullValue()) { + type = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1871690481: { + if (input.isAtField(FieldNames.goodsId)) { + if (!input.trySkipNullValue()) { + goodsId = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 83834: { + if (input.isAtField(FieldNames.tag_)) { + if (!input.trySkipNullValue()) { + tag_ = input.readUInt32(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public HawkerGoods clone() { + return new HawkerGoods().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static HawkerGoods parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new HawkerGoods(), data).checkInitialized(); + } + + public static HawkerGoods parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new HawkerGoods(), input).checkInitialized(); + } + + public static HawkerGoods parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new HawkerGoods(), input).checkInitialized(); + } + + /** + * @return factory for creating HawkerGoods messages + */ + public static MessageFactory<HawkerGoods> getFactory() { + return HawkerGoodsFactory.INSTANCE; + } + + private enum HawkerGoodsFactory implements MessageFactory<HawkerGoods> { + INSTANCE; + + @Override + public HawkerGoods create() { + return HawkerGoods.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName price = FieldName.forField("Price"); + + static final FieldName discount = FieldName.forField("Discount"); + + static final FieldName sid = FieldName.forField("Sid"); + + static final FieldName idx = FieldName.forField("Idx"); + + static final FieldName charPos = FieldName.forField("CharPos"); + + static final FieldName type = FieldName.forField("Type"); + + static final FieldName goodsId = FieldName.forField("GoodsId"); + + static final FieldName tag_ = FieldName.forField("Tag"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code HawkerCaseData} + */ + public static final class HawkerCaseData extends ProtoMessage<HawkerCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + */ + private int reRollPrice; + + /** + * <code>optional uint32 ReRollTimes = 9;</code> + */ + private int reRollTimes; + + /** + * <code>optional bool CanReRoll = 7;</code> + */ + private boolean canReRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Purchase = 2;</code> + */ + private final RepeatedInt purchase = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .HawkerGoods List = 1;</code> + */ + private final RepeatedMessage<HawkerGoods> list = RepeatedMessage.newEmptyInstance(HawkerGoods.getFactory()); + + private HawkerCaseData() { + } + + /** + * @return a new empty instance of {@code HawkerCaseData} + */ + public static HawkerCaseData newInstance() { + return new HawkerCaseData(); + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return whether the reRollPrice field is set + */ + public boolean hasReRollPrice() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return this + */ + public HawkerCaseData clearReRollPrice() { + bitField0_ &= ~0x00000001; + reRollPrice = 0; + return this; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @return the reRollPrice + */ + public int getReRollPrice() { + return reRollPrice; + } + + /** + * <code>optional uint32 ReRollPrice = 8;</code> + * @param value the reRollPrice to set + * @return this + */ + public HawkerCaseData setReRollPrice(final int value) { + bitField0_ |= 0x00000001; + reRollPrice = value; + return this; + } + + /** + * <code>optional uint32 ReRollTimes = 9;</code> + * @return whether the reRollTimes field is set + */ + public boolean hasReRollTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 ReRollTimes = 9;</code> + * @return this + */ + public HawkerCaseData clearReRollTimes() { + bitField0_ &= ~0x00000002; + reRollTimes = 0; + return this; + } + + /** + * <code>optional uint32 ReRollTimes = 9;</code> + * @return the reRollTimes + */ + public int getReRollTimes() { + return reRollTimes; + } + + /** + * <code>optional uint32 ReRollTimes = 9;</code> + * @param value the reRollTimes to set + * @return this + */ + public HawkerCaseData setReRollTimes(final int value) { + bitField0_ |= 0x00000002; + reRollTimes = value; + return this; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return whether the canReRoll field is set + */ + public boolean hasCanReRoll() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return this + */ + public HawkerCaseData clearCanReRoll() { + bitField0_ &= ~0x00000004; + canReRoll = false; + return this; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @return the canReRoll + */ + public boolean getCanReRoll() { + return canReRoll; + } + + /** + * <code>optional bool CanReRoll = 7;</code> + * @param value the canReRoll to set + * @return this + */ + public HawkerCaseData setCanReRoll(final boolean value) { + bitField0_ |= 0x00000004; + canReRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public HawkerCaseData clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public HawkerCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public HawkerCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public HawkerCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Purchase = 2;</code> + * @return whether the purchase field is set + */ + public boolean hasPurchase() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint32 Purchase = 2;</code> + * @return this + */ + public HawkerCaseData clearPurchase() { + bitField0_ &= ~0x00000010; + purchase.clear(); + return this; + } + + /** + * <code>repeated uint32 Purchase = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePurchase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getPurchase() { + return purchase; + } + + /** + * <code>repeated uint32 Purchase = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutablePurchase() { + bitField0_ |= 0x00000010; + return purchase; + } + + /** + * <code>repeated uint32 Purchase = 2;</code> + * @param value the purchase to add + * @return this + */ + public HawkerCaseData addPurchase(final int value) { + bitField0_ |= 0x00000010; + purchase.add(value); + return this; + } + + /** + * <code>repeated uint32 Purchase = 2;</code> + * @param values the purchase to add + * @return this + */ + public HawkerCaseData addAllPurchase(final int... values) { + bitField0_ |= 0x00000010; + purchase.addAll(values); + return this; + } + + /** + * <code>repeated .HawkerGoods List = 1;</code> + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated .HawkerGoods List = 1;</code> + * @return this + */ + public HawkerCaseData clearList() { + bitField0_ &= ~0x00000020; + list.clear(); + return this; + } + + /** + * <code>repeated .HawkerGoods List = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<HawkerGoods> getList() { + return list; + } + + /** + * <code>repeated .HawkerGoods List = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<HawkerGoods> getMutableList() { + bitField0_ |= 0x00000020; + return list; + } + + /** + * <code>repeated .HawkerGoods List = 1;</code> + * @param value the list to add + * @return this + */ + public HawkerCaseData addList(final HawkerGoods value) { + bitField0_ |= 0x00000020; + list.add(value); + return this; + } + + /** + * <code>repeated .HawkerGoods List = 1;</code> + * @param values the list to add + * @return this + */ + public HawkerCaseData addAllList(final HawkerGoods... values) { + bitField0_ |= 0x00000020; + list.addAll(values); + return this; + } + + @Override + public HawkerCaseData copyFrom(final HawkerCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + reRollPrice = other.reRollPrice; + reRollTimes = other.reRollTimes; + canReRoll = other.canReRoll; + nextPackage.copyFrom(other.nextPackage); + purchase.copyFrom(other.purchase); + list.copyFrom(other.list); + } + return this; + } + + @Override + public HawkerCaseData mergeFrom(final HawkerCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasReRollPrice()) { + setReRollPrice(other.reRollPrice); + } + if (other.hasReRollTimes()) { + setReRollTimes(other.reRollTimes); + } + if (other.hasCanReRoll()) { + setCanReRoll(other.canReRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasPurchase()) { + getMutablePurchase().addAll(other.purchase); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public HawkerCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + reRollPrice = 0; + reRollTimes = 0; + canReRoll = false; + nextPackage.clear(); + purchase.clear(); + list.clear(); + return this; + } + + @Override + public HawkerCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + purchase.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof HawkerCaseData)) { + return false; + } + HawkerCaseData other = (HawkerCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasReRollPrice() || reRollPrice == other.reRollPrice) + && (!hasReRollTimes() || reRollTimes == other.reRollTimes) + && (!hasCanReRoll() || canReRoll == other.canReRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasPurchase() || purchase.equals(other.purchase)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(reRollPrice); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(reRollTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(canReRoll); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < purchase.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(purchase.array()[i]); + } + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(reRollPrice); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(reRollTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * purchase.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(purchase); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public HawkerCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 64: { + // reRollPrice + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // reRollTimes + reRollTimes = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // canReRoll + canReRoll = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // purchase [packed=true] + input.readPackedUInt32(purchase, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // purchase [packed=false] + tag = input.readRepeatedUInt32(purchase, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.reRollPrice, reRollPrice); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.reRollTimes, reRollTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.canReRoll, canReRoll); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.purchase, purchase); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public HawkerCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1462629959: { + if (input.isAtField(FieldNames.reRollPrice)) { + if (!input.trySkipNullValue()) { + reRollPrice = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1459200074: { + if (input.isAtField(FieldNames.reRollTimes)) { + if (!input.trySkipNullValue()) { + reRollTimes = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1993089312: { + if (input.isAtField(FieldNames.canReRoll)) { + if (!input.trySkipNullValue()) { + canReRoll = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1807968545: { + if (input.isAtField(FieldNames.purchase)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(purchase); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public HawkerCaseData clone() { + return new HawkerCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static HawkerCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new HawkerCaseData(), data).checkInitialized(); + } + + public static HawkerCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new HawkerCaseData(), input).checkInitialized(); + } + + public static HawkerCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new HawkerCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating HawkerCaseData messages + */ + public static MessageFactory<HawkerCaseData> getFactory() { + return HawkerCaseDataFactory.INSTANCE; + } + + private enum HawkerCaseDataFactory implements MessageFactory<HawkerCaseData> { + INSTANCE; + + @Override + public HawkerCaseData create() { + return HawkerCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName reRollPrice = FieldName.forField("ReRollPrice"); + + static final FieldName reRollTimes = FieldName.forField("ReRollTimes"); + + static final FieldName canReRoll = FieldName.forField("CanReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName purchase = FieldName.forField("Purchase"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code InteractHawkerReq} + */ + public static final class InteractHawkerReq extends ProtoMessage<InteractHawkerReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Sid = 1;</code> + */ + private int sid; + + /** + * <code>optional bool ReRoll = 2;</code> + */ + private boolean reRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractHawkerReq() { + } + + /** + * @return a new empty instance of {@code InteractHawkerReq} + */ + public static InteractHawkerReq newInstance() { + return new InteractHawkerReq(); + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @return whether the sid field is set + */ + public boolean hasSid() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @return this + */ + public InteractHawkerReq clearSid() { + bitField0_ &= ~0x00000001; + sid = 0; + return this; + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @return the sid + */ + public int getSid() { + return sid; + } + + /** + * <code>optional uint32 Sid = 1;</code> + * @param value the sid to set + * @return this + */ + public InteractHawkerReq setSid(final int value) { + bitField0_ |= 0x00000001; + sid = value; + return this; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return whether the reRoll field is set + */ + public boolean hasReRoll() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return this + */ + public InteractHawkerReq clearReRoll() { + bitField0_ &= ~0x00000002; + reRoll = false; + return this; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return the reRoll + */ + public boolean getReRoll() { + return reRoll; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @param value the reRoll to set + * @return this + */ + public InteractHawkerReq setReRoll(final boolean value) { + bitField0_ |= 0x00000002; + reRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractHawkerReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractHawkerReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractHawkerReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractHawkerReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractHawkerReq copyFrom(final InteractHawkerReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + sid = other.sid; + reRoll = other.reRoll; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractHawkerReq mergeFrom(final InteractHawkerReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSid()) { + setSid(other.sid); + } + if (other.hasReRoll()) { + setReRoll(other.reRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractHawkerReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + sid = 0; + reRoll = false; + nextPackage.clear(); + return this; + } + + @Override + public InteractHawkerReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractHawkerReq)) { + return false; + } + InteractHawkerReq other = (InteractHawkerReq) o; + return bitField0_ == other.bitField0_ + && (!hasSid() || sid == other.sid) + && (!hasReRoll() || reRoll == other.reRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(sid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(reRoll); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sid); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractHawkerReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // sid + sid = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // reRoll + reRoll = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.sid, sid); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.reRoll, reRoll); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractHawkerReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 83118: { + if (input.isAtField(FieldNames.sid)) { + if (!input.trySkipNullValue()) { + sid = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851548304: { + if (input.isAtField(FieldNames.reRoll)) { + if (!input.trySkipNullValue()) { + reRoll = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractHawkerReq clone() { + return new InteractHawkerReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractHawkerReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractHawkerReq(), data).checkInitialized(); + } + + public static InteractHawkerReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractHawkerReq(), input).checkInitialized(); + } + + public static InteractHawkerReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractHawkerReq(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractHawkerReq messages + */ + public static MessageFactory<InteractHawkerReq> getFactory() { + return InteractHawkerReqFactory.INSTANCE; + } + + private enum InteractHawkerReqFactory implements MessageFactory<InteractHawkerReq> { + INSTANCE; + + @Override + public InteractHawkerReq create() { + return InteractHawkerReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName sid = FieldName.forField("Sid"); + + static final FieldName reRoll = FieldName.forField("ReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InteractStrengthenMachineResp} + */ + public static final class InteractStrengthenMachineResp extends ProtoMessage<InteractStrengthenMachineResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool BuySucceed = 1;</code> + */ + private boolean buySucceed; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractStrengthenMachineResp() { + } + + /** + * @return a new empty instance of {@code InteractStrengthenMachineResp} + */ + public static InteractStrengthenMachineResp newInstance() { + return new InteractStrengthenMachineResp(); + } + + /** + * <code>optional bool BuySucceed = 1;</code> + * @return whether the buySucceed field is set + */ + public boolean hasBuySucceed() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool BuySucceed = 1;</code> + * @return this + */ + public InteractStrengthenMachineResp clearBuySucceed() { + bitField0_ &= ~0x00000001; + buySucceed = false; + return this; + } + + /** + * <code>optional bool BuySucceed = 1;</code> + * @return the buySucceed + */ + public boolean getBuySucceed() { + return buySucceed; + } + + /** + * <code>optional bool BuySucceed = 1;</code> + * @param value the buySucceed to set + * @return this + */ + public InteractStrengthenMachineResp setBuySucceed(final boolean value) { + bitField0_ |= 0x00000001; + buySucceed = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractStrengthenMachineResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractStrengthenMachineResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractStrengthenMachineResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractStrengthenMachineResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractStrengthenMachineResp copyFrom(final InteractStrengthenMachineResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buySucceed = other.buySucceed; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractStrengthenMachineResp mergeFrom(final InteractStrengthenMachineResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuySucceed()) { + setBuySucceed(other.buySucceed); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractStrengthenMachineResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buySucceed = false; + nextPackage.clear(); + return this; + } + + @Override + public InteractStrengthenMachineResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractStrengthenMachineResp)) { + return false; + } + InteractStrengthenMachineResp other = (InteractStrengthenMachineResp) o; + return bitField0_ == other.bitField0_ + && (!hasBuySucceed() || buySucceed == other.buySucceed) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(buySucceed); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractStrengthenMachineResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // buySucceed + buySucceed = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.buySucceed, buySucceed); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractStrengthenMachineResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -879628036: { + if (input.isAtField(FieldNames.buySucceed)) { + if (!input.trySkipNullValue()) { + buySucceed = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractStrengthenMachineResp clone() { + return new InteractStrengthenMachineResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractStrengthenMachineResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractStrengthenMachineResp(), data).checkInitialized(); + } + + public static InteractStrengthenMachineResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new InteractStrengthenMachineResp(), input).checkInitialized(); + } + + public static InteractStrengthenMachineResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new InteractStrengthenMachineResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractStrengthenMachineResp messages + */ + public static MessageFactory<InteractStrengthenMachineResp> getFactory() { + return InteractStrengthenMachineRespFactory.INSTANCE; + } + + private enum InteractStrengthenMachineRespFactory implements MessageFactory<InteractStrengthenMachineResp> { + INSTANCE; + + @Override + public InteractStrengthenMachineResp create() { + return InteractStrengthenMachineResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buySucceed = FieldName.forField("BuySucceed"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StrengthenMachineCaseData} + */ + public static final class StrengthenMachineCaseData extends ProtoMessage<StrengthenMachineCaseData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Times = 1;</code> + */ + private int times; + + /** + * <code>optional uint32 Discount = 8;</code> + */ + private int discount; + + /** + * <code>optional bool FirstFree = 7;</code> + */ + private boolean firstFree; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StrengthenMachineCaseData() { + } + + /** + * @return a new empty instance of {@code StrengthenMachineCaseData} + */ + public static StrengthenMachineCaseData newInstance() { + return new StrengthenMachineCaseData(); + } + + /** + * <code>optional uint32 Times = 1;</code> + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Times = 1;</code> + * @return this + */ + public StrengthenMachineCaseData clearTimes() { + bitField0_ &= ~0x00000001; + times = 0; + return this; + } + + /** + * <code>optional uint32 Times = 1;</code> + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * <code>optional uint32 Times = 1;</code> + * @param value the times to set + * @return this + */ + public StrengthenMachineCaseData setTimes(final int value) { + bitField0_ |= 0x00000001; + times = value; + return this; + } + + /** + * <code>optional uint32 Discount = 8;</code> + * @return whether the discount field is set + */ + public boolean hasDiscount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Discount = 8;</code> + * @return this + */ + public StrengthenMachineCaseData clearDiscount() { + bitField0_ &= ~0x00000002; + discount = 0; + return this; + } + + /** + * <code>optional uint32 Discount = 8;</code> + * @return the discount + */ + public int getDiscount() { + return discount; + } + + /** + * <code>optional uint32 Discount = 8;</code> + * @param value the discount to set + * @return this + */ + public StrengthenMachineCaseData setDiscount(final int value) { + bitField0_ |= 0x00000002; + discount = value; + return this; + } + + /** + * <code>optional bool FirstFree = 7;</code> + * @return whether the firstFree field is set + */ + public boolean hasFirstFree() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool FirstFree = 7;</code> + * @return this + */ + public StrengthenMachineCaseData clearFirstFree() { + bitField0_ &= ~0x00000004; + firstFree = false; + return this; + } + + /** + * <code>optional bool FirstFree = 7;</code> + * @return the firstFree + */ + public boolean getFirstFree() { + return firstFree; + } + + /** + * <code>optional bool FirstFree = 7;</code> + * @param value the firstFree to set + * @return this + */ + public StrengthenMachineCaseData setFirstFree(final boolean value) { + bitField0_ |= 0x00000004; + firstFree = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StrengthenMachineCaseData clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StrengthenMachineCaseData addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StrengthenMachineCaseData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StrengthenMachineCaseData setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StrengthenMachineCaseData copyFrom(final StrengthenMachineCaseData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + times = other.times; + discount = other.discount; + firstFree = other.firstFree; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StrengthenMachineCaseData mergeFrom(final StrengthenMachineCaseData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasDiscount()) { + setDiscount(other.discount); + } + if (other.hasFirstFree()) { + setFirstFree(other.firstFree); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StrengthenMachineCaseData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + times = 0; + discount = 0; + firstFree = false; + nextPackage.clear(); + return this; + } + + @Override + public StrengthenMachineCaseData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StrengthenMachineCaseData)) { + return false; + } + StrengthenMachineCaseData other = (StrengthenMachineCaseData) o; + return bitField0_ == other.bitField0_ + && (!hasTimes() || times == other.times) + && (!hasDiscount() || discount == other.discount) + && (!hasFirstFree() || firstFree == other.firstFree) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(discount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(firstFree); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(discount); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StrengthenMachineCaseData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // discount + discount = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // firstFree + firstFree = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.discount, discount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.firstFree, firstFree); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StrengthenMachineCaseData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 337828193: { + if (input.isAtField(FieldNames.discount)) { + if (!input.trySkipNullValue()) { + discount = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2136581404: { + if (input.isAtField(FieldNames.firstFree)) { + if (!input.trySkipNullValue()) { + firstFree = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StrengthenMachineCaseData clone() { + return new StrengthenMachineCaseData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StrengthenMachineCaseData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StrengthenMachineCaseData(), data).checkInitialized(); + } + + public static StrengthenMachineCaseData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StrengthenMachineCaseData(), input).checkInitialized(); + } + + public static StrengthenMachineCaseData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StrengthenMachineCaseData(), input).checkInitialized(); + } + + /** + * @return factory for creating StrengthenMachineCaseData messages + */ + public static MessageFactory<StrengthenMachineCaseData> getFactory() { + return StrengthenMachineCaseDataFactory.INSTANCE; + } + + private enum StrengthenMachineCaseDataFactory implements MessageFactory<StrengthenMachineCaseData> { + INSTANCE; + + @Override + public StrengthenMachineCaseData create() { + return StrengthenMachineCaseData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName times = FieldName.forField("Times"); + + static final FieldName discount = FieldName.forField("Discount"); + + static final FieldName firstFree = FieldName.forField("FirstFree"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InteractEnterReq} + */ + public static final class InteractEnterReq extends ProtoMessage<InteractEnterReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 MapId = 1;</code> + */ + private int mapId; + + /** + * <code>optional uint32 ParamId = 2;</code> + */ + private int paramId; + + /** + * <code>optional uint32 DateLen = 3;</code> + */ + private int dateLen; + + /** + * <code>optional uint32 MapTableId = 6;</code> + */ + private int mapTableId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string ClientData = 4;</code> + */ + private final Utf8String clientData = Utf8String.newEmptyInstance(); + + /** + * <code>optional string MapParam = 5;</code> + */ + private final Utf8String mapParam = Utf8String.newEmptyInstance(); + + private InteractEnterReq() { + } + + /** + * @return a new empty instance of {@code InteractEnterReq} + */ + public static InteractEnterReq newInstance() { + return new InteractEnterReq(); + } + + /** + * <code>optional uint32 MapId = 1;</code> + * @return whether the mapId field is set + */ + public boolean hasMapId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 MapId = 1;</code> + * @return this + */ + public InteractEnterReq clearMapId() { + bitField0_ &= ~0x00000001; + mapId = 0; + return this; + } + + /** + * <code>optional uint32 MapId = 1;</code> + * @return the mapId + */ + public int getMapId() { + return mapId; + } + + /** + * <code>optional uint32 MapId = 1;</code> + * @param value the mapId to set + * @return this + */ + public InteractEnterReq setMapId(final int value) { + bitField0_ |= 0x00000001; + mapId = value; + return this; + } + + /** + * <code>optional uint32 ParamId = 2;</code> + * @return whether the paramId field is set + */ + public boolean hasParamId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 ParamId = 2;</code> + * @return this + */ + public InteractEnterReq clearParamId() { + bitField0_ &= ~0x00000002; + paramId = 0; + return this; + } + + /** + * <code>optional uint32 ParamId = 2;</code> + * @return the paramId + */ + public int getParamId() { + return paramId; + } + + /** + * <code>optional uint32 ParamId = 2;</code> + * @param value the paramId to set + * @return this + */ + public InteractEnterReq setParamId(final int value) { + bitField0_ |= 0x00000002; + paramId = value; + return this; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @return whether the dateLen field is set + */ + public boolean hasDateLen() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @return this + */ + public InteractEnterReq clearDateLen() { + bitField0_ &= ~0x00000004; + dateLen = 0; + return this; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @return the dateLen + */ + public int getDateLen() { + return dateLen; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @param value the dateLen to set + * @return this + */ + public InteractEnterReq setDateLen(final int value) { + bitField0_ |= 0x00000004; + dateLen = value; + return this; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @return whether the mapTableId field is set + */ + public boolean hasMapTableId() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @return this + */ + public InteractEnterReq clearMapTableId() { + bitField0_ &= ~0x00000008; + mapTableId = 0; + return this; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @return the mapTableId + */ + public int getMapTableId() { + return mapTableId; + } + + /** + * <code>optional uint32 MapTableId = 6;</code> + * @param value the mapTableId to set + * @return this + */ + public InteractEnterReq setMapTableId(final int value) { + bitField0_ |= 0x00000008; + mapTableId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractEnterReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractEnterReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractEnterReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractEnterReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return whether the clientData field is set + */ + public boolean hasClientData() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return this + */ + public InteractEnterReq clearClientData() { + bitField0_ &= ~0x00000020; + clientData.clear(); + return this; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return the clientData + */ + public String getClientData() { + return clientData.getString(); + } + + /** + * <code>optional string ClientData = 4;</code> + * @return internal {@code Utf8String} representation of clientData for reading + */ + public Utf8String getClientDataBytes() { + return this.clientData; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return internal {@code Utf8String} representation of clientData for modifications + */ + public Utf8String getMutableClientDataBytes() { + bitField0_ |= 0x00000020; + return this.clientData; + } + + /** + * <code>optional string ClientData = 4;</code> + * @param value the clientData to set + * @return this + */ + public InteractEnterReq setClientData(final CharSequence value) { + bitField0_ |= 0x00000020; + clientData.copyFrom(value); + return this; + } + + /** + * <code>optional string ClientData = 4;</code> + * @param value the clientData to set + * @return this + */ + public InteractEnterReq setClientData(final Utf8String value) { + bitField0_ |= 0x00000020; + clientData.copyFrom(value); + return this; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return whether the mapParam field is set + */ + public boolean hasMapParam() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return this + */ + public InteractEnterReq clearMapParam() { + bitField0_ &= ~0x00000040; + mapParam.clear(); + return this; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return the mapParam + */ + public String getMapParam() { + return mapParam.getString(); + } + + /** + * <code>optional string MapParam = 5;</code> + * @return internal {@code Utf8String} representation of mapParam for reading + */ + public Utf8String getMapParamBytes() { + return this.mapParam; + } + + /** + * <code>optional string MapParam = 5;</code> + * @return internal {@code Utf8String} representation of mapParam for modifications + */ + public Utf8String getMutableMapParamBytes() { + bitField0_ |= 0x00000040; + return this.mapParam; + } + + /** + * <code>optional string MapParam = 5;</code> + * @param value the mapParam to set + * @return this + */ + public InteractEnterReq setMapParam(final CharSequence value) { + bitField0_ |= 0x00000040; + mapParam.copyFrom(value); + return this; + } + + /** + * <code>optional string MapParam = 5;</code> + * @param value the mapParam to set + * @return this + */ + public InteractEnterReq setMapParam(final Utf8String value) { + bitField0_ |= 0x00000040; + mapParam.copyFrom(value); + return this; + } + + @Override + public InteractEnterReq copyFrom(final InteractEnterReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + mapId = other.mapId; + paramId = other.paramId; + dateLen = other.dateLen; + mapTableId = other.mapTableId; + nextPackage.copyFrom(other.nextPackage); + clientData.copyFrom(other.clientData); + mapParam.copyFrom(other.mapParam); + } + return this; + } + + @Override + public InteractEnterReq mergeFrom(final InteractEnterReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMapId()) { + setMapId(other.mapId); + } + if (other.hasParamId()) { + setParamId(other.paramId); + } + if (other.hasDateLen()) { + setDateLen(other.dateLen); + } + if (other.hasMapTableId()) { + setMapTableId(other.mapTableId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasClientData()) { + getMutableClientDataBytes().copyFrom(other.clientData); + } + if (other.hasMapParam()) { + getMutableMapParamBytes().copyFrom(other.mapParam); + } + return this; + } + + @Override + public InteractEnterReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + mapId = 0; + paramId = 0; + dateLen = 0; + mapTableId = 0; + nextPackage.clear(); + clientData.clear(); + mapParam.clear(); + return this; + } + + @Override + public InteractEnterReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + clientData.clear(); + mapParam.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractEnterReq)) { + return false; + } + InteractEnterReq other = (InteractEnterReq) o; + return bitField0_ == other.bitField0_ + && (!hasMapId() || mapId == other.mapId) + && (!hasParamId() || paramId == other.paramId) + && (!hasDateLen() || dateLen == other.dateLen) + && (!hasMapTableId() || mapTableId == other.mapTableId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasClientData() || clientData.equals(other.clientData)) + && (!hasMapParam() || mapParam.equals(other.mapParam)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(mapId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(paramId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(dateLen); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(mapTableId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 34); + output.writeStringNoTag(clientData); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 42); + output.writeStringNoTag(mapParam); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mapId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(paramId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(dateLen); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mapTableId); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(clientData); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(mapParam); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractEnterReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // mapId + mapId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // paramId + paramId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // dateLen + dateLen = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // mapTableId + mapTableId = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // clientData + input.readString(clientData); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // mapParam + input.readString(mapParam); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.mapId, mapId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.paramId, paramId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.dateLen, dateLen); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.mapTableId, mapTableId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeString(FieldNames.clientData, clientData); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeString(FieldNames.mapParam, mapParam); + } + output.endObject(); + } + + @Override + public InteractEnterReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 74110839: { + if (input.isAtField(FieldNames.mapId)) { + if (!input.trySkipNullValue()) { + mapId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 871156328: { + if (input.isAtField(FieldNames.paramId)) { + if (!input.trySkipNullValue()) { + paramId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1187017881: { + if (input.isAtField(FieldNames.dateLen)) { + if (!input.trySkipNullValue()) { + dateLen = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 556914861: { + if (input.isAtField(FieldNames.mapTableId)) { + if (!input.trySkipNullValue()) { + mapTableId = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1199548875: { + if (input.isAtField(FieldNames.clientData)) { + if (!input.trySkipNullValue()) { + input.readString(clientData); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 229302449: { + if (input.isAtField(FieldNames.mapParam)) { + if (!input.trySkipNullValue()) { + input.readString(mapParam); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractEnterReq clone() { + return new InteractEnterReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractEnterReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractEnterReq(), data).checkInitialized(); + } + + public static InteractEnterReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractEnterReq(), input).checkInitialized(); + } + + public static InteractEnterReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractEnterReq(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractEnterReq messages + */ + public static MessageFactory<InteractEnterReq> getFactory() { + return InteractEnterReqFactory.INSTANCE; + } + + private enum InteractEnterReqFactory implements MessageFactory<InteractEnterReq> { + INSTANCE; + + @Override + public InteractEnterReq create() { + return InteractEnterReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName mapId = FieldName.forField("MapId"); + + static final FieldName paramId = FieldName.forField("ParamId"); + + static final FieldName dateLen = FieldName.forField("DateLen"); + + static final FieldName mapTableId = FieldName.forField("MapTableId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName clientData = FieldName.forField("ClientData"); + + static final FieldName mapParam = FieldName.forField("MapParam"); + } + } + + /** + * Protobuf type {@code InteractEnterResp} + */ + public static final class InteractEnterResp extends ProtoMessage<InteractEnterResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .StarTowerRoom Room = 1;</code> + */ + private final StarTowerRoom room = StarTowerRoom.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractEnterResp() { + } + + /** + * @return a new empty instance of {@code InteractEnterResp} + */ + public static InteractEnterResp newInstance() { + return new InteractEnterResp(); + } + + /** + * <code>optional .StarTowerRoom Room = 1;</code> + * @return whether the room field is set + */ + public boolean hasRoom() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .StarTowerRoom Room = 1;</code> + * @return this + */ + public InteractEnterResp clearRoom() { + bitField0_ &= ~0x00000001; + room.clear(); + return this; + } + + /** + * <code>optional .StarTowerRoom Room = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRoom()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerRoom getRoom() { + return room; + } + + /** + * <code>optional .StarTowerRoom Room = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerRoom getMutableRoom() { + bitField0_ |= 0x00000001; + return room; + } + + /** + * <code>optional .StarTowerRoom Room = 1;</code> + * @param value the room to set + * @return this + */ + public InteractEnterResp setRoom(final StarTowerRoom value) { + bitField0_ |= 0x00000001; + room.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractEnterResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractEnterResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractEnterResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractEnterResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractEnterResp copyFrom(final InteractEnterResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + room.copyFrom(other.room); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractEnterResp mergeFrom(final InteractEnterResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRoom()) { + getMutableRoom().mergeFrom(other.room); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractEnterResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + room.clear(); + nextPackage.clear(); + return this; + } + + @Override + public InteractEnterResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + room.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractEnterResp)) { + return false; + } + InteractEnterResp other = (InteractEnterResp) o; + return bitField0_ == other.bitField0_ + && (!hasRoom() || room.equals(other.room)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(room); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(room); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractEnterResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // room + input.readMessage(room); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.room, room); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractEnterResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2553083: { + if (input.isAtField(FieldNames.room)) { + if (!input.trySkipNullValue()) { + input.readMessage(room); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractEnterResp clone() { + return new InteractEnterResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractEnterResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractEnterResp(), data).checkInitialized(); + } + + public static InteractEnterResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractEnterResp(), input).checkInitialized(); + } + + public static InteractEnterResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractEnterResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractEnterResp messages + */ + public static MessageFactory<InteractEnterResp> getFactory() { + return InteractEnterRespFactory.INSTANCE; + } + + private enum InteractEnterRespFactory implements MessageFactory<InteractEnterResp> { + INSTANCE; + + @Override + public InteractEnterResp create() { + return InteractEnterResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName room = FieldName.forField("Room"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InteractBattleEndReq} + */ + public static final class InteractBattleEndReq extends ProtoMessage<InteractBattleEndReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool Defeat = 2;</code> + */ + private boolean defeat; + + /** + * <code>optional .InteractBattleEndReq.VictoryData Victory = 1;</code> + */ + private final VictoryData victory = VictoryData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractBattleEndReq() { + } + + /** + * @return a new empty instance of {@code InteractBattleEndReq} + */ + public static InteractBattleEndReq newInstance() { + return new InteractBattleEndReq(); + } + + /** + * <code>optional bool Defeat = 2;</code> + * @return whether the defeat field is set + */ + public boolean hasDefeat() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool Defeat = 2;</code> + * @return this + */ + public InteractBattleEndReq clearDefeat() { + bitField0_ &= ~0x00000001; + defeat = false; + return this; + } + + /** + * <code>optional bool Defeat = 2;</code> + * @return the defeat + */ + public boolean getDefeat() { + return defeat; + } + + /** + * <code>optional bool Defeat = 2;</code> + * @param value the defeat to set + * @return this + */ + public InteractBattleEndReq setDefeat(final boolean value) { + bitField0_ |= 0x00000001; + defeat = value; + return this; + } + + /** + * <code>optional .InteractBattleEndReq.VictoryData Victory = 1;</code> + * @return whether the victory field is set + */ + public boolean hasVictory() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .InteractBattleEndReq.VictoryData Victory = 1;</code> + * @return this + */ + public InteractBattleEndReq clearVictory() { + bitField0_ &= ~0x00000002; + victory.clear(); + return this; + } + + /** + * <code>optional .InteractBattleEndReq.VictoryData Victory = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableVictory()} if you want to modify it. + * + * @return internal storage object for reading + */ + public VictoryData getVictory() { + return victory; + } + + /** + * <code>optional .InteractBattleEndReq.VictoryData Victory = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public VictoryData getMutableVictory() { + bitField0_ |= 0x00000002; + return victory; + } + + /** + * <code>optional .InteractBattleEndReq.VictoryData Victory = 1;</code> + * @param value the victory to set + * @return this + */ + public InteractBattleEndReq setVictory(final VictoryData value) { + bitField0_ |= 0x00000002; + victory.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractBattleEndReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractBattleEndReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractBattleEndReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractBattleEndReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractBattleEndReq copyFrom(final InteractBattleEndReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + defeat = other.defeat; + victory.copyFrom(other.victory); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractBattleEndReq mergeFrom(final InteractBattleEndReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDefeat()) { + setDefeat(other.defeat); + } + if (other.hasVictory()) { + getMutableVictory().mergeFrom(other.victory); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractBattleEndReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + defeat = false; + victory.clear(); + nextPackage.clear(); + return this; + } + + @Override + public InteractBattleEndReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + victory.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractBattleEndReq)) { + return false; + } + InteractBattleEndReq other = (InteractBattleEndReq) o; + return bitField0_ == other.bitField0_ + && (!hasDefeat() || defeat == other.defeat) + && (!hasVictory() || victory.equals(other.victory)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(defeat); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(victory); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(victory); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractBattleEndReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // defeat + defeat = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // victory + input.readMessage(victory); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.defeat, defeat); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.victory, victory); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractBattleEndReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2043196755: { + if (input.isAtField(FieldNames.defeat)) { + if (!input.trySkipNullValue()) { + defeat = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2116960754: { + if (input.isAtField(FieldNames.victory)) { + if (!input.trySkipNullValue()) { + input.readMessage(victory); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractBattleEndReq clone() { + return new InteractBattleEndReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractBattleEndReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractBattleEndReq(), data).checkInitialized(); + } + + public static InteractBattleEndReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractBattleEndReq(), input).checkInitialized(); + } + + public static InteractBattleEndReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractBattleEndReq(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractBattleEndReq messages + */ + public static MessageFactory<InteractBattleEndReq> getFactory() { + return InteractBattleEndReqFactory.INSTANCE; + } + + /** + * Protobuf type {@code VictoryData} + */ + public static final class VictoryData extends ProtoMessage<VictoryData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 HP = 1;</code> + */ + private int hP; + + /** + * <code>optional uint32 Time = 2;</code> + */ + private int time; + + /** + * <code>optional uint32 DateLen = 3;</code> + */ + private int dateLen; + + /** + * <code>optional .Events Events = 15;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional string ClientData = 4;</code> + */ + private final Utf8String clientData = Utf8String.newEmptyInstance(); + + /** + * <code>repeated uint32 Damages = 6;</code> + */ + private final RepeatedInt damages = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .FateCardUsage fateCardUsage = 5;</code> + */ + private final RepeatedMessage<FateCardUsage> fateCardUsage = RepeatedMessage.newEmptyInstance(FateCardUsage.getFactory()); + + private VictoryData() { + } + + /** + * @return a new empty instance of {@code VictoryData} + */ + public static VictoryData newInstance() { + return new VictoryData(); + } + + /** + * <code>optional uint32 HP = 1;</code> + * @return whether the hP field is set + */ + public boolean hasHP() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 HP = 1;</code> + * @return this + */ + public VictoryData clearHP() { + bitField0_ &= ~0x00000001; + hP = 0; + return this; + } + + /** + * <code>optional uint32 HP = 1;</code> + * @return the hP + */ + public int getHP() { + return hP; + } + + /** + * <code>optional uint32 HP = 1;</code> + * @param value the hP to set + * @return this + */ + public VictoryData setHP(final int value) { + bitField0_ |= 0x00000001; + hP = value; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return this + */ + public VictoryData clearTime() { + bitField0_ &= ~0x00000002; + time = 0; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return the time + */ + public int getTime() { + return time; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @param value the time to set + * @return this + */ + public VictoryData setTime(final int value) { + bitField0_ |= 0x00000002; + time = value; + return this; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @return whether the dateLen field is set + */ + public boolean hasDateLen() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @return this + */ + public VictoryData clearDateLen() { + bitField0_ &= ~0x00000004; + dateLen = 0; + return this; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @return the dateLen + */ + public int getDateLen() { + return dateLen; + } + + /** + * <code>optional uint32 DateLen = 3;</code> + * @param value the dateLen to set + * @return this + */ + public VictoryData setDateLen(final int value) { + bitField0_ |= 0x00000004; + dateLen = value; + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return this + */ + public VictoryData clearEvents() { + bitField0_ &= ~0x00000008; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000008; + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * @param value the events to set + * @return this + */ + public VictoryData setEvents(final Public.Events value) { + bitField0_ |= 0x00000008; + events.copyFrom(value); + return this; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return whether the clientData field is set + */ + public boolean hasClientData() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return this + */ + public VictoryData clearClientData() { + bitField0_ &= ~0x00000010; + clientData.clear(); + return this; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return the clientData + */ + public String getClientData() { + return clientData.getString(); + } + + /** + * <code>optional string ClientData = 4;</code> + * @return internal {@code Utf8String} representation of clientData for reading + */ + public Utf8String getClientDataBytes() { + return this.clientData; + } + + /** + * <code>optional string ClientData = 4;</code> + * @return internal {@code Utf8String} representation of clientData for modifications + */ + public Utf8String getMutableClientDataBytes() { + bitField0_ |= 0x00000010; + return this.clientData; + } + + /** + * <code>optional string ClientData = 4;</code> + * @param value the clientData to set + * @return this + */ + public VictoryData setClientData(final CharSequence value) { + bitField0_ |= 0x00000010; + clientData.copyFrom(value); + return this; + } + + /** + * <code>optional string ClientData = 4;</code> + * @param value the clientData to set + * @return this + */ + public VictoryData setClientData(final Utf8String value) { + bitField0_ |= 0x00000010; + clientData.copyFrom(value); + return this; + } + + /** + * <code>repeated uint32 Damages = 6;</code> + * @return whether the damages field is set + */ + public boolean hasDamages() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint32 Damages = 6;</code> + * @return this + */ + public VictoryData clearDamages() { + bitField0_ &= ~0x00000020; + damages.clear(); + return this; + } + + /** + * <code>repeated uint32 Damages = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDamages()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDamages() { + return damages; + } + + /** + * <code>repeated uint32 Damages = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDamages() { + bitField0_ |= 0x00000020; + return damages; + } + + /** + * <code>repeated uint32 Damages = 6;</code> + * @param value the damages to add + * @return this + */ + public VictoryData addDamages(final int value) { + bitField0_ |= 0x00000020; + damages.add(value); + return this; + } + + /** + * <code>repeated uint32 Damages = 6;</code> + * @param values the damages to add + * @return this + */ + public VictoryData addAllDamages(final int... values) { + bitField0_ |= 0x00000020; + damages.addAll(values); + return this; + } + + /** + * <code>repeated .FateCardUsage fateCardUsage = 5;</code> + * @return whether the fateCardUsage field is set + */ + public boolean hasFateCardUsage() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated .FateCardUsage fateCardUsage = 5;</code> + * @return this + */ + public VictoryData clearFateCardUsage() { + bitField0_ &= ~0x00000040; + fateCardUsage.clear(); + return this; + } + + /** + * <code>repeated .FateCardUsage fateCardUsage = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFateCardUsage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<FateCardUsage> getFateCardUsage() { + return fateCardUsage; + } + + /** + * <code>repeated .FateCardUsage fateCardUsage = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<FateCardUsage> getMutableFateCardUsage() { + bitField0_ |= 0x00000040; + return fateCardUsage; + } + + /** + * <code>repeated .FateCardUsage fateCardUsage = 5;</code> + * @param value the fateCardUsage to add + * @return this + */ + public VictoryData addFateCardUsage(final FateCardUsage value) { + bitField0_ |= 0x00000040; + fateCardUsage.add(value); + return this; + } + + /** + * <code>repeated .FateCardUsage fateCardUsage = 5;</code> + * @param values the fateCardUsage to add + * @return this + */ + public VictoryData addAllFateCardUsage(final FateCardUsage... values) { + bitField0_ |= 0x00000040; + fateCardUsage.addAll(values); + return this; + } + + @Override + public VictoryData copyFrom(final VictoryData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + hP = other.hP; + time = other.time; + dateLen = other.dateLen; + events.copyFrom(other.events); + clientData.copyFrom(other.clientData); + damages.copyFrom(other.damages); + fateCardUsage.copyFrom(other.fateCardUsage); + } + return this; + } + + @Override + public VictoryData mergeFrom(final VictoryData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasHP()) { + setHP(other.hP); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasDateLen()) { + setDateLen(other.dateLen); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasClientData()) { + getMutableClientDataBytes().copyFrom(other.clientData); + } + if (other.hasDamages()) { + getMutableDamages().addAll(other.damages); + } + if (other.hasFateCardUsage()) { + getMutableFateCardUsage().addAll(other.fateCardUsage); + } + return this; + } + + @Override + public VictoryData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + hP = 0; + time = 0; + dateLen = 0; + events.clear(); + clientData.clear(); + damages.clear(); + fateCardUsage.clear(); + return this; + } + + @Override + public VictoryData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + clientData.clear(); + damages.clear(); + fateCardUsage.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VictoryData)) { + return false; + } + VictoryData other = (VictoryData) o; + return bitField0_ == other.bitField0_ + && (!hasHP() || hP == other.hP) + && (!hasTime() || time == other.time) + && (!hasDateLen() || dateLen == other.dateLen) + && (!hasEvents() || events.equals(other.events)) + && (!hasClientData() || clientData.equals(other.clientData)) + && (!hasDamages() || damages.equals(other.damages)) + && (!hasFateCardUsage() || fateCardUsage.equals(other.fateCardUsage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(hP); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(dateLen); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 34); + output.writeStringNoTag(clientData); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < damages.length(); i++) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(damages.array()[i]); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < fateCardUsage.length(); i++) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(fateCardUsage.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(hP); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(dateLen); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(clientData); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * damages.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(damages); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * fateCardUsage.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(fateCardUsage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VictoryData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // hP + hP = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // dateLen + dateLen = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // clientData + input.readString(clientData); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // damages [packed=true] + input.readPackedUInt32(damages, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // fateCardUsage + tag = input.readRepeatedMessage(fateCardUsage, tag); + bitField0_ |= 0x00000040; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 48: { + // damages [packed=false] + tag = input.readRepeatedUInt32(damages, tag); + bitField0_ |= 0x00000020; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.hP, hP); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.dateLen, dateLen); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeString(FieldNames.clientData, clientData); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt32(FieldNames.damages, damages); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.fateCardUsage, fateCardUsage); + } + output.endObject(); + } + + @Override + public VictoryData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2312: { + if (input.isAtField(FieldNames.hP)) { + if (!input.trySkipNullValue()) { + hP = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1187017881: { + if (input.isAtField(FieldNames.dateLen)) { + if (!input.trySkipNullValue()) { + dateLen = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1199548875: { + if (input.isAtField(FieldNames.clientData)) { + if (!input.trySkipNullValue()) { + input.readString(clientData); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1193575740: { + if (input.isAtField(FieldNames.damages)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(damages); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 862485861: { + if (input.isAtField(FieldNames.fateCardUsage)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(fateCardUsage); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VictoryData clone() { + return new VictoryData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VictoryData parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VictoryData(), data).checkInitialized(); + } + + public static VictoryData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VictoryData(), input).checkInitialized(); + } + + public static VictoryData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VictoryData(), input).checkInitialized(); + } + + /** + * @return factory for creating VictoryData messages + */ + public static MessageFactory<VictoryData> getFactory() { + return VictoryDataFactory.INSTANCE; + } + + private enum VictoryDataFactory implements MessageFactory<VictoryData> { + INSTANCE; + + @Override + public VictoryData create() { + return VictoryData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName hP = FieldName.forField("HP"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName dateLen = FieldName.forField("DateLen"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName clientData = FieldName.forField("ClientData"); + + static final FieldName damages = FieldName.forField("Damages"); + + static final FieldName fateCardUsage = FieldName.forField("fateCardUsage"); + } + } + + private enum InteractBattleEndReqFactory implements MessageFactory<InteractBattleEndReq> { + INSTANCE; + + @Override + public InteractBattleEndReq create() { + return InteractBattleEndReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName defeat = FieldName.forField("Defeat"); + + static final FieldName victory = FieldName.forField("Victory"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InteractBattleEndResp} + */ + public static final class InteractBattleEndResp extends ProtoMessage<InteractBattleEndResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .InteractBattleEndResp.VictoryData Victory = 1;</code> + */ + private final VictoryData victory = VictoryData.newInstance(); + + /** + * <code>optional .InteractBattleEndResp.DefeatData Defeat = 2;</code> + */ + private final DefeatData defeat = DefeatData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractBattleEndResp() { + } + + /** + * @return a new empty instance of {@code InteractBattleEndResp} + */ + public static InteractBattleEndResp newInstance() { + return new InteractBattleEndResp(); + } + + /** + * <code>optional .InteractBattleEndResp.VictoryData Victory = 1;</code> + * @return whether the victory field is set + */ + public boolean hasVictory() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .InteractBattleEndResp.VictoryData Victory = 1;</code> + * @return this + */ + public InteractBattleEndResp clearVictory() { + bitField0_ &= ~0x00000001; + victory.clear(); + return this; + } + + /** + * <code>optional .InteractBattleEndResp.VictoryData Victory = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableVictory()} if you want to modify it. + * + * @return internal storage object for reading + */ + public VictoryData getVictory() { + return victory; + } + + /** + * <code>optional .InteractBattleEndResp.VictoryData Victory = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public VictoryData getMutableVictory() { + bitField0_ |= 0x00000001; + return victory; + } + + /** + * <code>optional .InteractBattleEndResp.VictoryData Victory = 1;</code> + * @param value the victory to set + * @return this + */ + public InteractBattleEndResp setVictory(final VictoryData value) { + bitField0_ |= 0x00000001; + victory.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractBattleEndResp.DefeatData Defeat = 2;</code> + * @return whether the defeat field is set + */ + public boolean hasDefeat() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .InteractBattleEndResp.DefeatData Defeat = 2;</code> + * @return this + */ + public InteractBattleEndResp clearDefeat() { + bitField0_ &= ~0x00000002; + defeat.clear(); + return this; + } + + /** + * <code>optional .InteractBattleEndResp.DefeatData Defeat = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDefeat()} if you want to modify it. + * + * @return internal storage object for reading + */ + public DefeatData getDefeat() { + return defeat; + } + + /** + * <code>optional .InteractBattleEndResp.DefeatData Defeat = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public DefeatData getMutableDefeat() { + bitField0_ |= 0x00000002; + return defeat; + } + + /** + * <code>optional .InteractBattleEndResp.DefeatData Defeat = 2;</code> + * @param value the defeat to set + * @return this + */ + public InteractBattleEndResp setDefeat(final DefeatData value) { + bitField0_ |= 0x00000002; + defeat.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractBattleEndResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractBattleEndResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractBattleEndResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractBattleEndResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractBattleEndResp copyFrom(final InteractBattleEndResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + victory.copyFrom(other.victory); + defeat.copyFrom(other.defeat); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractBattleEndResp mergeFrom(final InteractBattleEndResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasVictory()) { + getMutableVictory().mergeFrom(other.victory); + } + if (other.hasDefeat()) { + getMutableDefeat().mergeFrom(other.defeat); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractBattleEndResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + victory.clear(); + defeat.clear(); + nextPackage.clear(); + return this; + } + + @Override + public InteractBattleEndResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + victory.clearQuick(); + defeat.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractBattleEndResp)) { + return false; + } + InteractBattleEndResp other = (InteractBattleEndResp) o; + return bitField0_ == other.bitField0_ + && (!hasVictory() || victory.equals(other.victory)) + && (!hasDefeat() || defeat.equals(other.defeat)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(victory); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(victory); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractBattleEndResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // victory + input.readMessage(victory); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // defeat + input.readMessage(defeat); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.victory, victory); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.defeat, defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractBattleEndResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2116960754: { + if (input.isAtField(FieldNames.victory)) { + if (!input.trySkipNullValue()) { + input.readMessage(victory); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2043196755: { + if (input.isAtField(FieldNames.defeat)) { + if (!input.trySkipNullValue()) { + input.readMessage(defeat); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractBattleEndResp clone() { + return new InteractBattleEndResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractBattleEndResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractBattleEndResp(), data).checkInitialized(); + } + + public static InteractBattleEndResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractBattleEndResp(), input).checkInitialized(); + } + + public static InteractBattleEndResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractBattleEndResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractBattleEndResp messages + */ + public static MessageFactory<InteractBattleEndResp> getFactory() { + return InteractBattleEndRespFactory.INSTANCE; + } + + /** + * Protobuf type {@code VictoryData} + */ + public static final class VictoryData extends ProtoMessage<VictoryData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Exp = 1;</code> + */ + private int exp; + + /** + * <code>optional uint32 Lv = 2;</code> + */ + private int lv; + + /** + * <code>optional uint32 BattleTime = 10;</code> + */ + private int battleTime; + + private VictoryData() { + } + + /** + * @return a new empty instance of {@code VictoryData} + */ + public static VictoryData newInstance() { + return new VictoryData(); + } + + /** + * <code>optional uint32 Exp = 1;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Exp = 1;</code> + * @return this + */ + public VictoryData clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 1;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 1;</code> + * @param value the exp to set + * @return this + */ + public VictoryData setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * <code>optional uint32 Lv = 2;</code> + * @return whether the lv field is set + */ + public boolean hasLv() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Lv = 2;</code> + * @return this + */ + public VictoryData clearLv() { + bitField0_ &= ~0x00000002; + lv = 0; + return this; + } + + /** + * <code>optional uint32 Lv = 2;</code> + * @return the lv + */ + public int getLv() { + return lv; + } + + /** + * <code>optional uint32 Lv = 2;</code> + * @param value the lv to set + * @return this + */ + public VictoryData setLv(final int value) { + bitField0_ |= 0x00000002; + lv = value; + return this; + } + + /** + * <code>optional uint32 BattleTime = 10;</code> + * @return whether the battleTime field is set + */ + public boolean hasBattleTime() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 BattleTime = 10;</code> + * @return this + */ + public VictoryData clearBattleTime() { + bitField0_ &= ~0x00000004; + battleTime = 0; + return this; + } + + /** + * <code>optional uint32 BattleTime = 10;</code> + * @return the battleTime + */ + public int getBattleTime() { + return battleTime; + } + + /** + * <code>optional uint32 BattleTime = 10;</code> + * @param value the battleTime to set + * @return this + */ + public VictoryData setBattleTime(final int value) { + bitField0_ |= 0x00000004; + battleTime = value; + return this; + } + + @Override + public VictoryData copyFrom(final VictoryData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + lv = other.lv; + battleTime = other.battleTime; + } + return this; + } + + @Override + public VictoryData mergeFrom(final VictoryData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasLv()) { + setLv(other.lv); + } + if (other.hasBattleTime()) { + setBattleTime(other.battleTime); + } + return this; + } + + @Override + public VictoryData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + lv = 0; + battleTime = 0; + return this; + } + + @Override + public VictoryData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VictoryData)) { + return false; + } + VictoryData other = (VictoryData) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasLv() || lv == other.lv) + && (!hasBattleTime() || battleTime == other.battleTime); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(lv); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(battleTime); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(lv); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(battleTime); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VictoryData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // lv + lv = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 80) { + break; + } + } + case 80: { + // battleTime + battleTime = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.lv, lv); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.battleTime, battleTime); + } + output.endObject(); + } + + @Override + public VictoryData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2474: { + if (input.isAtField(FieldNames.lv)) { + if (!input.trySkipNullValue()) { + lv = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -247801915: { + if (input.isAtField(FieldNames.battleTime)) { + if (!input.trySkipNullValue()) { + battleTime = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VictoryData clone() { + return new VictoryData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VictoryData parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VictoryData(), data).checkInitialized(); + } + + public static VictoryData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VictoryData(), input).checkInitialized(); + } + + public static VictoryData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VictoryData(), input).checkInitialized(); + } + + /** + * @return factory for creating VictoryData messages + */ + public static MessageFactory<VictoryData> getFactory() { + return VictoryDataFactory.INSTANCE; + } + + private enum VictoryDataFactory implements MessageFactory<VictoryData> { + INSTANCE; + + @Override + public VictoryData create() { + return VictoryData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName lv = FieldName.forField("Lv"); + + static final FieldName battleTime = FieldName.forField("BattleTime"); + } + } + + /** + * Protobuf type {@code DefeatData} + */ + public static final class DefeatData extends ProtoMessage<DefeatData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Lv = 1;</code> + */ + private int lv; + + private DefeatData() { + } + + /** + * @return a new empty instance of {@code DefeatData} + */ + public static DefeatData newInstance() { + return new DefeatData(); + } + + /** + * <code>optional uint32 Lv = 1;</code> + * @return whether the lv field is set + */ + public boolean hasLv() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Lv = 1;</code> + * @return this + */ + public DefeatData clearLv() { + bitField0_ &= ~0x00000001; + lv = 0; + return this; + } + + /** + * <code>optional uint32 Lv = 1;</code> + * @return the lv + */ + public int getLv() { + return lv; + } + + /** + * <code>optional uint32 Lv = 1;</code> + * @param value the lv to set + * @return this + */ + public DefeatData setLv(final int value) { + bitField0_ |= 0x00000001; + lv = value; + return this; + } + + @Override + public DefeatData copyFrom(final DefeatData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lv = other.lv; + } + return this; + } + + @Override + public DefeatData mergeFrom(final DefeatData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLv()) { + setLv(other.lv); + } + return this; + } + + @Override + public DefeatData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lv = 0; + return this; + } + + @Override + public DefeatData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DefeatData)) { + return false; + } + DefeatData other = (DefeatData) o; + return bitField0_ == other.bitField0_ + && (!hasLv() || lv == other.lv); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(lv); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(lv); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DefeatData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // lv + lv = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.lv, lv); + } + output.endObject(); + } + + @Override + public DefeatData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2474: { + if (input.isAtField(FieldNames.lv)) { + if (!input.trySkipNullValue()) { + lv = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DefeatData clone() { + return new DefeatData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DefeatData parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DefeatData(), data).checkInitialized(); + } + + public static DefeatData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DefeatData(), input).checkInitialized(); + } + + public static DefeatData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DefeatData(), input).checkInitialized(); + } + + /** + * @return factory for creating DefeatData messages + */ + public static MessageFactory<DefeatData> getFactory() { + return DefeatDataFactory.INSTANCE; + } + + private enum DefeatDataFactory implements MessageFactory<DefeatData> { + INSTANCE; + + @Override + public DefeatData create() { + return DefeatData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lv = FieldName.forField("Lv"); + } + } + + private enum InteractBattleEndRespFactory implements MessageFactory<InteractBattleEndResp> { + INSTANCE; + + @Override + public InteractBattleEndResp create() { + return InteractBattleEndResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName victory = FieldName.forField("Victory"); + + static final FieldName defeat = FieldName.forField("Defeat"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InteractRecoveryHPReq} + */ + public static final class InteractRecoveryHPReq extends ProtoMessage<InteractRecoveryHPReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Hp = 1;</code> + */ + private int hp; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractRecoveryHPReq() { + } + + /** + * @return a new empty instance of {@code InteractRecoveryHPReq} + */ + public static InteractRecoveryHPReq newInstance() { + return new InteractRecoveryHPReq(); + } + + /** + * <code>optional uint32 Hp = 1;</code> + * @return whether the hp field is set + */ + public boolean hasHp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Hp = 1;</code> + * @return this + */ + public InteractRecoveryHPReq clearHp() { + bitField0_ &= ~0x00000001; + hp = 0; + return this; + } + + /** + * <code>optional uint32 Hp = 1;</code> + * @return the hp + */ + public int getHp() { + return hp; + } + + /** + * <code>optional uint32 Hp = 1;</code> + * @param value the hp to set + * @return this + */ + public InteractRecoveryHPReq setHp(final int value) { + bitField0_ |= 0x00000001; + hp = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractRecoveryHPReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractRecoveryHPReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractRecoveryHPReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractRecoveryHPReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractRecoveryHPReq copyFrom(final InteractRecoveryHPReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + hp = other.hp; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractRecoveryHPReq mergeFrom(final InteractRecoveryHPReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasHp()) { + setHp(other.hp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractRecoveryHPReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + hp = 0; + nextPackage.clear(); + return this; + } + + @Override + public InteractRecoveryHPReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractRecoveryHPReq)) { + return false; + } + InteractRecoveryHPReq other = (InteractRecoveryHPReq) o; + return bitField0_ == other.bitField0_ + && (!hasHp() || hp == other.hp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(hp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(hp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractRecoveryHPReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // hp + hp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.hp, hp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractRecoveryHPReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2344: { + if (input.isAtField(FieldNames.hp)) { + if (!input.trySkipNullValue()) { + hp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractRecoveryHPReq clone() { + return new InteractRecoveryHPReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractRecoveryHPReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractRecoveryHPReq(), data).checkInitialized(); + } + + public static InteractRecoveryHPReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractRecoveryHPReq(), input).checkInitialized(); + } + + public static InteractRecoveryHPReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractRecoveryHPReq(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractRecoveryHPReq messages + */ + public static MessageFactory<InteractRecoveryHPReq> getFactory() { + return InteractRecoveryHPReqFactory.INSTANCE; + } + + private enum InteractRecoveryHPReqFactory implements MessageFactory<InteractRecoveryHPReq> { + INSTANCE; + + @Override + public InteractRecoveryHPReq create() { + return InteractRecoveryHPReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName hp = FieldName.forField("Hp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FateCardUsage} + */ + public static final class FateCardUsage extends ProtoMessage<FateCardUsage> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Times = 2;</code> + */ + private int times; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FateCardUsage() { + } + + /** + * @return a new empty instance of {@code FateCardUsage} + */ + public static FateCardUsage newInstance() { + return new FateCardUsage(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public FateCardUsage clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public FateCardUsage setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return this + */ + public FateCardUsage clearTimes() { + bitField0_ &= ~0x00000002; + times = 0; + return this; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @param value the times to set + * @return this + */ + public FateCardUsage setTimes(final int value) { + bitField0_ |= 0x00000002; + times = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public FateCardUsage clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public FateCardUsage addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public FateCardUsage addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public FateCardUsage setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FateCardUsage copyFrom(final FateCardUsage other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + times = other.times; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FateCardUsage mergeFrom(final FateCardUsage other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FateCardUsage clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + times = 0; + nextPackage.clear(); + return this; + } + + @Override + public FateCardUsage clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FateCardUsage)) { + return false; + } + FateCardUsage other = (FateCardUsage) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTimes() || times == other.times) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FateCardUsage mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FateCardUsage mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FateCardUsage clone() { + return new FateCardUsage().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FateCardUsage parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FateCardUsage(), data).checkInitialized(); + } + + public static FateCardUsage parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FateCardUsage(), input).checkInitialized(); + } + + public static FateCardUsage parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FateCardUsage(), input).checkInitialized(); + } + + /** + * @return factory for creating FateCardUsage messages + */ + public static MessageFactory<FateCardUsage> getFactory() { + return FateCardUsageFactory.INSTANCE; + } + + private enum FateCardUsageFactory implements MessageFactory<FateCardUsage> { + INSTANCE; + + @Override + public FateCardUsage create() { + return FateCardUsage.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName times = FieldName.forField("Times"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InteractSelectReq} + */ + public static final class InteractSelectReq extends ProtoMessage<InteractSelectReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Index = 1;</code> + */ + private int index; + + /** + * <code>optional bool ReRoll = 2;</code> + */ + private boolean reRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractSelectReq() { + } + + /** + * @return a new empty instance of {@code InteractSelectReq} + */ + public static InteractSelectReq newInstance() { + return new InteractSelectReq(); + } + + /** + * <code>optional uint32 Index = 1;</code> + * @return whether the index field is set + */ + public boolean hasIndex() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Index = 1;</code> + * @return this + */ + public InteractSelectReq clearIndex() { + bitField0_ &= ~0x00000001; + index = 0; + return this; + } + + /** + * <code>optional uint32 Index = 1;</code> + * @return the index + */ + public int getIndex() { + return index; + } + + /** + * <code>optional uint32 Index = 1;</code> + * @param value the index to set + * @return this + */ + public InteractSelectReq setIndex(final int value) { + bitField0_ |= 0x00000001; + index = value; + return this; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return whether the reRoll field is set + */ + public boolean hasReRoll() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return this + */ + public InteractSelectReq clearReRoll() { + bitField0_ &= ~0x00000002; + reRoll = false; + return this; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return the reRoll + */ + public boolean getReRoll() { + return reRoll; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @param value the reRoll to set + * @return this + */ + public InteractSelectReq setReRoll(final boolean value) { + bitField0_ |= 0x00000002; + reRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractSelectReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractSelectReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractSelectReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractSelectReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractSelectReq copyFrom(final InteractSelectReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + index = other.index; + reRoll = other.reRoll; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractSelectReq mergeFrom(final InteractSelectReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasIndex()) { + setIndex(other.index); + } + if (other.hasReRoll()) { + setReRoll(other.reRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractSelectReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + index = 0; + reRoll = false; + nextPackage.clear(); + return this; + } + + @Override + public InteractSelectReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractSelectReq)) { + return false; + } + InteractSelectReq other = (InteractSelectReq) o; + return bitField0_ == other.bitField0_ + && (!hasIndex() || index == other.index) + && (!hasReRoll() || reRoll == other.reRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(reRoll); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractSelectReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // index + index = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // reRoll + reRoll = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.index, index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.reRoll, reRoll); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractSelectReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70793394: { + if (input.isAtField(FieldNames.index)) { + if (!input.trySkipNullValue()) { + index = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851548304: { + if (input.isAtField(FieldNames.reRoll)) { + if (!input.trySkipNullValue()) { + reRoll = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractSelectReq clone() { + return new InteractSelectReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractSelectReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractSelectReq(), data).checkInitialized(); + } + + public static InteractSelectReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractSelectReq(), input).checkInitialized(); + } + + public static InteractSelectReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractSelectReq(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractSelectReq messages + */ + public static MessageFactory<InteractSelectReq> getFactory() { + return InteractSelectReqFactory.INSTANCE; + } + + private enum InteractSelectReqFactory implements MessageFactory<InteractSelectReq> { + INSTANCE; + + @Override + public InteractSelectReq create() { + return InteractSelectReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName index = FieldName.forField("Index"); + + static final FieldName reRoll = FieldName.forField("ReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code InteractSelectResp} + */ + public static final class InteractSelectResp extends ProtoMessage<InteractSelectResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .InteractSelectResp.Success Resp = 1;</code> + */ + private final Success resp = Success.newInstance(); + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 2;</code> + */ + private final SelectSpecialPotentialCaseData selectSpecialPotentialCase = SelectSpecialPotentialCaseData.newInstance(); + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 3;</code> + */ + private final SelectPotentialCaseData selectPotentialCase = SelectPotentialCaseData.newInstance(); + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 4;</code> + */ + private final SelectFateCardCaseData selectFateCardCase = SelectFateCardCaseData.newInstance(); + + /** + * <code>optional .HawkerCaseData HawkerCase = 5;</code> + */ + private final HawkerCaseData hawkerCase = HawkerCaseData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private InteractSelectResp() { + } + + /** + * @return a new empty instance of {@code InteractSelectResp} + */ + public static InteractSelectResp newInstance() { + return new InteractSelectResp(); + } + + /** + * <code>optional .InteractSelectResp.Success Resp = 1;</code> + * @return whether the resp field is set + */ + public boolean hasResp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .InteractSelectResp.Success Resp = 1;</code> + * @return this + */ + public InteractSelectResp clearResp() { + bitField0_ &= ~0x00000001; + resp.clear(); + return this; + } + + /** + * <code>optional .InteractSelectResp.Success Resp = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Success getResp() { + return resp; + } + + /** + * <code>optional .InteractSelectResp.Success Resp = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Success getMutableResp() { + bitField0_ |= 0x00000001; + return resp; + } + + /** + * <code>optional .InteractSelectResp.Success Resp = 1;</code> + * @param value the resp to set + * @return this + */ + public InteractSelectResp setResp(final Success value) { + bitField0_ |= 0x00000001; + resp.copyFrom(value); + return this; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 2;</code> + * @return whether the selectSpecialPotentialCase field is set + */ + public boolean hasSelectSpecialPotentialCase() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 2;</code> + * @return this + */ + public InteractSelectResp clearSelectSpecialPotentialCase() { + bitField0_ &= ~0x00000002; + selectSpecialPotentialCase.clear(); + return this; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectSpecialPotentialCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SelectSpecialPotentialCaseData getSelectSpecialPotentialCase() { + return selectSpecialPotentialCase; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SelectSpecialPotentialCaseData getMutableSelectSpecialPotentialCase() { + bitField0_ |= 0x00000002; + return selectSpecialPotentialCase; + } + + /** + * <code>optional .SelectSpecialPotentialCaseData SelectSpecialPotentialCase = 2;</code> + * @param value the selectSpecialPotentialCase to set + * @return this + */ + public InteractSelectResp setSelectSpecialPotentialCase( + final SelectSpecialPotentialCaseData value) { + bitField0_ |= 0x00000002; + selectSpecialPotentialCase.copyFrom(value); + return this; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 3;</code> + * @return whether the selectPotentialCase field is set + */ + public boolean hasSelectPotentialCase() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 3;</code> + * @return this + */ + public InteractSelectResp clearSelectPotentialCase() { + bitField0_ &= ~0x00000004; + selectPotentialCase.clear(); + return this; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectPotentialCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SelectPotentialCaseData getSelectPotentialCase() { + return selectPotentialCase; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SelectPotentialCaseData getMutableSelectPotentialCase() { + bitField0_ |= 0x00000004; + return selectPotentialCase; + } + + /** + * <code>optional .SelectPotentialCaseData SelectPotentialCase = 3;</code> + * @param value the selectPotentialCase to set + * @return this + */ + public InteractSelectResp setSelectPotentialCase(final SelectPotentialCaseData value) { + bitField0_ |= 0x00000004; + selectPotentialCase.copyFrom(value); + return this; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 4;</code> + * @return whether the selectFateCardCase field is set + */ + public boolean hasSelectFateCardCase() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 4;</code> + * @return this + */ + public InteractSelectResp clearSelectFateCardCase() { + bitField0_ &= ~0x00000008; + selectFateCardCase.clear(); + return this; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectFateCardCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public SelectFateCardCaseData getSelectFateCardCase() { + return selectFateCardCase; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public SelectFateCardCaseData getMutableSelectFateCardCase() { + bitField0_ |= 0x00000008; + return selectFateCardCase; + } + + /** + * <code>optional .SelectFateCardCaseData SelectFateCardCase = 4;</code> + * @param value the selectFateCardCase to set + * @return this + */ + public InteractSelectResp setSelectFateCardCase(final SelectFateCardCaseData value) { + bitField0_ |= 0x00000008; + selectFateCardCase.copyFrom(value); + return this; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 5;</code> + * @return whether the hawkerCase field is set + */ + public boolean hasHawkerCase() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 5;</code> + * @return this + */ + public InteractSelectResp clearHawkerCase() { + bitField0_ &= ~0x00000010; + hawkerCase.clear(); + return this; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHawkerCase()} if you want to modify it. + * + * @return internal storage object for reading + */ + public HawkerCaseData getHawkerCase() { + return hawkerCase; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public HawkerCaseData getMutableHawkerCase() { + bitField0_ |= 0x00000010; + return hawkerCase; + } + + /** + * <code>optional .HawkerCaseData HawkerCase = 5;</code> + * @param value the hawkerCase to set + * @return this + */ + public InteractSelectResp setHawkerCase(final HawkerCaseData value) { + bitField0_ |= 0x00000010; + hawkerCase.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public InteractSelectResp clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public InteractSelectResp addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public InteractSelectResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public InteractSelectResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + @Override + public InteractSelectResp copyFrom(final InteractSelectResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + resp.copyFrom(other.resp); + selectSpecialPotentialCase.copyFrom(other.selectSpecialPotentialCase); + selectPotentialCase.copyFrom(other.selectPotentialCase); + selectFateCardCase.copyFrom(other.selectFateCardCase); + hawkerCase.copyFrom(other.hawkerCase); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractSelectResp mergeFrom(final InteractSelectResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasResp()) { + getMutableResp().mergeFrom(other.resp); + } + if (other.hasSelectSpecialPotentialCase()) { + getMutableSelectSpecialPotentialCase().mergeFrom(other.selectSpecialPotentialCase); + } + if (other.hasSelectPotentialCase()) { + getMutableSelectPotentialCase().mergeFrom(other.selectPotentialCase); + } + if (other.hasSelectFateCardCase()) { + getMutableSelectFateCardCase().mergeFrom(other.selectFateCardCase); + } + if (other.hasHawkerCase()) { + getMutableHawkerCase().mergeFrom(other.hawkerCase); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public InteractSelectResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + resp.clear(); + selectSpecialPotentialCase.clear(); + selectPotentialCase.clear(); + selectFateCardCase.clear(); + hawkerCase.clear(); + nextPackage.clear(); + return this; + } + + @Override + public InteractSelectResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + resp.clearQuick(); + selectSpecialPotentialCase.clearQuick(); + selectPotentialCase.clearQuick(); + selectFateCardCase.clearQuick(); + hawkerCase.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof InteractSelectResp)) { + return false; + } + InteractSelectResp other = (InteractSelectResp) o; + return bitField0_ == other.bitField0_ + && (!hasResp() || resp.equals(other.resp)) + && (!hasSelectSpecialPotentialCase() || selectSpecialPotentialCase.equals(other.selectSpecialPotentialCase)) + && (!hasSelectPotentialCase() || selectPotentialCase.equals(other.selectPotentialCase)) + && (!hasSelectFateCardCase() || selectFateCardCase.equals(other.selectFateCardCase)) + && (!hasHawkerCase() || hawkerCase.equals(other.hawkerCase)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(resp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(selectSpecialPotentialCase); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(selectPotentialCase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(selectFateCardCase); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(hawkerCase); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(resp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectSpecialPotentialCase); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectPotentialCase); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectFateCardCase); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(hawkerCase); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public InteractSelectResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // resp + input.readMessage(resp); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // selectSpecialPotentialCase + input.readMessage(selectSpecialPotentialCase); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // selectPotentialCase + input.readMessage(selectPotentialCase); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // selectFateCardCase + input.readMessage(selectFateCardCase); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // hawkerCase + input.readMessage(hawkerCase); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.resp, resp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.selectSpecialPotentialCase, selectSpecialPotentialCase); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.selectPotentialCase, selectPotentialCase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.selectFateCardCase, selectFateCardCase); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.hawkerCase, hawkerCase); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public InteractSelectResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2543600: { + if (input.isAtField(FieldNames.resp)) { + if (!input.trySkipNullValue()) { + input.readMessage(resp); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1667710095: { + if (input.isAtField(FieldNames.selectSpecialPotentialCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectSpecialPotentialCase); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 929377458: { + if (input.isAtField(FieldNames.selectPotentialCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectPotentialCase); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1348869672: { + if (input.isAtField(FieldNames.selectFateCardCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectFateCardCase); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -79930006: { + if (input.isAtField(FieldNames.hawkerCase)) { + if (!input.trySkipNullValue()) { + input.readMessage(hawkerCase); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public InteractSelectResp clone() { + return new InteractSelectResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static InteractSelectResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new InteractSelectResp(), data).checkInitialized(); + } + + public static InteractSelectResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractSelectResp(), input).checkInitialized(); + } + + public static InteractSelectResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new InteractSelectResp(), input).checkInitialized(); + } + + /** + * @return factory for creating InteractSelectResp messages + */ + public static MessageFactory<InteractSelectResp> getFactory() { + return InteractSelectRespFactory.INSTANCE; + } + + /** + * Protobuf type {@code Success} + */ + public static final class Success extends ProtoMessage<Success> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 OptionsParamId = 5;</code> + */ + private int optionsParamId; + + /** + * <code>optional bool OptionsResult = 2;</code> + */ + private boolean optionsResult; + + /** + * <code>repeated .ItemTpl Items = 1;</code> + */ + private final RepeatedMessage<Public.ItemTpl> items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .FateCardInfo FateCard = 3;</code> + */ + private final RepeatedMessage<FateCardInfo> fateCard = RepeatedMessage.newEmptyInstance(FateCardInfo.getFactory()); + + /** + * <code>repeated .SubNoteSkillInfo SubNoteSkills = 4;</code> + */ + private final RepeatedMessage<SubNoteSkillInfo> subNoteSkills = RepeatedMessage.newEmptyInstance(SubNoteSkillInfo.getFactory()); + + /** + * <code>repeated .NPCAffinityChange AffinityChange = 6;</code> + */ + private final RepeatedMessage<NPCAffinityChange> affinityChange = RepeatedMessage.newEmptyInstance(NPCAffinityChange.getFactory()); + + private Success() { + } + + /** + * @return a new empty instance of {@code Success} + */ + public static Success newInstance() { + return new Success(); + } + + /** + * <code>optional uint32 OptionsParamId = 5;</code> + * @return whether the optionsParamId field is set + */ + public boolean hasOptionsParamId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 OptionsParamId = 5;</code> + * @return this + */ + public Success clearOptionsParamId() { + bitField0_ &= ~0x00000001; + optionsParamId = 0; + return this; + } + + /** + * <code>optional uint32 OptionsParamId = 5;</code> + * @return the optionsParamId + */ + public int getOptionsParamId() { + return optionsParamId; + } + + /** + * <code>optional uint32 OptionsParamId = 5;</code> + * @param value the optionsParamId to set + * @return this + */ + public Success setOptionsParamId(final int value) { + bitField0_ |= 0x00000001; + optionsParamId = value; + return this; + } + + /** + * <code>optional bool OptionsResult = 2;</code> + * @return whether the optionsResult field is set + */ + public boolean hasOptionsResult() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool OptionsResult = 2;</code> + * @return this + */ + public Success clearOptionsResult() { + bitField0_ &= ~0x00000002; + optionsResult = false; + return this; + } + + /** + * <code>optional bool OptionsResult = 2;</code> + * @return the optionsResult + */ + public boolean getOptionsResult() { + return optionsResult; + } + + /** + * <code>optional bool OptionsResult = 2;</code> + * @param value the optionsResult to set + * @return this + */ + public Success setOptionsResult(final boolean value) { + bitField0_ |= 0x00000002; + optionsResult = value; + return this; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @return this + */ + public Success clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getItems() { + return items; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @param value the items to add + * @return this + */ + public Success addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @param values the items to add + * @return this + */ + public Success addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + /** + * <code>repeated .FateCardInfo FateCard = 3;</code> + * @return whether the fateCard field is set + */ + public boolean hasFateCard() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .FateCardInfo FateCard = 3;</code> + * @return this + */ + public Success clearFateCard() { + bitField0_ &= ~0x00000008; + fateCard.clear(); + return this; + } + + /** + * <code>repeated .FateCardInfo FateCard = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFateCard()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<FateCardInfo> getFateCard() { + return fateCard; + } + + /** + * <code>repeated .FateCardInfo FateCard = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<FateCardInfo> getMutableFateCard() { + bitField0_ |= 0x00000008; + return fateCard; + } + + /** + * <code>repeated .FateCardInfo FateCard = 3;</code> + * @param value the fateCard to add + * @return this + */ + public Success addFateCard(final FateCardInfo value) { + bitField0_ |= 0x00000008; + fateCard.add(value); + return this; + } + + /** + * <code>repeated .FateCardInfo FateCard = 3;</code> + * @param values the fateCard to add + * @return this + */ + public Success addAllFateCard(final FateCardInfo... values) { + bitField0_ |= 0x00000008; + fateCard.addAll(values); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo SubNoteSkills = 4;</code> + * @return whether the subNoteSkills field is set + */ + public boolean hasSubNoteSkills() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .SubNoteSkillInfo SubNoteSkills = 4;</code> + * @return this + */ + public Success clearSubNoteSkills() { + bitField0_ &= ~0x00000010; + subNoteSkills.clear(); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo SubNoteSkills = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSubNoteSkills()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<SubNoteSkillInfo> getSubNoteSkills() { + return subNoteSkills; + } + + /** + * <code>repeated .SubNoteSkillInfo SubNoteSkills = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<SubNoteSkillInfo> getMutableSubNoteSkills() { + bitField0_ |= 0x00000010; + return subNoteSkills; + } + + /** + * <code>repeated .SubNoteSkillInfo SubNoteSkills = 4;</code> + * @param value the subNoteSkills to add + * @return this + */ + public Success addSubNoteSkills(final SubNoteSkillInfo value) { + bitField0_ |= 0x00000010; + subNoteSkills.add(value); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo SubNoteSkills = 4;</code> + * @param values the subNoteSkills to add + * @return this + */ + public Success addAllSubNoteSkills(final SubNoteSkillInfo... values) { + bitField0_ |= 0x00000010; + subNoteSkills.addAll(values); + return this; + } + + /** + * <code>repeated .NPCAffinityChange AffinityChange = 6;</code> + * @return whether the affinityChange field is set + */ + public boolean hasAffinityChange() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated .NPCAffinityChange AffinityChange = 6;</code> + * @return this + */ + public Success clearAffinityChange() { + bitField0_ &= ~0x00000020; + affinityChange.clear(); + return this; + } + + /** + * <code>repeated .NPCAffinityChange AffinityChange = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAffinityChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<NPCAffinityChange> getAffinityChange() { + return affinityChange; + } + + /** + * <code>repeated .NPCAffinityChange AffinityChange = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<NPCAffinityChange> getMutableAffinityChange() { + bitField0_ |= 0x00000020; + return affinityChange; + } + + /** + * <code>repeated .NPCAffinityChange AffinityChange = 6;</code> + * @param value the affinityChange to add + * @return this + */ + public Success addAffinityChange(final NPCAffinityChange value) { + bitField0_ |= 0x00000020; + affinityChange.add(value); + return this; + } + + /** + * <code>repeated .NPCAffinityChange AffinityChange = 6;</code> + * @param values the affinityChange to add + * @return this + */ + public Success addAllAffinityChange(final NPCAffinityChange... values) { + bitField0_ |= 0x00000020; + affinityChange.addAll(values); + return this; + } + + @Override + public Success copyFrom(final Success other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + optionsParamId = other.optionsParamId; + optionsResult = other.optionsResult; + items.copyFrom(other.items); + fateCard.copyFrom(other.fateCard); + subNoteSkills.copyFrom(other.subNoteSkills); + affinityChange.copyFrom(other.affinityChange); + } + return this; + } + + @Override + public Success mergeFrom(final Success other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOptionsParamId()) { + setOptionsParamId(other.optionsParamId); + } + if (other.hasOptionsResult()) { + setOptionsResult(other.optionsResult); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + if (other.hasFateCard()) { + getMutableFateCard().addAll(other.fateCard); + } + if (other.hasSubNoteSkills()) { + getMutableSubNoteSkills().addAll(other.subNoteSkills); + } + if (other.hasAffinityChange()) { + getMutableAffinityChange().addAll(other.affinityChange); + } + return this; + } + + @Override + public Success clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + optionsParamId = 0; + optionsResult = false; + items.clear(); + fateCard.clear(); + subNoteSkills.clear(); + affinityChange.clear(); + return this; + } + + @Override + public Success clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + items.clearQuick(); + fateCard.clearQuick(); + subNoteSkills.clearQuick(); + affinityChange.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Success)) { + return false; + } + Success other = (Success) o; + return bitField0_ == other.bitField0_ + && (!hasOptionsParamId() || optionsParamId == other.optionsParamId) + && (!hasOptionsResult() || optionsResult == other.optionsResult) + && (!hasItems() || items.equals(other.items)) + && (!hasFateCard() || fateCard.equals(other.fateCard)) + && (!hasSubNoteSkills() || subNoteSkills.equals(other.subNoteSkills)) + && (!hasAffinityChange() || affinityChange.equals(other.affinityChange)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(optionsParamId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(optionsResult); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(items.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < fateCard.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(fateCard.get(i)); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < subNoteSkills.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(subNoteSkills.get(i)); + } + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < affinityChange.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(affinityChange.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(optionsParamId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * fateCard.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(fateCard); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * subNoteSkills.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(subNoteSkills); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * affinityChange.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(affinityChange); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Success mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // optionsParamId + optionsParamId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // optionsResult + optionsResult = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // fateCard + tag = input.readRepeatedMessage(fateCard, tag); + bitField0_ |= 0x00000008; + if (tag != 34) { + break; + } + } + case 34: { + // subNoteSkills + tag = input.readRepeatedMessage(subNoteSkills, tag); + bitField0_ |= 0x00000010; + if (tag != 50) { + break; + } + } + case 50: { + // affinityChange + tag = input.readRepeatedMessage(affinityChange, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.optionsParamId, optionsParamId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.optionsResult, optionsResult); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.fateCard, fateCard); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.subNoteSkills, subNoteSkills); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.affinityChange, affinityChange); + } + output.endObject(); + } + + @Override + public Success mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 442761770: { + if (input.isAtField(FieldNames.optionsParamId)) { + if (!input.trySkipNullValue()) { + optionsParamId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -478905285: { + if (input.isAtField(FieldNames.optionsResult)) { + if (!input.trySkipNullValue()) { + optionsResult = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1047532988: { + if (input.isAtField(FieldNames.fateCard)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(fateCard); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 349821204: { + if (input.isAtField(FieldNames.subNoteSkills)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(subNoteSkills); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -690981096: { + if (input.isAtField(FieldNames.affinityChange)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(affinityChange); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Success clone() { + return new Success().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Success parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Success(), data).checkInitialized(); + } + + public static Success parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Success(), input).checkInitialized(); + } + + public static Success parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Success(), input).checkInitialized(); + } + + /** + * @return factory for creating Success messages + */ + public static MessageFactory<Success> getFactory() { + return SuccessFactory.INSTANCE; + } + + private enum SuccessFactory implements MessageFactory<Success> { + INSTANCE; + + @Override + public Success create() { + return Success.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName optionsParamId = FieldName.forField("OptionsParamId"); + + static final FieldName optionsResult = FieldName.forField("OptionsResult"); + + static final FieldName items = FieldName.forField("Items"); + + static final FieldName fateCard = FieldName.forField("FateCard"); + + static final FieldName subNoteSkills = FieldName.forField("SubNoteSkills"); + + static final FieldName affinityChange = FieldName.forField("AffinityChange"); + } + } + + private enum InteractSelectRespFactory implements MessageFactory<InteractSelectResp> { + INSTANCE; + + @Override + public InteractSelectResp create() { + return InteractSelectResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName resp = FieldName.forField("Resp"); + + static final FieldName selectSpecialPotentialCase = FieldName.forField("SelectSpecialPotentialCase"); + + static final FieldName selectPotentialCase = FieldName.forField("SelectPotentialCase"); + + static final FieldName selectFateCardCase = FieldName.forField("SelectFateCardCase"); + + static final FieldName hawkerCase = FieldName.forField("HawkerCase"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FateCardInfo} + */ + public static final class FateCardInfo extends ProtoMessage<FateCardInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Qty = 2;</code> + */ + private int qty; + + /** + * <code>optional int32 Remain = 3;</code> + */ + private int remain; + + /** + * <code>optional int32 Room = 4;</code> + */ + private int room; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private FateCardInfo() { + } + + /** + * @return a new empty instance of {@code FateCardInfo} + */ + public static FateCardInfo newInstance() { + return new FateCardInfo(); + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return this + */ + public FateCardInfo clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @param value the qty to set + * @return this + */ + public FateCardInfo setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * <code>optional int32 Remain = 3;</code> + * @return whether the remain field is set + */ + public boolean hasRemain() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional int32 Remain = 3;</code> + * @return this + */ + public FateCardInfo clearRemain() { + bitField0_ &= ~0x00000002; + remain = 0; + return this; + } + + /** + * <code>optional int32 Remain = 3;</code> + * @return the remain + */ + public int getRemain() { + return remain; + } + + /** + * <code>optional int32 Remain = 3;</code> + * @param value the remain to set + * @return this + */ + public FateCardInfo setRemain(final int value) { + bitField0_ |= 0x00000002; + remain = value; + return this; + } + + /** + * <code>optional int32 Room = 4;</code> + * @return whether the room field is set + */ + public boolean hasRoom() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional int32 Room = 4;</code> + * @return this + */ + public FateCardInfo clearRoom() { + bitField0_ &= ~0x00000004; + room = 0; + return this; + } + + /** + * <code>optional int32 Room = 4;</code> + * @return the room + */ + public int getRoom() { + return room; + } + + /** + * <code>optional int32 Room = 4;</code> + * @param value the room to set + * @return this + */ + public FateCardInfo setRoom(final int value) { + bitField0_ |= 0x00000004; + room = value; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public FateCardInfo clearTid() { + bitField0_ &= ~0x00000008; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public FateCardInfo setTid(final int value) { + bitField0_ |= 0x00000008; + tid = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public FateCardInfo clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public FateCardInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public FateCardInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public FateCardInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public FateCardInfo copyFrom(final FateCardInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + remain = other.remain; + room = other.room; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FateCardInfo mergeFrom(final FateCardInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasRemain()) { + setRemain(other.remain); + } + if (other.hasRoom()) { + setRoom(other.room); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public FateCardInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + remain = 0; + room = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public FateCardInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FateCardInfo)) { + return false; + } + FateCardInfo other = (FateCardInfo) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasRemain() || remain == other.remain) + && (!hasRoom() || room == other.room) + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeInt32NoTag(remain); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeInt32NoTag(room); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(remain); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(room); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FateCardInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // remain + remain = input.readInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // room + room = input.readInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeInt32(FieldNames.remain, remain); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeInt32(FieldNames.room, room); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public FateCardInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1850757492: { + if (input.isAtField(FieldNames.remain)) { + if (!input.trySkipNullValue()) { + remain = input.readInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2553083: { + if (input.isAtField(FieldNames.room)) { + if (!input.trySkipNullValue()) { + room = input.readInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FateCardInfo clone() { + return new FateCardInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FateCardInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FateCardInfo(), data).checkInitialized(); + } + + public static FateCardInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FateCardInfo(), input).checkInitialized(); + } + + public static FateCardInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FateCardInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating FateCardInfo messages + */ + public static MessageFactory<FateCardInfo> getFactory() { + return FateCardInfoFactory.INSTANCE; + } + + private enum FateCardInfoFactory implements MessageFactory<FateCardInfo> { + INSTANCE; + + @Override + public FateCardInfo create() { + return FateCardInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName remain = FieldName.forField("Remain"); + + static final FieldName room = FieldName.forField("Room"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code PotentialInfo} + */ + public static final class PotentialInfo extends ProtoMessage<PotentialInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private PotentialInfo() { + } + + /** + * @return a new empty instance of {@code PotentialInfo} + */ + public static PotentialInfo newInstance() { + return new PotentialInfo(); + } + + /** + * <code>optional int32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Level = 2;</code> + * @return this + */ + public PotentialInfo clearLevel() { + bitField0_ &= ~0x00000001; + level = 0; + return this; + } + + /** + * <code>optional int32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional int32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public PotentialInfo setLevel(final int value) { + bitField0_ |= 0x00000001; + level = value; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public PotentialInfo clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public PotentialInfo setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public PotentialInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public PotentialInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public PotentialInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public PotentialInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public PotentialInfo copyFrom(final PotentialInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + level = other.level; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PotentialInfo mergeFrom(final PotentialInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public PotentialInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + level = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public PotentialInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof PotentialInfo)) { + return false; + } + PotentialInfo other = (PotentialInfo) o; + return bitField0_ == other.bitField0_ + && (!hasLevel() || level == other.level) + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public PotentialInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // level + level = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public PotentialInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public PotentialInfo clone() { + return new PotentialInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static PotentialInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new PotentialInfo(), data).checkInitialized(); + } + + public static PotentialInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new PotentialInfo(), input).checkInitialized(); + } + + public static PotentialInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new PotentialInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating PotentialInfo messages + */ + public static MessageFactory<PotentialInfo> getFactory() { + return PotentialInfoFactory.INSTANCE; + } + + private enum PotentialInfoFactory implements MessageFactory<PotentialInfo> { + INSTANCE; + + @Override + public PotentialInfo create() { + return PotentialInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName level = FieldName.forField("Level"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TowerItemInfo} + */ + public static final class TowerItemInfo extends ProtoMessage<TowerItemInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Qty = 2;</code> + */ + private int qty; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TowerItemInfo() { + } + + /** + * @return a new empty instance of {@code TowerItemInfo} + */ + public static TowerItemInfo newInstance() { + return new TowerItemInfo(); + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return this + */ + public TowerItemInfo clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @param value the qty to set + * @return this + */ + public TowerItemInfo setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public TowerItemInfo clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public TowerItemInfo setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerItemInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerItemInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerItemInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerItemInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TowerItemInfo copyFrom(final TowerItemInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerItemInfo mergeFrom(final TowerItemInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerItemInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public TowerItemInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerItemInfo)) { + return false; + } + TowerItemInfo other = (TowerItemInfo) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerItemInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TowerItemInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerItemInfo clone() { + return new TowerItemInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerItemInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerItemInfo(), data).checkInitialized(); + } + + public static TowerItemInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerItemInfo(), input).checkInitialized(); + } + + public static TowerItemInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerItemInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerItemInfo messages + */ + public static MessageFactory<TowerItemInfo> getFactory() { + return TowerItemInfoFactory.INSTANCE; + } + + private enum TowerItemInfoFactory implements MessageFactory<TowerItemInfo> { + INSTANCE; + + @Override + public TowerItemInfo create() { + return TowerItemInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TowerResInfo} + */ + public static final class TowerResInfo extends ProtoMessage<TowerResInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Qty = 2;</code> + */ + private int qty; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TowerResInfo() { + } + + /** + * @return a new empty instance of {@code TowerResInfo} + */ + public static TowerResInfo newInstance() { + return new TowerResInfo(); + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return this + */ + public TowerResInfo clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @param value the qty to set + * @return this + */ + public TowerResInfo setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public TowerResInfo clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public TowerResInfo setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerResInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerResInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerResInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerResInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TowerResInfo copyFrom(final TowerResInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + tid = other.tid; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerResInfo mergeFrom(final TowerResInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerResInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + tid = 0; + nextPackage.clear(); + return this; + } + + @Override + public TowerResInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerResInfo)) { + return false; + } + TowerResInfo other = (TowerResInfo) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasTid() || tid == other.tid) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerResInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TowerResInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerResInfo clone() { + return new TowerResInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerResInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerResInfo(), data).checkInitialized(); + } + + public static TowerResInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerResInfo(), input).checkInitialized(); + } + + public static TowerResInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerResInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerResInfo messages + */ + public static MessageFactory<TowerResInfo> getFactory() { + return TowerResInfoFactory.INSTANCE; + } + + private enum TowerResInfoFactory implements MessageFactory<TowerResInfo> { + INSTANCE; + + @Override + public TowerResInfo create() { + return TowerResInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code SubNoteSkillInfo} + */ + public static final class SubNoteSkillInfo extends ProtoMessage<SubNoteSkillInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 Qty = 2;</code> + */ + private int qty; + + /** + * <code>optional uint32 Tid = 1;</code> + */ + private int tid; + + /** + * <code>optional uint32 LuckyLevel = 4;</code> + */ + private int luckyLevel; + + /** + * <code>optional bool New = 3;</code> + */ + private boolean new_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SubNoteSkillInfo() { + } + + /** + * @return a new empty instance of {@code SubNoteSkillInfo} + */ + public static SubNoteSkillInfo newInstance() { + return new SubNoteSkillInfo(); + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return whether the qty field is set + */ + public boolean hasQty() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return this + */ + public SubNoteSkillInfo clearQty() { + bitField0_ &= ~0x00000001; + qty = 0; + return this; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @return the qty + */ + public int getQty() { + return qty; + } + + /** + * <code>optional int32 Qty = 2;</code> + * @param value the qty to set + * @return this + */ + public SubNoteSkillInfo setQty(final int value) { + bitField0_ |= 0x00000001; + qty = value; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return whether the tid field is set + */ + public boolean hasTid() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return this + */ + public SubNoteSkillInfo clearTid() { + bitField0_ &= ~0x00000002; + tid = 0; + return this; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @return the tid + */ + public int getTid() { + return tid; + } + + /** + * <code>optional uint32 Tid = 1;</code> + * @param value the tid to set + * @return this + */ + public SubNoteSkillInfo setTid(final int value) { + bitField0_ |= 0x00000002; + tid = value; + return this; + } + + /** + * <code>optional uint32 LuckyLevel = 4;</code> + * @return whether the luckyLevel field is set + */ + public boolean hasLuckyLevel() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 LuckyLevel = 4;</code> + * @return this + */ + public SubNoteSkillInfo clearLuckyLevel() { + bitField0_ &= ~0x00000004; + luckyLevel = 0; + return this; + } + + /** + * <code>optional uint32 LuckyLevel = 4;</code> + * @return the luckyLevel + */ + public int getLuckyLevel() { + return luckyLevel; + } + + /** + * <code>optional uint32 LuckyLevel = 4;</code> + * @param value the luckyLevel to set + * @return this + */ + public SubNoteSkillInfo setLuckyLevel(final int value) { + bitField0_ |= 0x00000004; + luckyLevel = value; + return this; + } + + /** + * <code>optional bool New = 3;</code> + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool New = 3;</code> + * @return this + */ + public SubNoteSkillInfo clearNew() { + bitField0_ &= ~0x00000008; + new_ = false; + return this; + } + + /** + * <code>optional bool New = 3;</code> + * @return the new_ + */ + public boolean getNew() { + return new_; + } + + /** + * <code>optional bool New = 3;</code> + * @param value the new_ to set + * @return this + */ + public SubNoteSkillInfo setNew(final boolean value) { + bitField0_ |= 0x00000008; + new_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SubNoteSkillInfo clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SubNoteSkillInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SubNoteSkillInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SubNoteSkillInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SubNoteSkillInfo copyFrom(final SubNoteSkillInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + qty = other.qty; + tid = other.tid; + luckyLevel = other.luckyLevel; + new_ = other.new_; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SubNoteSkillInfo mergeFrom(final SubNoteSkillInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQty()) { + setQty(other.qty); + } + if (other.hasTid()) { + setTid(other.tid); + } + if (other.hasLuckyLevel()) { + setLuckyLevel(other.luckyLevel); + } + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SubNoteSkillInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + qty = 0; + tid = 0; + luckyLevel = 0; + new_ = false; + nextPackage.clear(); + return this; + } + + @Override + public SubNoteSkillInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SubNoteSkillInfo)) { + return false; + } + SubNoteSkillInfo other = (SubNoteSkillInfo) o; + return bitField0_ == other.bitField0_ + && (!hasQty() || qty == other.qty) + && (!hasTid() || tid == other.tid) + && (!hasLuckyLevel() || luckyLevel == other.luckyLevel) + && (!hasNew() || new_ == other.new_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt32NoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(luckyLevel); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(new_); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(qty); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(tid); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(luckyLevel); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SubNoteSkillInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // qty + qty = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // tid + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // luckyLevel + luckyLevel = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // new_ + new_ = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.qty, qty); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.tid, tid); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.luckyLevel, luckyLevel); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SubNoteSkillInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 81558: { + if (input.isAtField(FieldNames.qty)) { + if (!input.trySkipNullValue()) { + qty = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 84079: { + if (input.isAtField(FieldNames.tid)) { + if (!input.trySkipNullValue()) { + tid = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1681685916: { + if (input.isAtField(FieldNames.luckyLevel)) { + if (!input.trySkipNullValue()) { + luckyLevel = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SubNoteSkillInfo clone() { + return new SubNoteSkillInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SubNoteSkillInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SubNoteSkillInfo(), data).checkInitialized(); + } + + public static SubNoteSkillInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SubNoteSkillInfo(), input).checkInitialized(); + } + + public static SubNoteSkillInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SubNoteSkillInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating SubNoteSkillInfo messages + */ + public static MessageFactory<SubNoteSkillInfo> getFactory() { + return SubNoteSkillInfoFactory.INSTANCE; + } + + private enum SubNoteSkillInfoFactory implements MessageFactory<SubNoteSkillInfo> { + INSTANCE; + + @Override + public SubNoteSkillInfo create() { + return SubNoteSkillInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName qty = FieldName.forField("Qty"); + + static final FieldName tid = FieldName.forField("Tid"); + + static final FieldName luckyLevel = FieldName.forField("LuckyLevel"); + + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code FirstAward} + */ + public static final class FirstAward extends ProtoMessage<FirstAward> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 TowerId = 1;</code> + */ + private int towerId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Items = 2;</code> + */ + private final RepeatedMessage<Public.ItemTpl> items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private FirstAward() { + } + + /** + * @return a new empty instance of {@code FirstAward} + */ + public static FirstAward newInstance() { + return new FirstAward(); + } + + /** + * <code>optional uint32 TowerId = 1;</code> + * @return whether the towerId field is set + */ + public boolean hasTowerId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 TowerId = 1;</code> + * @return this + */ + public FirstAward clearTowerId() { + bitField0_ &= ~0x00000001; + towerId = 0; + return this; + } + + /** + * <code>optional uint32 TowerId = 1;</code> + * @return the towerId + */ + public int getTowerId() { + return towerId; + } + + /** + * <code>optional uint32 TowerId = 1;</code> + * @param value the towerId to set + * @return this + */ + public FirstAward setTowerId(final int value) { + bitField0_ |= 0x00000001; + towerId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public FirstAward clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public FirstAward addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public FirstAward addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public FirstAward setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @return this + */ + public FirstAward clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getItems() { + return items; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @param value the items to add + * @return this + */ + public FirstAward addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @param values the items to add + * @return this + */ + public FirstAward addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + @Override + public FirstAward copyFrom(final FirstAward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + towerId = other.towerId; + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public FirstAward mergeFrom(final FirstAward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTowerId()) { + setTowerId(other.towerId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public FirstAward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + towerId = 0; + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public FirstAward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof FirstAward)) { + return false; + } + FirstAward other = (FirstAward) o; + return bitField0_ == other.bitField0_ + && (!hasTowerId() || towerId == other.towerId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(towerId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(towerId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public FirstAward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // towerId + towerId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.towerId, towerId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public FirstAward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 531753444: { + if (input.isAtField(FieldNames.towerId)) { + if (!input.trySkipNullValue()) { + towerId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public FirstAward clone() { + return new FirstAward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static FirstAward parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new FirstAward(), data).checkInitialized(); + } + + public static FirstAward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new FirstAward(), input).checkInitialized(); + } + + public static FirstAward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new FirstAward(), input).checkInitialized(); + } + + /** + * @return factory for creating FirstAward messages + */ + public static MessageFactory<FirstAward> getFactory() { + return FirstAwardFactory.INSTANCE; + } + + private enum FirstAwardFactory implements MessageFactory<FirstAward> { + INSTANCE; + + @Override + public FirstAward create() { + return FirstAward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName towerId = FieldName.forField("TowerId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } + + /** + * Protobuf type {@code SettleDataResp} + */ + public static final class SettleDataResp extends ProtoMessage<SettleDataResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 NpcInteraction = 5;</code> + */ + private int npcInteraction; + + /** + * <code>optional uint32 TotalTime = 14;</code> + */ + private int totalTime; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + */ + private final StarTowerBuildInfo build = StarTowerBuildInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + */ + private final RepeatedLong totalDamages = RepeatedLong.newEmptyInstance(); + + /** + * <code>repeated .FirstAward Awards = 3;</code> + */ + private final RepeatedMessage<FirstAward> awards = RepeatedMessage.newEmptyInstance(FirstAward.getFactory()); + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 4;</code> + */ + private final RepeatedMessage<NPCAffinityLevelReward> reward = RepeatedMessage.newEmptyInstance(NPCAffinityLevelReward.getFactory()); + + /** + * <code>repeated .ItemTpl TowerRewards = 6;</code> + */ + private final RepeatedMessage<Public.ItemTpl> towerRewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private SettleDataResp() { + } + + /** + * @return a new empty instance of {@code SettleDataResp} + */ + public static SettleDataResp newInstance() { + return new SettleDataResp(); + } + + /** + * <code>optional uint32 NpcInteraction = 5;</code> + * @return whether the npcInteraction field is set + */ + public boolean hasNpcInteraction() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 NpcInteraction = 5;</code> + * @return this + */ + public SettleDataResp clearNpcInteraction() { + bitField0_ &= ~0x00000001; + npcInteraction = 0; + return this; + } + + /** + * <code>optional uint32 NpcInteraction = 5;</code> + * @return the npcInteraction + */ + public int getNpcInteraction() { + return npcInteraction; + } + + /** + * <code>optional uint32 NpcInteraction = 5;</code> + * @param value the npcInteraction to set + * @return this + */ + public SettleDataResp setNpcInteraction(final int value) { + bitField0_ |= 0x00000001; + npcInteraction = value; + return this; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return whether the totalTime field is set + */ + public boolean hasTotalTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return this + */ + public SettleDataResp clearTotalTime() { + bitField0_ &= ~0x00000002; + totalTime = 0; + return this; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return the totalTime + */ + public int getTotalTime() { + return totalTime; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @param value the totalTime to set + * @return this + */ + public SettleDataResp setTotalTime(final int value) { + bitField0_ |= 0x00000002; + totalTime = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public SettleDataResp clearChange() { + bitField0_ &= ~0x00000004; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000004; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public SettleDataResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000004; + change.copyFrom(value); + return this; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * @return whether the build field is set + */ + public boolean hasBuild() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * @return this + */ + public SettleDataResp clearBuild() { + bitField0_ &= ~0x00000008; + build.clear(); + return this; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBuild()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerBuildInfo getBuild() { + return build; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerBuildInfo getMutableBuild() { + bitField0_ |= 0x00000008; + return build; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * @param value the build to set + * @return this + */ + public SettleDataResp setBuild(final StarTowerBuildInfo value) { + bitField0_ |= 0x00000008; + build.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SettleDataResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SettleDataResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SettleDataResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SettleDataResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @return whether the totalDamages field is set + */ + public boolean hasTotalDamages() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @return this + */ + public SettleDataResp clearTotalDamages() { + bitField0_ &= ~0x00000020; + totalDamages.clear(); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTotalDamages()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getTotalDamages() { + return totalDamages; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableTotalDamages() { + bitField0_ |= 0x00000020; + return totalDamages; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @param value the totalDamages to add + * @return this + */ + public SettleDataResp addTotalDamages(final long value) { + bitField0_ |= 0x00000020; + totalDamages.add(value); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @param values the totalDamages to add + * @return this + */ + public SettleDataResp addAllTotalDamages(final long... values) { + bitField0_ |= 0x00000020; + totalDamages.addAll(values); + return this; + } + + /** + * <code>repeated .FirstAward Awards = 3;</code> + * @return whether the awards field is set + */ + public boolean hasAwards() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated .FirstAward Awards = 3;</code> + * @return this + */ + public SettleDataResp clearAwards() { + bitField0_ &= ~0x00000040; + awards.clear(); + return this; + } + + /** + * <code>repeated .FirstAward Awards = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<FirstAward> getAwards() { + return awards; + } + + /** + * <code>repeated .FirstAward Awards = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<FirstAward> getMutableAwards() { + bitField0_ |= 0x00000040; + return awards; + } + + /** + * <code>repeated .FirstAward Awards = 3;</code> + * @param value the awards to add + * @return this + */ + public SettleDataResp addAwards(final FirstAward value) { + bitField0_ |= 0x00000040; + awards.add(value); + return this; + } + + /** + * <code>repeated .FirstAward Awards = 3;</code> + * @param values the awards to add + * @return this + */ + public SettleDataResp addAllAwards(final FirstAward... values) { + bitField0_ |= 0x00000040; + awards.addAll(values); + return this; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 4;</code> + * @return whether the reward field is set + */ + public boolean hasReward() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 4;</code> + * @return this + */ + public SettleDataResp clearReward() { + bitField0_ &= ~0x00000080; + reward.clear(); + return this; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<NPCAffinityLevelReward> getReward() { + return reward; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<NPCAffinityLevelReward> getMutableReward() { + bitField0_ |= 0x00000080; + return reward; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 4;</code> + * @param value the reward to add + * @return this + */ + public SettleDataResp addReward(final NPCAffinityLevelReward value) { + bitField0_ |= 0x00000080; + reward.add(value); + return this; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 4;</code> + * @param values the reward to add + * @return this + */ + public SettleDataResp addAllReward(final NPCAffinityLevelReward... values) { + bitField0_ |= 0x00000080; + reward.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 6;</code> + * @return whether the towerRewards field is set + */ + public boolean hasTowerRewards() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 6;</code> + * @return this + */ + public SettleDataResp clearTowerRewards() { + bitField0_ &= ~0x00000100; + towerRewards.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTowerRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getTowerRewards() { + return towerRewards; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableTowerRewards() { + bitField0_ |= 0x00000100; + return towerRewards; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 6;</code> + * @param value the towerRewards to add + * @return this + */ + public SettleDataResp addTowerRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000100; + towerRewards.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 6;</code> + * @param values the towerRewards to add + * @return this + */ + public SettleDataResp addAllTowerRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000100; + towerRewards.addAll(values); + return this; + } + + @Override + public SettleDataResp copyFrom(final SettleDataResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + npcInteraction = other.npcInteraction; + totalTime = other.totalTime; + change.copyFrom(other.change); + build.copyFrom(other.build); + nextPackage.copyFrom(other.nextPackage); + totalDamages.copyFrom(other.totalDamages); + awards.copyFrom(other.awards); + reward.copyFrom(other.reward); + towerRewards.copyFrom(other.towerRewards); + } + return this; + } + + @Override + public SettleDataResp mergeFrom(final SettleDataResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNpcInteraction()) { + setNpcInteraction(other.npcInteraction); + } + if (other.hasTotalTime()) { + setTotalTime(other.totalTime); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasBuild()) { + getMutableBuild().mergeFrom(other.build); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasTotalDamages()) { + getMutableTotalDamages().addAll(other.totalDamages); + } + if (other.hasAwards()) { + getMutableAwards().addAll(other.awards); + } + if (other.hasReward()) { + getMutableReward().addAll(other.reward); + } + if (other.hasTowerRewards()) { + getMutableTowerRewards().addAll(other.towerRewards); + } + return this; + } + + @Override + public SettleDataResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + npcInteraction = 0; + totalTime = 0; + change.clear(); + build.clear(); + nextPackage.clear(); + totalDamages.clear(); + awards.clear(); + reward.clear(); + towerRewards.clear(); + return this; + } + + @Override + public SettleDataResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + build.clearQuick(); + nextPackage.clear(); + totalDamages.clear(); + awards.clearQuick(); + reward.clearQuick(); + towerRewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SettleDataResp)) { + return false; + } + SettleDataResp other = (SettleDataResp) o; + return bitField0_ == other.bitField0_ + && (!hasNpcInteraction() || npcInteraction == other.npcInteraction) + && (!hasTotalTime() || totalTime == other.totalTime) + && (!hasChange() || change.equals(other.change)) + && (!hasBuild() || build.equals(other.build)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasTotalDamages() || totalDamages.equals(other.totalDamages)) + && (!hasAwards() || awards.equals(other.awards)) + && (!hasReward() || reward.equals(other.reward)) + && (!hasTowerRewards() || towerRewards.equals(other.towerRewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(npcInteraction); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(totalTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(build); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < totalDamages.length(); i++) { + output.writeRawByte((byte) 120); + output.writeUInt64NoTag(totalDamages.array()[i]); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < awards.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(awards.get(i)); + } + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < reward.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(reward.get(i)); + } + } + if ((bitField0_ & 0x00000100) != 0) { + for (int i = 0; i < towerRewards.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(towerRewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(npcInteraction); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(totalTime); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(build); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * totalDamages.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(totalDamages); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * awards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awards); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * reward.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(reward); + } + if ((bitField0_ & 0x00000100) != 0) { + size += (1 * towerRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(towerRewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SettleDataResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 40: { + // npcInteraction + npcInteraction = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // totalTime + totalTime = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // build + input.readMessage(build); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // totalDamages [packed=true] + input.readPackedUInt64(totalDamages, tag); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // awards + tag = input.readRepeatedMessage(awards, tag); + bitField0_ |= 0x00000040; + if (tag != 34) { + break; + } + } + case 34: { + // reward + tag = input.readRepeatedMessage(reward, tag); + bitField0_ |= 0x00000080; + if (tag != 50) { + break; + } + } + case 50: { + // towerRewards + tag = input.readRepeatedMessage(towerRewards, tag); + bitField0_ |= 0x00000100; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 120: { + // totalDamages [packed=false] + tag = input.readRepeatedUInt64(totalDamages, tag); + bitField0_ |= 0x00000020; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.npcInteraction, npcInteraction); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.totalTime, totalTime); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.build, build); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedUInt64(FieldNames.totalDamages, totalDamages); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.awards, awards); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedMessage(FieldNames.reward, reward); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.towerRewards, towerRewards); + } + output.endObject(); + } + + @Override + public SettleDataResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -168972143: { + if (input.isAtField(FieldNames.npcInteraction)) { + if (!input.trySkipNullValue()) { + npcInteraction = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1426685969: { + if (input.isAtField(FieldNames.totalTime)) { + if (!input.trySkipNullValue()) { + totalTime = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64542286: { + if (input.isAtField(FieldNames.build)) { + if (!input.trySkipNullValue()) { + input.readMessage(build); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2138865888: { + if (input.isAtField(FieldNames.totalDamages)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(totalDamages); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1973796310: { + if (input.isAtField(FieldNames.awards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awards); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1850459313: { + if (input.isAtField(FieldNames.reward)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(reward); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 162549755: { + if (input.isAtField(FieldNames.towerRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(towerRewards); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SettleDataResp clone() { + return new SettleDataResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SettleDataResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SettleDataResp(), data).checkInitialized(); + } + + public static SettleDataResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SettleDataResp(), input).checkInitialized(); + } + + public static SettleDataResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SettleDataResp(), input).checkInitialized(); + } + + /** + * @return factory for creating SettleDataResp messages + */ + public static MessageFactory<SettleDataResp> getFactory() { + return SettleDataRespFactory.INSTANCE; + } + + private enum SettleDataRespFactory implements MessageFactory<SettleDataResp> { + INSTANCE; + + @Override + public SettleDataResp create() { + return SettleDataResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName npcInteraction = FieldName.forField("NpcInteraction"); + + static final FieldName totalTime = FieldName.forField("TotalTime"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName build = FieldName.forField("Build"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName totalDamages = FieldName.forField("TotalDamages"); + + static final FieldName awards = FieldName.forField("Awards"); + + static final FieldName reward = FieldName.forField("Reward"); + + static final FieldName towerRewards = FieldName.forField("TowerRewards"); + } + } + + /** + * Protobuf type {@code TowerBuildChar} + */ + public static final class TowerBuildChar extends ProtoMessage<TowerBuildChar> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional uint32 PotentialCnt = 2;</code> + */ + private int potentialCnt; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TowerBuildChar() { + } + + /** + * @return a new empty instance of {@code TowerBuildChar} + */ + public static TowerBuildChar newInstance() { + return new TowerBuildChar(); + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public TowerBuildChar clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public TowerBuildChar setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * <code>optional uint32 PotentialCnt = 2;</code> + * @return whether the potentialCnt field is set + */ + public boolean hasPotentialCnt() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 PotentialCnt = 2;</code> + * @return this + */ + public TowerBuildChar clearPotentialCnt() { + bitField0_ &= ~0x00000002; + potentialCnt = 0; + return this; + } + + /** + * <code>optional uint32 PotentialCnt = 2;</code> + * @return the potentialCnt + */ + public int getPotentialCnt() { + return potentialCnt; + } + + /** + * <code>optional uint32 PotentialCnt = 2;</code> + * @param value the potentialCnt to set + * @return this + */ + public TowerBuildChar setPotentialCnt(final int value) { + bitField0_ |= 0x00000002; + potentialCnt = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerBuildChar clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerBuildChar addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerBuildChar addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerBuildChar setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TowerBuildChar copyFrom(final TowerBuildChar other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + potentialCnt = other.potentialCnt; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerBuildChar mergeFrom(final TowerBuildChar other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasPotentialCnt()) { + setPotentialCnt(other.potentialCnt); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerBuildChar clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + potentialCnt = 0; + nextPackage.clear(); + return this; + } + + @Override + public TowerBuildChar clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerBuildChar)) { + return false; + } + TowerBuildChar other = (TowerBuildChar) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasPotentialCnt() || potentialCnt == other.potentialCnt) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(potentialCnt); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(potentialCnt); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerBuildChar mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // potentialCnt + potentialCnt = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.potentialCnt, potentialCnt); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TowerBuildChar mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2059288715: { + if (input.isAtField(FieldNames.potentialCnt)) { + if (!input.trySkipNullValue()) { + potentialCnt = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerBuildChar clone() { + return new TowerBuildChar().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerBuildChar parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerBuildChar(), data).checkInitialized(); + } + + public static TowerBuildChar parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerBuildChar(), input).checkInitialized(); + } + + public static TowerBuildChar parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerBuildChar(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerBuildChar messages + */ + public static MessageFactory<TowerBuildChar> getFactory() { + return TowerBuildCharFactory.INSTANCE; + } + + private enum TowerBuildCharFactory implements MessageFactory<TowerBuildChar> { + INSTANCE; + + @Override + public TowerBuildChar create() { + return TowerBuildChar.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName potentialCnt = FieldName.forField("PotentialCnt"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code BuildPotential} + */ + public static final class BuildPotential extends ProtoMessage<BuildPotential> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 PotentialId = 1;</code> + */ + private int potentialId; + + /** + * <code>optional uint32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private BuildPotential() { + } + + /** + * @return a new empty instance of {@code BuildPotential} + */ + public static BuildPotential newInstance() { + return new BuildPotential(); + } + + /** + * <code>optional uint32 PotentialId = 1;</code> + * @return whether the potentialId field is set + */ + public boolean hasPotentialId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 PotentialId = 1;</code> + * @return this + */ + public BuildPotential clearPotentialId() { + bitField0_ &= ~0x00000001; + potentialId = 0; + return this; + } + + /** + * <code>optional uint32 PotentialId = 1;</code> + * @return the potentialId + */ + public int getPotentialId() { + return potentialId; + } + + /** + * <code>optional uint32 PotentialId = 1;</code> + * @param value the potentialId to set + * @return this + */ + public BuildPotential setPotentialId(final int value) { + bitField0_ |= 0x00000001; + potentialId = value; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return this + */ + public BuildPotential clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public BuildPotential setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public BuildPotential clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public BuildPotential addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public BuildPotential addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public BuildPotential setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public BuildPotential copyFrom(final BuildPotential other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + potentialId = other.potentialId; + level = other.level; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BuildPotential mergeFrom(final BuildPotential other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPotentialId()) { + setPotentialId(other.potentialId); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public BuildPotential clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + potentialId = 0; + level = 0; + nextPackage.clear(); + return this; + } + + @Override + public BuildPotential clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof BuildPotential)) { + return false; + } + BuildPotential other = (BuildPotential) o; + return bitField0_ == other.bitField0_ + && (!hasPotentialId() || potentialId == other.potentialId) + && (!hasLevel() || level == other.level) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(potentialId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(potentialId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public BuildPotential mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // potentialId + potentialId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.potentialId, potentialId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public BuildPotential mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 620618169: { + if (input.isAtField(FieldNames.potentialId)) { + if (!input.trySkipNullValue()) { + potentialId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public BuildPotential clone() { + return new BuildPotential().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static BuildPotential parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new BuildPotential(), data).checkInitialized(); + } + + public static BuildPotential parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new BuildPotential(), input).checkInitialized(); + } + + public static BuildPotential parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new BuildPotential(), input).checkInitialized(); + } + + /** + * @return factory for creating BuildPotential messages + */ + public static MessageFactory<BuildPotential> getFactory() { + return BuildPotentialFactory.INSTANCE; + } + + private enum BuildPotentialFactory implements MessageFactory<BuildPotential> { + INSTANCE; + + @Override + public BuildPotential create() { + return BuildPotential.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName potentialId = FieldName.forField("PotentialId"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerBuildInfo} + */ + public static final class StarTowerBuildInfo extends ProtoMessage<StarTowerBuildInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 BuildCoin = 3;</code> + */ + private int buildCoin; + + /** + * <code>optional .StarTowerBuildBrief Brief = 1;</code> + */ + private final StarTowerBuildBrief brief = StarTowerBuildBrief.newInstance(); + + /** + * <code>optional .StarTowerBuildDetail Detail = 2;</code> + */ + private final StarTowerBuildDetail detail = StarTowerBuildDetail.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBuildInfo() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildInfo} + */ + public static StarTowerBuildInfo newInstance() { + return new StarTowerBuildInfo(); + } + + /** + * <code>optional uint32 BuildCoin = 3;</code> + * @return whether the buildCoin field is set + */ + public boolean hasBuildCoin() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 BuildCoin = 3;</code> + * @return this + */ + public StarTowerBuildInfo clearBuildCoin() { + bitField0_ &= ~0x00000001; + buildCoin = 0; + return this; + } + + /** + * <code>optional uint32 BuildCoin = 3;</code> + * @return the buildCoin + */ + public int getBuildCoin() { + return buildCoin; + } + + /** + * <code>optional uint32 BuildCoin = 3;</code> + * @param value the buildCoin to set + * @return this + */ + public StarTowerBuildInfo setBuildCoin(final int value) { + bitField0_ |= 0x00000001; + buildCoin = value; + return this; + } + + /** + * <code>optional .StarTowerBuildBrief Brief = 1;</code> + * @return whether the brief field is set + */ + public boolean hasBrief() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .StarTowerBuildBrief Brief = 1;</code> + * @return this + */ + public StarTowerBuildInfo clearBrief() { + bitField0_ &= ~0x00000002; + brief.clear(); + return this; + } + + /** + * <code>optional .StarTowerBuildBrief Brief = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBrief()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerBuildBrief getBrief() { + return brief; + } + + /** + * <code>optional .StarTowerBuildBrief Brief = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerBuildBrief getMutableBrief() { + bitField0_ |= 0x00000002; + return brief; + } + + /** + * <code>optional .StarTowerBuildBrief Brief = 1;</code> + * @param value the brief to set + * @return this + */ + public StarTowerBuildInfo setBrief(final StarTowerBuildBrief value) { + bitField0_ |= 0x00000002; + brief.copyFrom(value); + return this; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 2;</code> + * @return whether the detail field is set + */ + public boolean hasDetail() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 2;</code> + * @return this + */ + public StarTowerBuildInfo clearDetail() { + bitField0_ &= ~0x00000004; + detail.clear(); + return this; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDetail()} if you want to modify it. + * + * @return internal storage object for reading + */ + public StarTowerBuildDetail getDetail() { + return detail; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public StarTowerBuildDetail getMutableDetail() { + bitField0_ |= 0x00000004; + return detail; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 2;</code> + * @param value the detail to set + * @return this + */ + public StarTowerBuildInfo setDetail(final StarTowerBuildDetail value) { + bitField0_ |= 0x00000004; + detail.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBuildInfo copyFrom(final StarTowerBuildInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildCoin = other.buildCoin; + brief.copyFrom(other.brief); + detail.copyFrom(other.detail); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildInfo mergeFrom(final StarTowerBuildInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildCoin()) { + setBuildCoin(other.buildCoin); + } + if (other.hasBrief()) { + getMutableBrief().mergeFrom(other.brief); + } + if (other.hasDetail()) { + getMutableDetail().mergeFrom(other.detail); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildCoin = 0; + brief.clear(); + detail.clear(); + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBuildInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + brief.clearQuick(); + detail.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildInfo)) { + return false; + } + StarTowerBuildInfo other = (StarTowerBuildInfo) o; + return bitField0_ == other.bitField0_ + && (!hasBuildCoin() || buildCoin == other.buildCoin) + && (!hasBrief() || brief.equals(other.brief)) + && (!hasDetail() || detail.equals(other.detail)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(buildCoin); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(brief); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(detail); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(buildCoin); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(brief); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(detail); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // buildCoin + buildCoin = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // brief + input.readMessage(brief); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // detail + input.readMessage(detail); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.buildCoin, buildCoin); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.brief, brief); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.detail, detail); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBuildInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 602481151: { + if (input.isAtField(FieldNames.buildCoin)) { + if (!input.trySkipNullValue()) { + buildCoin = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64452698: { + if (input.isAtField(FieldNames.brief)) { + if (!input.trySkipNullValue()) { + input.readMessage(brief); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2043610225: { + if (input.isAtField(FieldNames.detail)) { + if (!input.trySkipNullValue()) { + input.readMessage(detail); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildInfo clone() { + return new StarTowerBuildInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildInfo(), data).checkInitialized(); + } + + public static StarTowerBuildInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildInfo(), input).checkInitialized(); + } + + public static StarTowerBuildInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildInfo messages + */ + public static MessageFactory<StarTowerBuildInfo> getFactory() { + return StarTowerBuildInfoFactory.INSTANCE; + } + + private enum StarTowerBuildInfoFactory implements MessageFactory<StarTowerBuildInfo> { + INSTANCE; + + @Override + public StarTowerBuildInfo create() { + return StarTowerBuildInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildCoin = FieldName.forField("BuildCoin"); + + static final FieldName brief = FieldName.forField("Brief"); + + static final FieldName detail = FieldName.forField("Detail"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerBuildBrief} + */ + public static final class StarTowerBuildBrief extends ProtoMessage<StarTowerBuildBrief> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 Id = 1;</code> + */ + private long id; + + /** + * <code>optional uint32 Score = 5;</code> + */ + private int score; + + /** + * <code>optional uint32 StarTowerId = 8;</code> + */ + private int starTowerId; + + /** + * <code>optional bool Lock = 3;</code> + */ + private boolean lock; + + /** + * <code>optional bool Preference = 4;</code> + */ + private boolean preference; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string Name = 2;</code> + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + /** + * <code>repeated uint32 DiscIds = 6;</code> + */ + private final RepeatedInt discIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .TowerBuildChar Chars = 7;</code> + */ + private final RepeatedMessage<TowerBuildChar> chars = RepeatedMessage.newEmptyInstance(TowerBuildChar.getFactory()); + + private StarTowerBuildBrief() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildBrief} + */ + public static StarTowerBuildBrief newInstance() { + return new StarTowerBuildBrief(); + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return this + */ + public StarTowerBuildBrief clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return the id + */ + public long getId() { + return id; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerBuildBrief setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return this + */ + public StarTowerBuildBrief clearScore() { + bitField0_ &= ~0x00000002; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @param value the score to set + * @return this + */ + public StarTowerBuildBrief setScore(final int value) { + bitField0_ |= 0x00000002; + score = value; + return this; + } + + /** + * <code>optional uint32 StarTowerId = 8;</code> + * @return whether the starTowerId field is set + */ + public boolean hasStarTowerId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 StarTowerId = 8;</code> + * @return this + */ + public StarTowerBuildBrief clearStarTowerId() { + bitField0_ &= ~0x00000004; + starTowerId = 0; + return this; + } + + /** + * <code>optional uint32 StarTowerId = 8;</code> + * @return the starTowerId + */ + public int getStarTowerId() { + return starTowerId; + } + + /** + * <code>optional uint32 StarTowerId = 8;</code> + * @param value the starTowerId to set + * @return this + */ + public StarTowerBuildBrief setStarTowerId(final int value) { + bitField0_ |= 0x00000004; + starTowerId = value; + return this; + } + + /** + * <code>optional bool Lock = 3;</code> + * @return whether the lock field is set + */ + public boolean hasLock() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bool Lock = 3;</code> + * @return this + */ + public StarTowerBuildBrief clearLock() { + bitField0_ &= ~0x00000008; + lock = false; + return this; + } + + /** + * <code>optional bool Lock = 3;</code> + * @return the lock + */ + public boolean getLock() { + return lock; + } + + /** + * <code>optional bool Lock = 3;</code> + * @param value the lock to set + * @return this + */ + public StarTowerBuildBrief setLock(final boolean value) { + bitField0_ |= 0x00000008; + lock = value; + return this; + } + + /** + * <code>optional bool Preference = 4;</code> + * @return whether the preference field is set + */ + public boolean hasPreference() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bool Preference = 4;</code> + * @return this + */ + public StarTowerBuildBrief clearPreference() { + bitField0_ &= ~0x00000010; + preference = false; + return this; + } + + /** + * <code>optional bool Preference = 4;</code> + * @return the preference + */ + public boolean getPreference() { + return preference; + } + + /** + * <code>optional bool Preference = 4;</code> + * @param value the preference to set + * @return this + */ + public StarTowerBuildBrief setPreference(final boolean value) { + bitField0_ |= 0x00000010; + preference = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildBrief clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildBrief addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildBrief addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildBrief setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string Name = 2;</code> + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional string Name = 2;</code> + * @return this + */ + public StarTowerBuildBrief clearName() { + bitField0_ &= ~0x00000040; + name.clear(); + return this; + } + + /** + * <code>optional string Name = 2;</code> + * @return the name + */ + public String getName() { + return name.getString(); + } + + /** + * <code>optional string Name = 2;</code> + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * <code>optional string Name = 2;</code> + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000040; + return this.name; + } + + /** + * <code>optional string Name = 2;</code> + * @param value the name to set + * @return this + */ + public StarTowerBuildBrief setName(final CharSequence value) { + bitField0_ |= 0x00000040; + name.copyFrom(value); + return this; + } + + /** + * <code>optional string Name = 2;</code> + * @param value the name to set + * @return this + */ + public StarTowerBuildBrief setName(final Utf8String value) { + bitField0_ |= 0x00000040; + name.copyFrom(value); + return this; + } + + /** + * <code>repeated uint32 DiscIds = 6;</code> + * @return whether the discIds field is set + */ + public boolean hasDiscIds() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>repeated uint32 DiscIds = 6;</code> + * @return this + */ + public StarTowerBuildBrief clearDiscIds() { + bitField0_ &= ~0x00000080; + discIds.clear(); + return this; + } + + /** + * <code>repeated uint32 DiscIds = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDiscIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDiscIds() { + return discIds; + } + + /** + * <code>repeated uint32 DiscIds = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDiscIds() { + bitField0_ |= 0x00000080; + return discIds; + } + + /** + * <code>repeated uint32 DiscIds = 6;</code> + * @param value the discIds to add + * @return this + */ + public StarTowerBuildBrief addDiscIds(final int value) { + bitField0_ |= 0x00000080; + discIds.add(value); + return this; + } + + /** + * <code>repeated uint32 DiscIds = 6;</code> + * @param values the discIds to add + * @return this + */ + public StarTowerBuildBrief addAllDiscIds(final int... values) { + bitField0_ |= 0x00000080; + discIds.addAll(values); + return this; + } + + /** + * <code>repeated .TowerBuildChar Chars = 7;</code> + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>repeated .TowerBuildChar Chars = 7;</code> + * @return this + */ + public StarTowerBuildBrief clearChars() { + bitField0_ &= ~0x00000100; + chars.clear(); + return this; + } + + /** + * <code>repeated .TowerBuildChar Chars = 7;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<TowerBuildChar> getChars() { + return chars; + } + + /** + * <code>repeated .TowerBuildChar Chars = 7;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<TowerBuildChar> getMutableChars() { + bitField0_ |= 0x00000100; + return chars; + } + + /** + * <code>repeated .TowerBuildChar Chars = 7;</code> + * @param value the chars to add + * @return this + */ + public StarTowerBuildBrief addChars(final TowerBuildChar value) { + bitField0_ |= 0x00000100; + chars.add(value); + return this; + } + + /** + * <code>repeated .TowerBuildChar Chars = 7;</code> + * @param values the chars to add + * @return this + */ + public StarTowerBuildBrief addAllChars(final TowerBuildChar... values) { + bitField0_ |= 0x00000100; + chars.addAll(values); + return this; + } + + @Override + public StarTowerBuildBrief copyFrom(final StarTowerBuildBrief other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + score = other.score; + starTowerId = other.starTowerId; + lock = other.lock; + preference = other.preference; + nextPackage.copyFrom(other.nextPackage); + name.copyFrom(other.name); + discIds.copyFrom(other.discIds); + chars.copyFrom(other.chars); + } + return this; + } + + @Override + public StarTowerBuildBrief mergeFrom(final StarTowerBuildBrief other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasStarTowerId()) { + setStarTowerId(other.starTowerId); + } + if (other.hasLock()) { + setLock(other.lock); + } + if (other.hasPreference()) { + setPreference(other.preference); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + if (other.hasDiscIds()) { + getMutableDiscIds().addAll(other.discIds); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + return this; + } + + @Override + public StarTowerBuildBrief clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + score = 0; + starTowerId = 0; + lock = false; + preference = false; + nextPackage.clear(); + name.clear(); + discIds.clear(); + chars.clear(); + return this; + } + + @Override + public StarTowerBuildBrief clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + discIds.clear(); + chars.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildBrief)) { + return false; + } + StarTowerBuildBrief other = (StarTowerBuildBrief) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasScore() || score == other.score) + && (!hasStarTowerId() || starTowerId == other.starTowerId) + && (!hasLock() || lock == other.lock) + && (!hasPreference() || preference == other.preference) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasName() || name.equals(other.name)) + && (!hasDiscIds() || discIds.equals(other.discIds)) + && (!hasChars() || chars.equals(other.chars)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(starTowerId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(lock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 32); + output.writeBoolNoTag(preference); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(name); + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < discIds.length(); i++) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(discIds.array()[i]); + } + } + if ((bitField0_ & 0x00000100) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(chars.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(starTowerId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * discIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(discIds); + } + if ((bitField0_ & 0x00000100) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildBrief mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // starTowerId + starTowerId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // lock + lock = input.readBool(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // preference + preference = input.readBool(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // name + input.readString(name); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // discIds [packed=true] + input.readPackedUInt32(discIds, tag); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x00000100; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 48: { + // discIds [packed=false] + tag = input.readRepeatedUInt32(discIds, tag); + bitField0_ |= 0x00000080; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.starTowerId, starTowerId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBool(FieldNames.lock, lock); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBool(FieldNames.preference, preference); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeString(FieldNames.name, name); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedUInt32(FieldNames.discIds, discIds); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + output.endObject(); + } + + @Override + public StarTowerBuildBrief mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2024592590: { + if (input.isAtField(FieldNames.starTowerId)) { + if (!input.trySkipNullValue()) { + starTowerId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2373963: { + if (input.isAtField(FieldNames.lock)) { + if (!input.trySkipNullValue()) { + lock = input.readBool(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 533633275: { + if (input.isAtField(FieldNames.preference)) { + if (!input.trySkipNullValue()) { + preference = input.readBool(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2420395: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -958970685: { + if (input.isAtField(FieldNames.discIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(discIds); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildBrief clone() { + return new StarTowerBuildBrief().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildBrief parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildBrief(), data).checkInitialized(); + } + + public static StarTowerBuildBrief parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildBrief(), input).checkInitialized(); + } + + public static StarTowerBuildBrief parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildBrief(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildBrief messages + */ + public static MessageFactory<StarTowerBuildBrief> getFactory() { + return StarTowerBuildBriefFactory.INSTANCE; + } + + private enum StarTowerBuildBriefFactory implements MessageFactory<StarTowerBuildBrief> { + INSTANCE; + + @Override + public StarTowerBuildBrief create() { + return StarTowerBuildBrief.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName starTowerId = FieldName.forField("StarTowerId"); + + static final FieldName lock = FieldName.forField("Lock"); + + static final FieldName preference = FieldName.forField("Preference"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName name = FieldName.forField("Name"); + + static final FieldName discIds = FieldName.forField("DiscIds"); + + static final FieldName chars = FieldName.forField("Chars"); + } + } + + /** + * Protobuf type {@code StarTowerBuildDetail} + */ + public static final class StarTowerBuildDetail extends ProtoMessage<StarTowerBuildDetail> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ActiveSecondaryIds = 3;</code> + */ + private final RepeatedInt activeSecondaryIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .BuildPotential Potentials = 1;</code> + */ + private final RepeatedMessage<BuildPotential> potentials = RepeatedMessage.newEmptyInstance(BuildPotential.getFactory()); + + /** + * <code>repeated .ItemTpl SubNoteSkills = 2;</code> + */ + private final RepeatedMessage<Public.ItemTpl> subNoteSkills = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private StarTowerBuildDetail() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildDetail} + */ + public static StarTowerBuildDetail newInstance() { + return new StarTowerBuildDetail(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildDetail clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildDetail addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildDetail addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildDetail setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 3;</code> + * @return whether the activeSecondaryIds field is set + */ + public boolean hasActiveSecondaryIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 3;</code> + * @return this + */ + public StarTowerBuildDetail clearActiveSecondaryIds() { + bitField0_ &= ~0x00000002; + activeSecondaryIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableActiveSecondaryIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getActiveSecondaryIds() { + return activeSecondaryIds; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableActiveSecondaryIds() { + bitField0_ |= 0x00000002; + return activeSecondaryIds; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 3;</code> + * @param value the activeSecondaryIds to add + * @return this + */ + public StarTowerBuildDetail addActiveSecondaryIds(final int value) { + bitField0_ |= 0x00000002; + activeSecondaryIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ActiveSecondaryIds = 3;</code> + * @param values the activeSecondaryIds to add + * @return this + */ + public StarTowerBuildDetail addAllActiveSecondaryIds(final int... values) { + bitField0_ |= 0x00000002; + activeSecondaryIds.addAll(values); + return this; + } + + /** + * <code>repeated .BuildPotential Potentials = 1;</code> + * @return whether the potentials field is set + */ + public boolean hasPotentials() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .BuildPotential Potentials = 1;</code> + * @return this + */ + public StarTowerBuildDetail clearPotentials() { + bitField0_ &= ~0x00000004; + potentials.clear(); + return this; + } + + /** + * <code>repeated .BuildPotential Potentials = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePotentials()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<BuildPotential> getPotentials() { + return potentials; + } + + /** + * <code>repeated .BuildPotential Potentials = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<BuildPotential> getMutablePotentials() { + bitField0_ |= 0x00000004; + return potentials; + } + + /** + * <code>repeated .BuildPotential Potentials = 1;</code> + * @param value the potentials to add + * @return this + */ + public StarTowerBuildDetail addPotentials(final BuildPotential value) { + bitField0_ |= 0x00000004; + potentials.add(value); + return this; + } + + /** + * <code>repeated .BuildPotential Potentials = 1;</code> + * @param values the potentials to add + * @return this + */ + public StarTowerBuildDetail addAllPotentials(final BuildPotential... values) { + bitField0_ |= 0x00000004; + potentials.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl SubNoteSkills = 2;</code> + * @return whether the subNoteSkills field is set + */ + public boolean hasSubNoteSkills() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .ItemTpl SubNoteSkills = 2;</code> + * @return this + */ + public StarTowerBuildDetail clearSubNoteSkills() { + bitField0_ &= ~0x00000008; + subNoteSkills.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl SubNoteSkills = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSubNoteSkills()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getSubNoteSkills() { + return subNoteSkills; + } + + /** + * <code>repeated .ItemTpl SubNoteSkills = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableSubNoteSkills() { + bitField0_ |= 0x00000008; + return subNoteSkills; + } + + /** + * <code>repeated .ItemTpl SubNoteSkills = 2;</code> + * @param value the subNoteSkills to add + * @return this + */ + public StarTowerBuildDetail addSubNoteSkills(final Public.ItemTpl value) { + bitField0_ |= 0x00000008; + subNoteSkills.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl SubNoteSkills = 2;</code> + * @param values the subNoteSkills to add + * @return this + */ + public StarTowerBuildDetail addAllSubNoteSkills(final Public.ItemTpl... values) { + bitField0_ |= 0x00000008; + subNoteSkills.addAll(values); + return this; + } + + @Override + public StarTowerBuildDetail copyFrom(final StarTowerBuildDetail other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + activeSecondaryIds.copyFrom(other.activeSecondaryIds); + potentials.copyFrom(other.potentials); + subNoteSkills.copyFrom(other.subNoteSkills); + } + return this; + } + + @Override + public StarTowerBuildDetail mergeFrom(final StarTowerBuildDetail other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasActiveSecondaryIds()) { + getMutableActiveSecondaryIds().addAll(other.activeSecondaryIds); + } + if (other.hasPotentials()) { + getMutablePotentials().addAll(other.potentials); + } + if (other.hasSubNoteSkills()) { + getMutableSubNoteSkills().addAll(other.subNoteSkills); + } + return this; + } + + @Override + public StarTowerBuildDetail clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + activeSecondaryIds.clear(); + potentials.clear(); + subNoteSkills.clear(); + return this; + } + + @Override + public StarTowerBuildDetail clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + activeSecondaryIds.clear(); + potentials.clearQuick(); + subNoteSkills.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildDetail)) { + return false; + } + StarTowerBuildDetail other = (StarTowerBuildDetail) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasActiveSecondaryIds() || activeSecondaryIds.equals(other.activeSecondaryIds)) + && (!hasPotentials() || potentials.equals(other.potentials)) + && (!hasSubNoteSkills() || subNoteSkills.equals(other.subNoteSkills)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < activeSecondaryIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(activeSecondaryIds.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < potentials.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(potentials.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < subNoteSkills.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(subNoteSkills.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * activeSecondaryIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(activeSecondaryIds); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * potentials.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(potentials); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * subNoteSkills.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(subNoteSkills); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildDetail mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // activeSecondaryIds [packed=true] + input.readPackedUInt32(activeSecondaryIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // potentials + tag = input.readRepeatedMessage(potentials, tag); + bitField0_ |= 0x00000004; + if (tag != 18) { + break; + } + } + case 18: { + // subNoteSkills + tag = input.readRepeatedMessage(subNoteSkills, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // activeSecondaryIds [packed=false] + tag = input.readRepeatedUInt32(activeSecondaryIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.activeSecondaryIds, activeSecondaryIds); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.potentials, potentials); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.subNoteSkills, subNoteSkills); + } + output.endObject(); + } + + @Override + public StarTowerBuildDetail mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1499070186: { + if (input.isAtField(FieldNames.activeSecondaryIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(activeSecondaryIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1405493301: { + if (input.isAtField(FieldNames.potentials)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(potentials); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 349821204: { + if (input.isAtField(FieldNames.subNoteSkills)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(subNoteSkills); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildDetail clone() { + return new StarTowerBuildDetail().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildDetail parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetail(), data).checkInitialized(); + } + + public static StarTowerBuildDetail parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetail(), input).checkInitialized(); + } + + public static StarTowerBuildDetail parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetail(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildDetail messages + */ + public static MessageFactory<StarTowerBuildDetail> getFactory() { + return StarTowerBuildDetailFactory.INSTANCE; + } + + private enum StarTowerBuildDetailFactory implements MessageFactory<StarTowerBuildDetail> { + INSTANCE; + + @Override + public StarTowerBuildDetail create() { + return StarTowerBuildDetail.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName activeSecondaryIds = FieldName.forField("ActiveSecondaryIds"); + + static final FieldName potentials = FieldName.forField("Potentials"); + + static final FieldName subNoteSkills = FieldName.forField("SubNoteSkills"); + } + } + + /** + * Protobuf type {@code StarTowerBookCharPotentialBrief} + */ + public static final class StarTowerBookCharPotentialBrief extends ProtoMessage<StarTowerBookCharPotentialBrief> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional uint32 Count = 2;</code> + */ + private int count; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBookCharPotentialBrief() { + } + + /** + * @return a new empty instance of {@code StarTowerBookCharPotentialBrief} + */ + public static StarTowerBookCharPotentialBrief newInstance() { + return new StarTowerBookCharPotentialBrief(); + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public StarTowerBookCharPotentialBrief clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public StarTowerBookCharPotentialBrief setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * <code>optional uint32 Count = 2;</code> + * @return whether the count field is set + */ + public boolean hasCount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Count = 2;</code> + * @return this + */ + public StarTowerBookCharPotentialBrief clearCount() { + bitField0_ &= ~0x00000002; + count = 0; + return this; + } + + /** + * <code>optional uint32 Count = 2;</code> + * @return the count + */ + public int getCount() { + return count; + } + + /** + * <code>optional uint32 Count = 2;</code> + * @param value the count to set + * @return this + */ + public StarTowerBookCharPotentialBrief setCount(final int value) { + bitField0_ |= 0x00000002; + count = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBookCharPotentialBrief clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookCharPotentialBrief addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookCharPotentialBrief addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookCharPotentialBrief setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBookCharPotentialBrief copyFrom(final StarTowerBookCharPotentialBrief other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + count = other.count; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBookCharPotentialBrief mergeFrom(final StarTowerBookCharPotentialBrief other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasCount()) { + setCount(other.count); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBookCharPotentialBrief clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + count = 0; + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBookCharPotentialBrief clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookCharPotentialBrief)) { + return false; + } + StarTowerBookCharPotentialBrief other = (StarTowerBookCharPotentialBrief) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasCount() || count == other.count) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(count); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(count); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookCharPotentialBrief mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // count + count = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.count, count); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBookCharPotentialBrief mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65298671: { + if (input.isAtField(FieldNames.count)) { + if (!input.trySkipNullValue()) { + count = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookCharPotentialBrief clone() { + return new StarTowerBookCharPotentialBrief().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookCharPotentialBrief parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookCharPotentialBrief(), data).checkInitialized(); + } + + public static StarTowerBookCharPotentialBrief parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookCharPotentialBrief(), input).checkInitialized(); + } + + public static StarTowerBookCharPotentialBrief parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookCharPotentialBrief(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookCharPotentialBrief messages + */ + public static MessageFactory<StarTowerBookCharPotentialBrief> getFactory() { + return StarTowerBookCharPotentialBriefFactory.INSTANCE; + } + + private enum StarTowerBookCharPotentialBriefFactory implements MessageFactory<StarTowerBookCharPotentialBrief> { + INSTANCE; + + @Override + public StarTowerBookCharPotentialBrief create() { + return StarTowerBookCharPotentialBrief.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName count = FieldName.forField("Count"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerBookPotential} + */ + public static final class StarTowerBookPotential extends ProtoMessage<StarTowerBookPotential> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBookPotential() { + } + + /** + * @return a new empty instance of {@code StarTowerBookPotential} + */ + public static StarTowerBookPotential newInstance() { + return new StarTowerBookPotential(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerBookPotential clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerBookPotential setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return this + */ + public StarTowerBookPotential clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public StarTowerBookPotential setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBookPotential clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookPotential addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookPotential addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookPotential setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBookPotential copyFrom(final StarTowerBookPotential other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + level = other.level; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBookPotential mergeFrom(final StarTowerBookPotential other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBookPotential clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + level = 0; + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBookPotential clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookPotential)) { + return false; + } + StarTowerBookPotential other = (StarTowerBookPotential) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasLevel() || level == other.level) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookPotential mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBookPotential mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookPotential clone() { + return new StarTowerBookPotential().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookPotential parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookPotential(), data).checkInitialized(); + } + + public static StarTowerBookPotential parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotential(), input).checkInitialized(); + } + + public static StarTowerBookPotential parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotential(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookPotential messages + */ + public static MessageFactory<StarTowerBookPotential> getFactory() { + return StarTowerBookPotentialFactory.INSTANCE; + } + + private enum StarTowerBookPotentialFactory implements MessageFactory<StarTowerBookPotential> { + INSTANCE; + + @Override + public StarTowerBookPotential create() { + return StarTowerBookPotential.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerBookCharPotential} + */ + public static final class StarTowerBookCharPotential extends ProtoMessage<StarTowerBookCharPotential> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StarTowerBookPotential Potentials = 2;</code> + */ + private final RepeatedMessage<StarTowerBookPotential> potentials = RepeatedMessage.newEmptyInstance(StarTowerBookPotential.getFactory()); + + private StarTowerBookCharPotential() { + } + + /** + * @return a new empty instance of {@code StarTowerBookCharPotential} + */ + public static StarTowerBookCharPotential newInstance() { + return new StarTowerBookCharPotential(); + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public StarTowerBookCharPotential clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public StarTowerBookCharPotential setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBookCharPotential clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookCharPotential addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookCharPotential addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookCharPotential setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 2;</code> + * @return whether the potentials field is set + */ + public boolean hasPotentials() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 2;</code> + * @return this + */ + public StarTowerBookCharPotential clearPotentials() { + bitField0_ &= ~0x00000004; + potentials.clear(); + return this; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePotentials()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StarTowerBookPotential> getPotentials() { + return potentials; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StarTowerBookPotential> getMutablePotentials() { + bitField0_ |= 0x00000004; + return potentials; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 2;</code> + * @param value the potentials to add + * @return this + */ + public StarTowerBookCharPotential addPotentials(final StarTowerBookPotential value) { + bitField0_ |= 0x00000004; + potentials.add(value); + return this; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 2;</code> + * @param values the potentials to add + * @return this + */ + public StarTowerBookCharPotential addAllPotentials(final StarTowerBookPotential... values) { + bitField0_ |= 0x00000004; + potentials.addAll(values); + return this; + } + + @Override + public StarTowerBookCharPotential copyFrom(final StarTowerBookCharPotential other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + nextPackage.copyFrom(other.nextPackage); + potentials.copyFrom(other.potentials); + } + return this; + } + + @Override + public StarTowerBookCharPotential mergeFrom(final StarTowerBookCharPotential other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasPotentials()) { + getMutablePotentials().addAll(other.potentials); + } + return this; + } + + @Override + public StarTowerBookCharPotential clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + nextPackage.clear(); + potentials.clear(); + return this; + } + + @Override + public StarTowerBookCharPotential clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + potentials.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookCharPotential)) { + return false; + } + StarTowerBookCharPotential other = (StarTowerBookCharPotential) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasPotentials() || potentials.equals(other.potentials)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < potentials.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(potentials.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * potentials.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(potentials); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookCharPotential mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // potentials + tag = input.readRepeatedMessage(potentials, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.potentials, potentials); + } + output.endObject(); + } + + @Override + public StarTowerBookCharPotential mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1405493301: { + if (input.isAtField(FieldNames.potentials)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(potentials); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookCharPotential clone() { + return new StarTowerBookCharPotential().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookCharPotential parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookCharPotential(), data).checkInitialized(); + } + + public static StarTowerBookCharPotential parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookCharPotential(), input).checkInitialized(); + } + + public static StarTowerBookCharPotential parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBookCharPotential(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookCharPotential messages + */ + public static MessageFactory<StarTowerBookCharPotential> getFactory() { + return StarTowerBookCharPotentialFactory.INSTANCE; + } + + private enum StarTowerBookCharPotentialFactory implements MessageFactory<StarTowerBookCharPotential> { + INSTANCE; + + @Override + public StarTowerBookCharPotential create() { + return StarTowerBookCharPotential.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName potentials = FieldName.forField("Potentials"); + } + } + + /** + * Protobuf type {@code TowerChangeData} + */ + public static final class TowerChangeData extends ProtoMessage<TowerChangeData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .SubNoteSkillInfo Infos = 1;</code> + */ + private final RepeatedMessage<SubNoteSkillInfo> infos = RepeatedMessage.newEmptyInstance(SubNoteSkillInfo.getFactory()); + + /** + * <code>repeated .ActiveSecondaryChange Secondaries = 2;</code> + */ + private final RepeatedMessage<ActiveSecondaryChange> secondaries = RepeatedMessage.newEmptyInstance(ActiveSecondaryChange.getFactory()); + + private TowerChangeData() { + } + + /** + * @return a new empty instance of {@code TowerChangeData} + */ + public static TowerChangeData newInstance() { + return new TowerChangeData(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerChangeData clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerChangeData addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerChangeData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerChangeData setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 1;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 1;</code> + * @return this + */ + public TowerChangeData clearInfos() { + bitField0_ &= ~0x00000002; + infos.clear(); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<SubNoteSkillInfo> getInfos() { + return infos; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<SubNoteSkillInfo> getMutableInfos() { + bitField0_ |= 0x00000002; + return infos; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 1;</code> + * @param value the infos to add + * @return this + */ + public TowerChangeData addInfos(final SubNoteSkillInfo value) { + bitField0_ |= 0x00000002; + infos.add(value); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 1;</code> + * @param values the infos to add + * @return this + */ + public TowerChangeData addAllInfos(final SubNoteSkillInfo... values) { + bitField0_ |= 0x00000002; + infos.addAll(values); + return this; + } + + /** + * <code>repeated .ActiveSecondaryChange Secondaries = 2;</code> + * @return whether the secondaries field is set + */ + public boolean hasSecondaries() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ActiveSecondaryChange Secondaries = 2;</code> + * @return this + */ + public TowerChangeData clearSecondaries() { + bitField0_ &= ~0x00000004; + secondaries.clear(); + return this; + } + + /** + * <code>repeated .ActiveSecondaryChange Secondaries = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSecondaries()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ActiveSecondaryChange> getSecondaries() { + return secondaries; + } + + /** + * <code>repeated .ActiveSecondaryChange Secondaries = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ActiveSecondaryChange> getMutableSecondaries() { + bitField0_ |= 0x00000004; + return secondaries; + } + + /** + * <code>repeated .ActiveSecondaryChange Secondaries = 2;</code> + * @param value the secondaries to add + * @return this + */ + public TowerChangeData addSecondaries(final ActiveSecondaryChange value) { + bitField0_ |= 0x00000004; + secondaries.add(value); + return this; + } + + /** + * <code>repeated .ActiveSecondaryChange Secondaries = 2;</code> + * @param values the secondaries to add + * @return this + */ + public TowerChangeData addAllSecondaries(final ActiveSecondaryChange... values) { + bitField0_ |= 0x00000004; + secondaries.addAll(values); + return this; + } + + @Override + public TowerChangeData copyFrom(final TowerChangeData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + secondaries.copyFrom(other.secondaries); + } + return this; + } + + @Override + public TowerChangeData mergeFrom(final TowerChangeData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + if (other.hasSecondaries()) { + getMutableSecondaries().addAll(other.secondaries); + } + return this; + } + + @Override + public TowerChangeData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clear(); + secondaries.clear(); + return this; + } + + @Override + public TowerChangeData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clearQuick(); + secondaries.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerChangeData)) { + return false; + } + TowerChangeData other = (TowerChangeData) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)) + && (!hasSecondaries() || secondaries.equals(other.secondaries)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < secondaries.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(secondaries.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * secondaries.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(secondaries); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerChangeData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000002; + if (tag != 18) { + break; + } + } + case 18: { + // secondaries + tag = input.readRepeatedMessage(secondaries, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.secondaries, secondaries); + } + output.endObject(); + } + + @Override + public TowerChangeData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1935105266: { + if (input.isAtField(FieldNames.secondaries)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(secondaries); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerChangeData clone() { + return new TowerChangeData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerChangeData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerChangeData(), data).checkInitialized(); + } + + public static TowerChangeData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerChangeData(), input).checkInitialized(); + } + + public static TowerChangeData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerChangeData(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerChangeData messages + */ + public static MessageFactory<TowerChangeData> getFactory() { + return TowerChangeDataFactory.INSTANCE; + } + + private enum TowerChangeDataFactory implements MessageFactory<TowerChangeData> { + INSTANCE; + + @Override + public TowerChangeData create() { + return TowerChangeData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + + static final FieldName secondaries = FieldName.forField("Secondaries"); + } + } + + /** + * Protobuf type {@code ActiveSecondaryChange} + */ + public static final class ActiveSecondaryChange extends ProtoMessage<ActiveSecondaryChange> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 SecondaryId = 1;</code> + */ + private int secondaryId; + + /** + * <code>optional bool Active = 2;</code> + */ + private boolean active; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ActiveSecondaryChange() { + } + + /** + * @return a new empty instance of {@code ActiveSecondaryChange} + */ + public static ActiveSecondaryChange newInstance() { + return new ActiveSecondaryChange(); + } + + /** + * <code>optional uint32 SecondaryId = 1;</code> + * @return whether the secondaryId field is set + */ + public boolean hasSecondaryId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 SecondaryId = 1;</code> + * @return this + */ + public ActiveSecondaryChange clearSecondaryId() { + bitField0_ &= ~0x00000001; + secondaryId = 0; + return this; + } + + /** + * <code>optional uint32 SecondaryId = 1;</code> + * @return the secondaryId + */ + public int getSecondaryId() { + return secondaryId; + } + + /** + * <code>optional uint32 SecondaryId = 1;</code> + * @param value the secondaryId to set + * @return this + */ + public ActiveSecondaryChange setSecondaryId(final int value) { + bitField0_ |= 0x00000001; + secondaryId = value; + return this; + } + + /** + * <code>optional bool Active = 2;</code> + * @return whether the active field is set + */ + public boolean hasActive() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Active = 2;</code> + * @return this + */ + public ActiveSecondaryChange clearActive() { + bitField0_ &= ~0x00000002; + active = false; + return this; + } + + /** + * <code>optional bool Active = 2;</code> + * @return the active + */ + public boolean getActive() { + return active; + } + + /** + * <code>optional bool Active = 2;</code> + * @param value the active to set + * @return this + */ + public ActiveSecondaryChange setActive(final boolean value) { + bitField0_ |= 0x00000002; + active = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ActiveSecondaryChange clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ActiveSecondaryChange addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ActiveSecondaryChange addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ActiveSecondaryChange setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ActiveSecondaryChange copyFrom(final ActiveSecondaryChange other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + secondaryId = other.secondaryId; + active = other.active; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActiveSecondaryChange mergeFrom(final ActiveSecondaryChange other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSecondaryId()) { + setSecondaryId(other.secondaryId); + } + if (other.hasActive()) { + setActive(other.active); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ActiveSecondaryChange clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + secondaryId = 0; + active = false; + nextPackage.clear(); + return this; + } + + @Override + public ActiveSecondaryChange clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ActiveSecondaryChange)) { + return false; + } + ActiveSecondaryChange other = (ActiveSecondaryChange) o; + return bitField0_ == other.bitField0_ + && (!hasSecondaryId() || secondaryId == other.secondaryId) + && (!hasActive() || active == other.active) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(secondaryId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(active); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(secondaryId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ActiveSecondaryChange mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // secondaryId + secondaryId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // active + active = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.secondaryId, secondaryId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.active, active); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ActiveSecondaryChange mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1935119759: { + if (input.isAtField(FieldNames.secondaryId)) { + if (!input.trySkipNullValue()) { + secondaryId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1955883814: { + if (input.isAtField(FieldNames.active)) { + if (!input.trySkipNullValue()) { + active = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ActiveSecondaryChange clone() { + return new ActiveSecondaryChange().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ActiveSecondaryChange parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ActiveSecondaryChange(), data).checkInitialized(); + } + + public static ActiveSecondaryChange parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActiveSecondaryChange(), input).checkInitialized(); + } + + public static ActiveSecondaryChange parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ActiveSecondaryChange(), input).checkInitialized(); + } + + /** + * @return factory for creating ActiveSecondaryChange messages + */ + public static MessageFactory<ActiveSecondaryChange> getFactory() { + return ActiveSecondaryChangeFactory.INSTANCE; + } + + private enum ActiveSecondaryChangeFactory implements MessageFactory<ActiveSecondaryChange> { + INSTANCE; + + @Override + public ActiveSecondaryChange create() { + return ActiveSecondaryChange.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName secondaryId = FieldName.forField("SecondaryId"); + + static final FieldName active = FieldName.forField("Active"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code NPCAffinityInfo} + */ + public static final class NPCAffinityInfo extends ProtoMessage<NPCAffinityInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 NPCId = 1;</code> + */ + private int nPCId; + + /** + * <code>optional uint32 Affinity = 2;</code> + */ + private int affinity; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private NPCAffinityInfo() { + } + + /** + * @return a new empty instance of {@code NPCAffinityInfo} + */ + public static NPCAffinityInfo newInstance() { + return new NPCAffinityInfo(); + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return whether the nPCId field is set + */ + public boolean hasNPCId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return this + */ + public NPCAffinityInfo clearNPCId() { + bitField0_ &= ~0x00000001; + nPCId = 0; + return this; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return the nPCId + */ + public int getNPCId() { + return nPCId; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @param value the nPCId to set + * @return this + */ + public NPCAffinityInfo setNPCId(final int value) { + bitField0_ |= 0x00000001; + nPCId = value; + return this; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return whether the affinity field is set + */ + public boolean hasAffinity() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return this + */ + public NPCAffinityInfo clearAffinity() { + bitField0_ &= ~0x00000002; + affinity = 0; + return this; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return the affinity + */ + public int getAffinity() { + return affinity; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @param value the affinity to set + * @return this + */ + public NPCAffinityInfo setAffinity(final int value) { + bitField0_ |= 0x00000002; + affinity = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public NPCAffinityInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public NPCAffinityInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public NPCAffinityInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public NPCAffinityInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public NPCAffinityInfo copyFrom(final NPCAffinityInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nPCId = other.nPCId; + affinity = other.affinity; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NPCAffinityInfo mergeFrom(final NPCAffinityInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNPCId()) { + setNPCId(other.nPCId); + } + if (other.hasAffinity()) { + setAffinity(other.affinity); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NPCAffinityInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nPCId = 0; + affinity = 0; + nextPackage.clear(); + return this; + } + + @Override + public NPCAffinityInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NPCAffinityInfo)) { + return false; + } + NPCAffinityInfo other = (NPCAffinityInfo) o; + return bitField0_ == other.bitField0_ + && (!hasNPCId() || nPCId == other.nPCId) + && (!hasAffinity() || affinity == other.affinity) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NPCAffinityInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // nPCId + nPCId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // affinity + affinity = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.nPCId, nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.affinity, affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public NPCAffinityInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 74484668: { + if (input.isAtField(FieldNames.nPCId)) { + if (!input.trySkipNullValue()) { + nPCId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 670141768: { + if (input.isAtField(FieldNames.affinity)) { + if (!input.trySkipNullValue()) { + affinity = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NPCAffinityInfo clone() { + return new NPCAffinityInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NPCAffinityInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NPCAffinityInfo(), data).checkInitialized(); + } + + public static NPCAffinityInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityInfo(), input).checkInitialized(); + } + + public static NPCAffinityInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating NPCAffinityInfo messages + */ + public static MessageFactory<NPCAffinityInfo> getFactory() { + return NPCAffinityInfoFactory.INSTANCE; + } + + private enum NPCAffinityInfoFactory implements MessageFactory<NPCAffinityInfo> { + INSTANCE; + + @Override + public NPCAffinityInfo create() { + return NPCAffinityInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nPCId = FieldName.forField("NPCId"); + + static final FieldName affinity = FieldName.forField("Affinity"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code NPCAffinityChange} + */ + public static final class NPCAffinityChange extends ProtoMessage<NPCAffinityChange> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 NPCId = 1;</code> + */ + private int nPCId; + + /** + * <code>optional uint32 Affinity = 2;</code> + */ + private int affinity; + + /** + * <code>optional uint32 Increase = 3;</code> + */ + private int increase; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private NPCAffinityChange() { + } + + /** + * @return a new empty instance of {@code NPCAffinityChange} + */ + public static NPCAffinityChange newInstance() { + return new NPCAffinityChange(); + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return whether the nPCId field is set + */ + public boolean hasNPCId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return this + */ + public NPCAffinityChange clearNPCId() { + bitField0_ &= ~0x00000001; + nPCId = 0; + return this; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @return the nPCId + */ + public int getNPCId() { + return nPCId; + } + + /** + * <code>optional uint32 NPCId = 1;</code> + * @param value the nPCId to set + * @return this + */ + public NPCAffinityChange setNPCId(final int value) { + bitField0_ |= 0x00000001; + nPCId = value; + return this; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return whether the affinity field is set + */ + public boolean hasAffinity() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return this + */ + public NPCAffinityChange clearAffinity() { + bitField0_ &= ~0x00000002; + affinity = 0; + return this; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @return the affinity + */ + public int getAffinity() { + return affinity; + } + + /** + * <code>optional uint32 Affinity = 2;</code> + * @param value the affinity to set + * @return this + */ + public NPCAffinityChange setAffinity(final int value) { + bitField0_ |= 0x00000002; + affinity = value; + return this; + } + + /** + * <code>optional uint32 Increase = 3;</code> + * @return whether the increase field is set + */ + public boolean hasIncrease() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Increase = 3;</code> + * @return this + */ + public NPCAffinityChange clearIncrease() { + bitField0_ &= ~0x00000004; + increase = 0; + return this; + } + + /** + * <code>optional uint32 Increase = 3;</code> + * @return the increase + */ + public int getIncrease() { + return increase; + } + + /** + * <code>optional uint32 Increase = 3;</code> + * @param value the increase to set + * @return this + */ + public NPCAffinityChange setIncrease(final int value) { + bitField0_ |= 0x00000004; + increase = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public NPCAffinityChange clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public NPCAffinityChange addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public NPCAffinityChange addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public NPCAffinityChange setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public NPCAffinityChange copyFrom(final NPCAffinityChange other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nPCId = other.nPCId; + affinity = other.affinity; + increase = other.increase; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NPCAffinityChange mergeFrom(final NPCAffinityChange other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNPCId()) { + setNPCId(other.nPCId); + } + if (other.hasAffinity()) { + setAffinity(other.affinity); + } + if (other.hasIncrease()) { + setIncrease(other.increase); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public NPCAffinityChange clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nPCId = 0; + affinity = 0; + increase = 0; + nextPackage.clear(); + return this; + } + + @Override + public NPCAffinityChange clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NPCAffinityChange)) { + return false; + } + NPCAffinityChange other = (NPCAffinityChange) o; + return bitField0_ == other.bitField0_ + && (!hasNPCId() || nPCId == other.nPCId) + && (!hasAffinity() || affinity == other.affinity) + && (!hasIncrease() || increase == other.increase) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(increase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(increase); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NPCAffinityChange mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // nPCId + nPCId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // affinity + affinity = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // increase + increase = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.nPCId, nPCId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.affinity, affinity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.increase, increase); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public NPCAffinityChange mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 74484668: { + if (input.isAtField(FieldNames.nPCId)) { + if (!input.trySkipNullValue()) { + nPCId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 670141768: { + if (input.isAtField(FieldNames.affinity)) { + if (!input.trySkipNullValue()) { + affinity = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 159965794: { + if (input.isAtField(FieldNames.increase)) { + if (!input.trySkipNullValue()) { + increase = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NPCAffinityChange clone() { + return new NPCAffinityChange().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NPCAffinityChange parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NPCAffinityChange(), data).checkInitialized(); + } + + public static NPCAffinityChange parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityChange(), input).checkInitialized(); + } + + public static NPCAffinityChange parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityChange(), input).checkInitialized(); + } + + /** + * @return factory for creating NPCAffinityChange messages + */ + public static MessageFactory<NPCAffinityChange> getFactory() { + return NPCAffinityChangeFactory.INSTANCE; + } + + private enum NPCAffinityChangeFactory implements MessageFactory<NPCAffinityChange> { + INSTANCE; + + @Override + public NPCAffinityChange create() { + return NPCAffinityChange.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nPCId = FieldName.forField("NPCId"); + + static final FieldName affinity = FieldName.forField("Affinity"); + + static final FieldName increase = FieldName.forField("Increase"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code NPCAffinityLevelReward} + */ + public static final class NPCAffinityLevelReward extends ProtoMessage<NPCAffinityLevelReward> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .NPCAffinityChange Change = 1;</code> + */ + private final NPCAffinityChange change = NPCAffinityChange.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Items = 2;</code> + */ + private final RepeatedMessage<Public.ItemTpl> items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private NPCAffinityLevelReward() { + } + + /** + * @return a new empty instance of {@code NPCAffinityLevelReward} + */ + public static NPCAffinityLevelReward newInstance() { + return new NPCAffinityLevelReward(); + } + + /** + * <code>optional .NPCAffinityChange Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .NPCAffinityChange Change = 1;</code> + * @return this + */ + public NPCAffinityLevelReward clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .NPCAffinityChange Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public NPCAffinityChange getChange() { + return change; + } + + /** + * <code>optional .NPCAffinityChange Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public NPCAffinityChange getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .NPCAffinityChange Change = 1;</code> + * @param value the change to set + * @return this + */ + public NPCAffinityLevelReward setChange(final NPCAffinityChange value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public NPCAffinityLevelReward clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public NPCAffinityLevelReward addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public NPCAffinityLevelReward addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public NPCAffinityLevelReward setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @return this + */ + public NPCAffinityLevelReward clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getItems() { + return items; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @param value the items to add + * @return this + */ + public NPCAffinityLevelReward addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 2;</code> + * @param values the items to add + * @return this + */ + public NPCAffinityLevelReward addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + @Override + public NPCAffinityLevelReward copyFrom(final NPCAffinityLevelReward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public NPCAffinityLevelReward mergeFrom(final NPCAffinityLevelReward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public NPCAffinityLevelReward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public NPCAffinityLevelReward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof NPCAffinityLevelReward)) { + return false; + } + NPCAffinityLevelReward other = (NPCAffinityLevelReward) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public NPCAffinityLevelReward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public NPCAffinityLevelReward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public NPCAffinityLevelReward clone() { + return new NPCAffinityLevelReward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static NPCAffinityLevelReward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new NPCAffinityLevelReward(), data).checkInitialized(); + } + + public static NPCAffinityLevelReward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityLevelReward(), input).checkInitialized(); + } + + public static NPCAffinityLevelReward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new NPCAffinityLevelReward(), input).checkInitialized(); + } + + /** + * @return factory for creating NPCAffinityLevelReward messages + */ + public static MessageFactory<NPCAffinityLevelReward> getFactory() { + return NPCAffinityLevelRewardFactory.INSTANCE; + } + + private enum NPCAffinityLevelRewardFactory implements MessageFactory<NPCAffinityLevelReward> { + INSTANCE; + + @Override + public NPCAffinityLevelReward create() { + return NPCAffinityLevelReward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/QuestDailyActiveRewardRecevie.java b/src/generated/main/emu/nebula/proto/QuestDailyActiveRewardRecevie.java new file mode 100644 index 0000000..dc995d8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/QuestDailyActiveRewardRecevie.java @@ -0,0 +1,529 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class QuestDailyActiveRewardRecevie { + /** + * Protobuf type {@code QuestDailyActiveRewardReceiveResp} + */ + public static final class QuestDailyActiveRewardReceiveResp extends ProtoMessage<QuestDailyActiveRewardReceiveResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ActiveIds = 1;</code> + */ + private final RepeatedInt activeIds = RepeatedInt.newEmptyInstance(); + + private QuestDailyActiveRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code QuestDailyActiveRewardReceiveResp} + */ + public static QuestDailyActiveRewardReceiveResp newInstance() { + return new QuestDailyActiveRewardReceiveResp(); + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public QuestDailyActiveRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public QuestDailyActiveRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public QuestDailyActiveRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public QuestDailyActiveRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public QuestDailyActiveRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public QuestDailyActiveRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ActiveIds = 1;</code> + * @return whether the activeIds field is set + */ + public boolean hasActiveIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 ActiveIds = 1;</code> + * @return this + */ + public QuestDailyActiveRewardReceiveResp clearActiveIds() { + bitField0_ &= ~0x00000004; + activeIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ActiveIds = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableActiveIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getActiveIds() { + return activeIds; + } + + /** + * <code>repeated uint32 ActiveIds = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableActiveIds() { + bitField0_ |= 0x00000004; + return activeIds; + } + + /** + * <code>repeated uint32 ActiveIds = 1;</code> + * @param value the activeIds to add + * @return this + */ + public QuestDailyActiveRewardReceiveResp addActiveIds(final int value) { + bitField0_ |= 0x00000004; + activeIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ActiveIds = 1;</code> + * @param values the activeIds to add + * @return this + */ + public QuestDailyActiveRewardReceiveResp addAllActiveIds(final int... values) { + bitField0_ |= 0x00000004; + activeIds.addAll(values); + return this; + } + + @Override + public QuestDailyActiveRewardReceiveResp copyFrom( + final QuestDailyActiveRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + activeIds.copyFrom(other.activeIds); + } + return this; + } + + @Override + public QuestDailyActiveRewardReceiveResp mergeFrom( + final QuestDailyActiveRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasActiveIds()) { + getMutableActiveIds().addAll(other.activeIds); + } + return this; + } + + @Override + public QuestDailyActiveRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + activeIds.clear(); + return this; + } + + @Override + public QuestDailyActiveRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + activeIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof QuestDailyActiveRewardReceiveResp)) { + return false; + } + QuestDailyActiveRewardReceiveResp other = (QuestDailyActiveRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasActiveIds() || activeIds.equals(other.activeIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < activeIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(activeIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * activeIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(activeIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public QuestDailyActiveRewardReceiveResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // activeIds [packed=true] + input.readPackedUInt32(activeIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // activeIds [packed=false] + tag = input.readRepeatedUInt32(activeIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.activeIds, activeIds); + } + output.endObject(); + } + + @Override + public QuestDailyActiveRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2086528590: { + if (input.isAtField(FieldNames.activeIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(activeIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public QuestDailyActiveRewardReceiveResp clone() { + return new QuestDailyActiveRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static QuestDailyActiveRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new QuestDailyActiveRewardReceiveResp(), data).checkInitialized(); + } + + public static QuestDailyActiveRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new QuestDailyActiveRewardReceiveResp(), input).checkInitialized(); + } + + public static QuestDailyActiveRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new QuestDailyActiveRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating QuestDailyActiveRewardReceiveResp messages + */ + public static MessageFactory<QuestDailyActiveRewardReceiveResp> getFactory() { + return QuestDailyActiveRewardReceiveRespFactory.INSTANCE; + } + + private enum QuestDailyActiveRewardReceiveRespFactory implements MessageFactory<QuestDailyActiveRewardReceiveResp> { + INSTANCE; + + @Override + public QuestDailyActiveRewardReceiveResp create() { + return QuestDailyActiveRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName activeIds = FieldName.forField("ActiveIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/QuestDailyRewardRecevie.java b/src/generated/main/emu/nebula/proto/QuestDailyRewardRecevie.java new file mode 100644 index 0000000..f27f8bf --- /dev/null +++ b/src/generated/main/emu/nebula/proto/QuestDailyRewardRecevie.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class QuestDailyRewardRecevie { +} diff --git a/src/generated/main/emu/nebula/proto/QuestTourGuideRewardReceive.java b/src/generated/main/emu/nebula/proto/QuestTourGuideRewardReceive.java new file mode 100644 index 0000000..d1300bd --- /dev/null +++ b/src/generated/main/emu/nebula/proto/QuestTourGuideRewardReceive.java @@ -0,0 +1,518 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class QuestTourGuideRewardReceive { + /** + * Protobuf type {@code TourGuideQuestRewardResp} + */ + public static final class TourGuideQuestRewardResp extends ProtoMessage<TourGuideQuestRewardResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 15;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + */ + private final RepeatedMessage<Public.ItemTpl> rewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private TourGuideQuestRewardResp() { + } + + /** + * @return a new empty instance of {@code TourGuideQuestRewardResp} + */ + public static TourGuideQuestRewardResp newInstance() { + return new TourGuideQuestRewardResp(); + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @return this + */ + public TourGuideQuestRewardResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @param value the change to set + * @return this + */ + public TourGuideQuestRewardResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TourGuideQuestRewardResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TourGuideQuestRewardResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TourGuideQuestRewardResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TourGuideQuestRewardResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @return this + */ + public TourGuideQuestRewardResp clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getRewards() { + return rewards; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @param value the rewards to add + * @return this + */ + public TourGuideQuestRewardResp addRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @param values the rewards to add + * @return this + */ + public TourGuideQuestRewardResp addAllRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public TourGuideQuestRewardResp copyFrom(final TourGuideQuestRewardResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public TourGuideQuestRewardResp mergeFrom(final TourGuideQuestRewardResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public TourGuideQuestRewardResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public TourGuideQuestRewardResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TourGuideQuestRewardResp)) { + return false; + } + TourGuideQuestRewardResp other = (TourGuideQuestRewardResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TourGuideQuestRewardResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 122: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public TourGuideQuestRewardResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TourGuideQuestRewardResp clone() { + return new TourGuideQuestRewardResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TourGuideQuestRewardResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TourGuideQuestRewardResp(), data).checkInitialized(); + } + + public static TourGuideQuestRewardResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TourGuideQuestRewardResp(), input).checkInitialized(); + } + + public static TourGuideQuestRewardResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TourGuideQuestRewardResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TourGuideQuestRewardResp messages + */ + public static MessageFactory<TourGuideQuestRewardResp> getFactory() { + return TourGuideQuestRewardRespFactory.INSTANCE; + } + + private enum TourGuideQuestRewardRespFactory implements MessageFactory<TourGuideQuestRewardResp> { + INSTANCE; + + @Override + public TourGuideQuestRewardResp create() { + return TourGuideQuestRewardResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/QuestTowerGuideGroupRewardReceive.java b/src/generated/main/emu/nebula/proto/QuestTowerGuideGroupRewardReceive.java new file mode 100644 index 0000000..d2d88af --- /dev/null +++ b/src/generated/main/emu/nebula/proto/QuestTowerGuideGroupRewardReceive.java @@ -0,0 +1,520 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class QuestTowerGuideGroupRewardReceive { + /** + * Protobuf type {@code TourGuideQuestGroupRewardResp} + */ + public static final class TourGuideQuestGroupRewardResp extends ProtoMessage<TourGuideQuestGroupRewardResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 15;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + */ + private final RepeatedMessage<Public.ItemTpl> rewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private TourGuideQuestGroupRewardResp() { + } + + /** + * @return a new empty instance of {@code TourGuideQuestGroupRewardResp} + */ + public static TourGuideQuestGroupRewardResp newInstance() { + return new TourGuideQuestGroupRewardResp(); + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @return this + */ + public TourGuideQuestGroupRewardResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @param value the change to set + * @return this + */ + public TourGuideQuestGroupRewardResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TourGuideQuestGroupRewardResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TourGuideQuestGroupRewardResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TourGuideQuestGroupRewardResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TourGuideQuestGroupRewardResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @return this + */ + public TourGuideQuestGroupRewardResp clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getRewards() { + return rewards; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @param value the rewards to add + * @return this + */ + public TourGuideQuestGroupRewardResp addRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Rewards = 1;</code> + * @param values the rewards to add + * @return this + */ + public TourGuideQuestGroupRewardResp addAllRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public TourGuideQuestGroupRewardResp copyFrom(final TourGuideQuestGroupRewardResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public TourGuideQuestGroupRewardResp mergeFrom(final TourGuideQuestGroupRewardResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public TourGuideQuestGroupRewardResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public TourGuideQuestGroupRewardResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TourGuideQuestGroupRewardResp)) { + return false; + } + TourGuideQuestGroupRewardResp other = (TourGuideQuestGroupRewardResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TourGuideQuestGroupRewardResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 122: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public TourGuideQuestGroupRewardResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TourGuideQuestGroupRewardResp clone() { + return new TourGuideQuestGroupRewardResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TourGuideQuestGroupRewardResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TourGuideQuestGroupRewardResp(), data).checkInitialized(); + } + + public static TourGuideQuestGroupRewardResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TourGuideQuestGroupRewardResp(), input).checkInitialized(); + } + + public static TourGuideQuestGroupRewardResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TourGuideQuestGroupRewardResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TourGuideQuestGroupRewardResp messages + */ + public static MessageFactory<TourGuideQuestGroupRewardResp> getFactory() { + return TourGuideQuestGroupRewardRespFactory.INSTANCE; + } + + private enum TourGuideQuestGroupRewardRespFactory implements MessageFactory<TourGuideQuestGroupRewardResp> { + INSTANCE; + + @Override + public TourGuideQuestGroupRewardResp create() { + return TourGuideQuestGroupRewardResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/QuestTowerRewardRecevie.java b/src/generated/main/emu/nebula/proto/QuestTowerRewardRecevie.java new file mode 100644 index 0000000..89359f8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/QuestTowerRewardRecevie.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class QuestTowerRewardRecevie { +} diff --git a/src/generated/main/emu/nebula/proto/RedeemCode.java b/src/generated/main/emu/nebula/proto/RedeemCode.java new file mode 100644 index 0000000..9b0a0ae --- /dev/null +++ b/src/generated/main/emu/nebula/proto/RedeemCode.java @@ -0,0 +1,518 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class RedeemCode { + /** + * Protobuf type {@code RedeemCodeResp} + */ + public static final class RedeemCodeResp extends ProtoMessage<RedeemCodeResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl Items = 1;</code> + */ + private final RepeatedMessage<Public.ItemTpl> items = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private RedeemCodeResp() { + } + + /** + * @return a new empty instance of {@code RedeemCodeResp} + */ + public static RedeemCodeResp newInstance() { + return new RedeemCodeResp(); + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public RedeemCodeResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public RedeemCodeResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RedeemCodeResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RedeemCodeResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RedeemCodeResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RedeemCodeResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @return whether the items field is set + */ + public boolean hasItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @return this + */ + public RedeemCodeResp clearItems() { + bitField0_ &= ~0x00000004; + items.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getItems() { + return items; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableItems() { + bitField0_ |= 0x00000004; + return items; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @param value the items to add + * @return this + */ + public RedeemCodeResp addItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + items.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl Items = 1;</code> + * @param values the items to add + * @return this + */ + public RedeemCodeResp addAllItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + items.addAll(values); + return this; + } + + @Override + public RedeemCodeResp copyFrom(final RedeemCodeResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + items.copyFrom(other.items); + } + return this; + } + + @Override + public RedeemCodeResp mergeFrom(final RedeemCodeResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasItems()) { + getMutableItems().addAll(other.items); + } + return this; + } + + @Override + public RedeemCodeResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + items.clear(); + return this; + } + + @Override + public RedeemCodeResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + items.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RedeemCodeResp)) { + return false; + } + RedeemCodeResp other = (RedeemCodeResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasItems() || items.equals(other.items)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < items.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(items.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * items.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(items); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RedeemCodeResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // items + tag = input.readRepeatedMessage(items, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.items, items); + } + output.endObject(); + } + + @Override + public RedeemCodeResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70973344: { + if (input.isAtField(FieldNames.items)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(items); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RedeemCodeResp clone() { + return new RedeemCodeResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RedeemCodeResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RedeemCodeResp(), data).checkInitialized(); + } + + public static RedeemCodeResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RedeemCodeResp(), input).checkInitialized(); + } + + public static RedeemCodeResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RedeemCodeResp(), input).checkInitialized(); + } + + /** + * @return factory for creating RedeemCodeResp messages + */ + public static MessageFactory<RedeemCodeResp> getFactory() { + return RedeemCodeRespFactory.INSTANCE; + } + + private enum RedeemCodeRespFactory implements MessageFactory<RedeemCodeResp> { + INSTANCE; + + @Override + public RedeemCodeResp create() { + return RedeemCodeResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName items = FieldName.forField("Items"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/RegionBossLevelApply.java b/src/generated/main/emu/nebula/proto/RegionBossLevelApply.java new file mode 100644 index 0000000..f79cbd7 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/RegionBossLevelApply.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class RegionBossLevelApply { + /** + * Protobuf type {@code RegionBossLevelApplyReq} + */ + public static final class RegionBossLevelApplyReq extends ProtoMessage<RegionBossLevelApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 2;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private RegionBossLevelApplyReq() { + } + + /** + * @return a new empty instance of {@code RegionBossLevelApplyReq} + */ + public static RegionBossLevelApplyReq newInstance() { + return new RegionBossLevelApplyReq(); + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return this + */ + public RegionBossLevelApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @param value the buildId to set + * @return this + */ + public RegionBossLevelApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public RegionBossLevelApplyReq clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public RegionBossLevelApplyReq setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RegionBossLevelApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RegionBossLevelApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RegionBossLevelApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RegionBossLevelApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public RegionBossLevelApplyReq copyFrom(final RegionBossLevelApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevelApplyReq mergeFrom(final RegionBossLevelApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevelApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public RegionBossLevelApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RegionBossLevelApplyReq)) { + return false; + } + RegionBossLevelApplyReq other = (RegionBossLevelApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RegionBossLevelApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public RegionBossLevelApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RegionBossLevelApplyReq clone() { + return new RegionBossLevelApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RegionBossLevelApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RegionBossLevelApplyReq(), data).checkInitialized(); + } + + public static RegionBossLevelApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelApplyReq(), input).checkInitialized(); + } + + public static RegionBossLevelApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating RegionBossLevelApplyReq messages + */ + public static MessageFactory<RegionBossLevelApplyReq> getFactory() { + return RegionBossLevelApplyReqFactory.INSTANCE; + } + + private enum RegionBossLevelApplyReqFactory implements MessageFactory<RegionBossLevelApplyReq> { + INSTANCE; + + @Override + public RegionBossLevelApplyReq create() { + return RegionBossLevelApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/RegionBossLevelSettle.java b/src/generated/main/emu/nebula/proto/RegionBossLevelSettle.java new file mode 100644 index 0000000..5edb37e --- /dev/null +++ b/src/generated/main/emu/nebula/proto/RegionBossLevelSettle.java @@ -0,0 +1,1566 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class RegionBossLevelSettle { + /** + * Protobuf type {@code RegionBossLevelSettleReq} + */ + public static final class RegionBossLevelSettleReq extends ProtoMessage<RegionBossLevelSettleReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Star = 1;</code> + */ + private int star; + + /** + * <code>optional .Events Events = 15;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private RegionBossLevelSettleReq() { + } + + /** + * @return a new empty instance of {@code RegionBossLevelSettleReq} + */ + public static RegionBossLevelSettleReq newInstance() { + return new RegionBossLevelSettleReq(); + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return this + */ + public RegionBossLevelSettleReq clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @param value the star to set + * @return this + */ + public RegionBossLevelSettleReq setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return this + */ + public RegionBossLevelSettleReq clearEvents() { + bitField0_ &= ~0x00000002; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000002; + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * @param value the events to set + * @return this + */ + public RegionBossLevelSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000002; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RegionBossLevelSettleReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RegionBossLevelSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RegionBossLevelSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RegionBossLevelSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public RegionBossLevelSettleReq copyFrom(final RegionBossLevelSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevelSettleReq mergeFrom(final RegionBossLevelSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevelSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public RegionBossLevelSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RegionBossLevelSettleReq)) { + return false; + } + RegionBossLevelSettleReq other = (RegionBossLevelSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RegionBossLevelSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public RegionBossLevelSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RegionBossLevelSettleReq clone() { + return new RegionBossLevelSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RegionBossLevelSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RegionBossLevelSettleReq(), data).checkInitialized(); + } + + public static RegionBossLevelSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSettleReq(), input).checkInitialized(); + } + + public static RegionBossLevelSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating RegionBossLevelSettleReq messages + */ + public static MessageFactory<RegionBossLevelSettleReq> getFactory() { + return RegionBossLevelSettleReqFactory.INSTANCE; + } + + private enum RegionBossLevelSettleReqFactory implements MessageFactory<RegionBossLevelSettleReq> { + INSTANCE; + + @Override + public RegionBossLevelSettleReq create() { + return RegionBossLevelSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code RegionBossLevelSettleResp} + */ + public static final class RegionBossLevelSettleResp extends ProtoMessage<RegionBossLevelSettleResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Exp = 7;</code> + */ + private int exp; + + /** + * <code>optional bool First = 1;</code> + */ + private boolean first; + + /** + * <code>optional bool ThreeStar = 2;</code> + */ + private boolean threeStar; + + /** + * <code>optional .ChangeInfo Change = 3;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + */ + private final RepeatedMessage<Public.ItemTpl> awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + */ + private final RepeatedMessage<Public.ItemTpl> firstItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + */ + private final RepeatedMessage<Public.ItemTpl> threeStarItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + */ + private final RepeatedMessage<Public.ItemTpl> surpriseItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private RegionBossLevelSettleResp() { + } + + /** + * @return a new empty instance of {@code RegionBossLevelSettleResp} + */ + public static RegionBossLevelSettleResp newInstance() { + return new RegionBossLevelSettleResp(); + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @return this + */ + public RegionBossLevelSettleResp clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @param value the exp to set + * @return this + */ + public RegionBossLevelSettleResp setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * <code>optional bool First = 1;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool First = 1;</code> + * @return this + */ + public RegionBossLevelSettleResp clearFirst() { + bitField0_ &= ~0x00000002; + first = false; + return this; + } + + /** + * <code>optional bool First = 1;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 1;</code> + * @param value the first to set + * @return this + */ + public RegionBossLevelSettleResp setFirst(final boolean value) { + bitField0_ |= 0x00000002; + first = value; + return this; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @return whether the threeStar field is set + */ + public boolean hasThreeStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @return this + */ + public RegionBossLevelSettleResp clearThreeStar() { + bitField0_ &= ~0x00000004; + threeStar = false; + return this; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @return the threeStar + */ + public boolean getThreeStar() { + return threeStar; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @param value the threeStar to set + * @return this + */ + public RegionBossLevelSettleResp setThreeStar(final boolean value) { + bitField0_ |= 0x00000004; + threeStar = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @return this + */ + public RegionBossLevelSettleResp clearChange() { + bitField0_ &= ~0x00000008; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000008; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @param value the change to set + * @return this + */ + public RegionBossLevelSettleResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000008; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RegionBossLevelSettleResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RegionBossLevelSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RegionBossLevelSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RegionBossLevelSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @return this + */ + public RegionBossLevelSettleResp clearAwardItems() { + bitField0_ &= ~0x00000020; + awardItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getAwardItems() { + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableAwardItems() { + bitField0_ |= 0x00000020; + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @param value the awardItems to add + * @return this + */ + public RegionBossLevelSettleResp addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000020; + awardItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @param values the awardItems to add + * @return this + */ + public RegionBossLevelSettleResp addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000020; + awardItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @return whether the firstItems field is set + */ + public boolean hasFirstItems() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @return this + */ + public RegionBossLevelSettleResp clearFirstItems() { + bitField0_ &= ~0x00000040; + firstItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFirstItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getFirstItems() { + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableFirstItems() { + bitField0_ |= 0x00000040; + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @param value the firstItems to add + * @return this + */ + public RegionBossLevelSettleResp addFirstItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000040; + firstItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @param values the firstItems to add + * @return this + */ + public RegionBossLevelSettleResp addAllFirstItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000040; + firstItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @return whether the threeStarItems field is set + */ + public boolean hasThreeStarItems() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @return this + */ + public RegionBossLevelSettleResp clearThreeStarItems() { + bitField0_ &= ~0x00000080; + threeStarItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableThreeStarItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getThreeStarItems() { + return threeStarItems; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableThreeStarItems() { + bitField0_ |= 0x00000080; + return threeStarItems; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @param value the threeStarItems to add + * @return this + */ + public RegionBossLevelSettleResp addThreeStarItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000080; + threeStarItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @param values the threeStarItems to add + * @return this + */ + public RegionBossLevelSettleResp addAllThreeStarItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000080; + threeStarItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @return whether the surpriseItems field is set + */ + public boolean hasSurpriseItems() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @return this + */ + public RegionBossLevelSettleResp clearSurpriseItems() { + bitField0_ &= ~0x00000100; + surpriseItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSurpriseItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getSurpriseItems() { + return surpriseItems; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableSurpriseItems() { + bitField0_ |= 0x00000100; + return surpriseItems; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @param value the surpriseItems to add + * @return this + */ + public RegionBossLevelSettleResp addSurpriseItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000100; + surpriseItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @param values the surpriseItems to add + * @return this + */ + public RegionBossLevelSettleResp addAllSurpriseItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000100; + surpriseItems.addAll(values); + return this; + } + + @Override + public RegionBossLevelSettleResp copyFrom(final RegionBossLevelSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + first = other.first; + threeStar = other.threeStar; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + firstItems.copyFrom(other.firstItems); + threeStarItems.copyFrom(other.threeStarItems); + surpriseItems.copyFrom(other.surpriseItems); + } + return this; + } + + @Override + public RegionBossLevelSettleResp mergeFrom(final RegionBossLevelSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasThreeStar()) { + setThreeStar(other.threeStar); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + if (other.hasFirstItems()) { + getMutableFirstItems().addAll(other.firstItems); + } + if (other.hasThreeStarItems()) { + getMutableThreeStarItems().addAll(other.threeStarItems); + } + if (other.hasSurpriseItems()) { + getMutableSurpriseItems().addAll(other.surpriseItems); + } + return this; + } + + @Override + public RegionBossLevelSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + first = false; + threeStar = false; + change.clear(); + nextPackage.clear(); + awardItems.clear(); + firstItems.clear(); + threeStarItems.clear(); + surpriseItems.clear(); + return this; + } + + @Override + public RegionBossLevelSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + awardItems.clearQuick(); + firstItems.clearQuick(); + threeStarItems.clearQuick(); + surpriseItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RegionBossLevelSettleResp)) { + return false; + } + RegionBossLevelSettleResp other = (RegionBossLevelSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasFirst() || first == other.first) + && (!hasThreeStar() || threeStar == other.threeStar) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)) + && (!hasFirstItems() || firstItems.equals(other.firstItems)) + && (!hasThreeStarItems() || threeStarItems.equals(other.threeStarItems)) + && (!hasSurpriseItems() || surpriseItems.equals(other.surpriseItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(threeStar); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(awardItems.get(i)); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < firstItems.length(); i++) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(firstItems.get(i)); + } + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < threeStarItems.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(threeStarItems.get(i)); + } + } + if ((bitField0_ & 0x00000100) != 0) { + for (int i = 0; i < surpriseItems.length(); i++) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(surpriseItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * firstItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(firstItems); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * threeStarItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(threeStarItems); + } + if ((bitField0_ & 0x00000100) != 0) { + size += (1 * surpriseItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(surpriseItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RegionBossLevelSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 56: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // first + first = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // threeStar + threeStar = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000020; + if (tag != 42) { + break; + } + } + case 42: { + // firstItems + tag = input.readRepeatedMessage(firstItems, tag); + bitField0_ |= 0x00000040; + if (tag != 50) { + break; + } + } + case 50: { + // threeStarItems + tag = input.readRepeatedMessage(threeStarItems, tag); + bitField0_ |= 0x00000080; + if (tag != 66) { + break; + } + } + case 66: { + // surpriseItems + tag = input.readRepeatedMessage(surpriseItems, tag); + bitField0_ |= 0x00000100; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.threeStar, threeStar); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.firstItems, firstItems); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedMessage(FieldNames.threeStarItems, threeStarItems); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.surpriseItems, surpriseItems); + } + output.endObject(); + } + + @Override + public RegionBossLevelSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 444940528: { + if (input.isAtField(FieldNames.threeStar)) { + if (!input.trySkipNullValue()) { + threeStar = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1812344592: { + if (input.isAtField(FieldNames.firstItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(firstItems); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2071409488: { + if (input.isAtField(FieldNames.threeStarItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(threeStarItems); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 477801015: { + if (input.isAtField(FieldNames.surpriseItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(surpriseItems); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RegionBossLevelSettleResp clone() { + return new RegionBossLevelSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RegionBossLevelSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RegionBossLevelSettleResp(), data).checkInitialized(); + } + + public static RegionBossLevelSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSettleResp(), input).checkInitialized(); + } + + public static RegionBossLevelSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating RegionBossLevelSettleResp messages + */ + public static MessageFactory<RegionBossLevelSettleResp> getFactory() { + return RegionBossLevelSettleRespFactory.INSTANCE; + } + + private enum RegionBossLevelSettleRespFactory implements MessageFactory<RegionBossLevelSettleResp> { + INSTANCE; + + @Override + public RegionBossLevelSettleResp create() { + return RegionBossLevelSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName threeStar = FieldName.forField("ThreeStar"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + + static final FieldName firstItems = FieldName.forField("FirstItems"); + + static final FieldName threeStarItems = FieldName.forField("ThreeStarItems"); + + static final FieldName surpriseItems = FieldName.forField("SurpriseItems"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/RegionBossLevelSweep.java b/src/generated/main/emu/nebula/proto/RegionBossLevelSweep.java new file mode 100644 index 0000000..58bc4d9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/RegionBossLevelSweep.java @@ -0,0 +1,1549 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class RegionBossLevelSweep { + /** + * Protobuf type {@code RegionBossLevelSweepReq} + */ + public static final class RegionBossLevelSweepReq extends ProtoMessage<RegionBossLevelSweepReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Times = 2;</code> + */ + private int times; + + /** + * <code>optional .Events Events = 15;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private RegionBossLevelSweepReq() { + } + + /** + * @return a new empty instance of {@code RegionBossLevelSweepReq} + */ + public static RegionBossLevelSweepReq newInstance() { + return new RegionBossLevelSweepReq(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public RegionBossLevelSweepReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public RegionBossLevelSweepReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return this + */ + public RegionBossLevelSweepReq clearTimes() { + bitField0_ &= ~0x00000002; + times = 0; + return this; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @param value the times to set + * @return this + */ + public RegionBossLevelSweepReq setTimes(final int value) { + bitField0_ |= 0x00000002; + times = value; + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return this + */ + public RegionBossLevelSweepReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * @param value the events to set + * @return this + */ + public RegionBossLevelSweepReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RegionBossLevelSweepReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RegionBossLevelSweepReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RegionBossLevelSweepReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RegionBossLevelSweepReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public RegionBossLevelSweepReq copyFrom(final RegionBossLevelSweepReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + times = other.times; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevelSweepReq mergeFrom(final RegionBossLevelSweepReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public RegionBossLevelSweepReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + times = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public RegionBossLevelSweepReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RegionBossLevelSweepReq)) { + return false; + } + RegionBossLevelSweepReq other = (RegionBossLevelSweepReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTimes() || times == other.times) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RegionBossLevelSweepReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public RegionBossLevelSweepReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RegionBossLevelSweepReq clone() { + return new RegionBossLevelSweepReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RegionBossLevelSweepReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepReq(), data).checkInitialized(); + } + + public static RegionBossLevelSweepReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepReq(), input).checkInitialized(); + } + + public static RegionBossLevelSweepReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepReq(), input).checkInitialized(); + } + + /** + * @return factory for creating RegionBossLevelSweepReq messages + */ + public static MessageFactory<RegionBossLevelSweepReq> getFactory() { + return RegionBossLevelSweepReqFactory.INSTANCE; + } + + private enum RegionBossLevelSweepReqFactory implements MessageFactory<RegionBossLevelSweepReq> { + INSTANCE; + + @Override + public RegionBossLevelSweepReq create() { + return RegionBossLevelSweepReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName times = FieldName.forField("Times"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code RegionBossLevelSweepResp} + */ + public static final class RegionBossLevelSweepResp extends ProtoMessage<RegionBossLevelSweepResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .RegionBossLevelSweepRewards Rewards = 2;</code> + */ + private final RepeatedMessage<RegionBossLevelSweepRewards> rewards = RepeatedMessage.newEmptyInstance(RegionBossLevelSweepRewards.getFactory()); + + private RegionBossLevelSweepResp() { + } + + /** + * @return a new empty instance of {@code RegionBossLevelSweepResp} + */ + public static RegionBossLevelSweepResp newInstance() { + return new RegionBossLevelSweepResp(); + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public RegionBossLevelSweepResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public RegionBossLevelSweepResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RegionBossLevelSweepResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RegionBossLevelSweepResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RegionBossLevelSweepResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RegionBossLevelSweepResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .RegionBossLevelSweepRewards Rewards = 2;</code> + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .RegionBossLevelSweepRewards Rewards = 2;</code> + * @return this + */ + public RegionBossLevelSweepResp clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * <code>repeated .RegionBossLevelSweepRewards Rewards = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<RegionBossLevelSweepRewards> getRewards() { + return rewards; + } + + /** + * <code>repeated .RegionBossLevelSweepRewards Rewards = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<RegionBossLevelSweepRewards> getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * <code>repeated .RegionBossLevelSweepRewards Rewards = 2;</code> + * @param value the rewards to add + * @return this + */ + public RegionBossLevelSweepResp addRewards(final RegionBossLevelSweepRewards value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * <code>repeated .RegionBossLevelSweepRewards Rewards = 2;</code> + * @param values the rewards to add + * @return this + */ + public RegionBossLevelSweepResp addAllRewards(final RegionBossLevelSweepRewards... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public RegionBossLevelSweepResp copyFrom(final RegionBossLevelSweepResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public RegionBossLevelSweepResp mergeFrom(final RegionBossLevelSweepResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public RegionBossLevelSweepResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public RegionBossLevelSweepResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RegionBossLevelSweepResp)) { + return false; + } + RegionBossLevelSweepResp other = (RegionBossLevelSweepResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RegionBossLevelSweepResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public RegionBossLevelSweepResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RegionBossLevelSweepResp clone() { + return new RegionBossLevelSweepResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RegionBossLevelSweepResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepResp(), data).checkInitialized(); + } + + public static RegionBossLevelSweepResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepResp(), input).checkInitialized(); + } + + public static RegionBossLevelSweepResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepResp(), input).checkInitialized(); + } + + /** + * @return factory for creating RegionBossLevelSweepResp messages + */ + public static MessageFactory<RegionBossLevelSweepResp> getFactory() { + return RegionBossLevelSweepRespFactory.INSTANCE; + } + + private enum RegionBossLevelSweepRespFactory implements MessageFactory<RegionBossLevelSweepResp> { + INSTANCE; + + @Override + public RegionBossLevelSweepResp create() { + return RegionBossLevelSweepResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } + + /** + * Protobuf type {@code RegionBossLevelSweepRewards} + */ + public static final class RegionBossLevelSweepRewards extends ProtoMessage<RegionBossLevelSweepRewards> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Exp = 2;</code> + */ + private int exp; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + */ + private final RepeatedMessage<Public.ItemTpl> awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private RegionBossLevelSweepRewards() { + } + + /** + * @return a new empty instance of {@code RegionBossLevelSweepRewards} + */ + public static RegionBossLevelSweepRewards newInstance() { + return new RegionBossLevelSweepRewards(); + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return this + */ + public RegionBossLevelSweepRewards clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @param value the exp to set + * @return this + */ + public RegionBossLevelSweepRewards setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RegionBossLevelSweepRewards clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RegionBossLevelSweepRewards addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RegionBossLevelSweepRewards addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RegionBossLevelSweepRewards setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @return this + */ + public RegionBossLevelSweepRewards clearAwardItems() { + bitField0_ &= ~0x00000004; + awardItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getAwardItems() { + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableAwardItems() { + bitField0_ |= 0x00000004; + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @param value the awardItems to add + * @return this + */ + public RegionBossLevelSweepRewards addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + awardItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @param values the awardItems to add + * @return this + */ + public RegionBossLevelSweepRewards addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + awardItems.addAll(values); + return this; + } + + @Override + public RegionBossLevelSweepRewards copyFrom(final RegionBossLevelSweepRewards other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + } + return this; + } + + @Override + public RegionBossLevelSweepRewards mergeFrom(final RegionBossLevelSweepRewards other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + return this; + } + + @Override + public RegionBossLevelSweepRewards clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + nextPackage.clear(); + awardItems.clear(); + return this; + } + + @Override + public RegionBossLevelSweepRewards clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + awardItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RegionBossLevelSweepRewards)) { + return false; + } + RegionBossLevelSweepRewards other = (RegionBossLevelSweepRewards) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(awardItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RegionBossLevelSweepRewards mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + output.endObject(); + } + + @Override + public RegionBossLevelSweepRewards mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RegionBossLevelSweepRewards clone() { + return new RegionBossLevelSweepRewards().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RegionBossLevelSweepRewards parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepRewards(), data).checkInitialized(); + } + + public static RegionBossLevelSweepRewards parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepRewards(), input).checkInitialized(); + } + + public static RegionBossLevelSweepRewards parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RegionBossLevelSweepRewards(), input).checkInitialized(); + } + + /** + * @return factory for creating RegionBossLevelSweepRewards messages + */ + public static MessageFactory<RegionBossLevelSweepRewards> getFactory() { + return RegionBossLevelSweepRewardsFactory.INSTANCE; + } + + private enum RegionBossLevelSweepRewardsFactory implements MessageFactory<RegionBossLevelSweepRewards> { + INSTANCE; + + @Override + public RegionBossLevelSweepRewards create() { + return RegionBossLevelSweepRewards.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ResidentShopGet.java b/src/generated/main/emu/nebula/proto/ResidentShopGet.java new file mode 100644 index 0000000..f705b62 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ResidentShopGet.java @@ -0,0 +1,826 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ResidentShopGet { + /** + * Protobuf type {@code ResidentShopGetReq} + */ + public static final class ResidentShopGetReq extends ProtoMessage<ResidentShopGetReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ShopIds = 1;</code> + */ + private final RepeatedInt shopIds = RepeatedInt.newEmptyInstance(); + + private ResidentShopGetReq() { + } + + /** + * @return a new empty instance of {@code ResidentShopGetReq} + */ + public static ResidentShopGetReq newInstance() { + return new ResidentShopGetReq(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ResidentShopGetReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ResidentShopGetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ResidentShopGetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ResidentShopGetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ShopIds = 1;</code> + * @return whether the shopIds field is set + */ + public boolean hasShopIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 ShopIds = 1;</code> + * @return this + */ + public ResidentShopGetReq clearShopIds() { + bitField0_ &= ~0x00000002; + shopIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ShopIds = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShopIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getShopIds() { + return shopIds; + } + + /** + * <code>repeated uint32 ShopIds = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableShopIds() { + bitField0_ |= 0x00000002; + return shopIds; + } + + /** + * <code>repeated uint32 ShopIds = 1;</code> + * @param value the shopIds to add + * @return this + */ + public ResidentShopGetReq addShopIds(final int value) { + bitField0_ |= 0x00000002; + shopIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ShopIds = 1;</code> + * @param values the shopIds to add + * @return this + */ + public ResidentShopGetReq addAllShopIds(final int... values) { + bitField0_ |= 0x00000002; + shopIds.addAll(values); + return this; + } + + @Override + public ResidentShopGetReq copyFrom(final ResidentShopGetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + shopIds.copyFrom(other.shopIds); + } + return this; + } + + @Override + public ResidentShopGetReq mergeFrom(final ResidentShopGetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShopIds()) { + getMutableShopIds().addAll(other.shopIds); + } + return this; + } + + @Override + public ResidentShopGetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + shopIds.clear(); + return this; + } + + @Override + public ResidentShopGetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + shopIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ResidentShopGetReq)) { + return false; + } + ResidentShopGetReq other = (ResidentShopGetReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShopIds() || shopIds.equals(other.shopIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < shopIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(shopIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * shopIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(shopIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ResidentShopGetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // shopIds [packed=true] + input.readPackedUInt32(shopIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // shopIds [packed=false] + tag = input.readRepeatedUInt32(shopIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.shopIds, shopIds); + } + output.endObject(); + } + + @Override + public ResidentShopGetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -563253310: { + if (input.isAtField(FieldNames.shopIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(shopIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ResidentShopGetReq clone() { + return new ResidentShopGetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ResidentShopGetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ResidentShopGetReq(), data).checkInitialized(); + } + + public static ResidentShopGetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopGetReq(), input).checkInitialized(); + } + + public static ResidentShopGetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopGetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ResidentShopGetReq messages + */ + public static MessageFactory<ResidentShopGetReq> getFactory() { + return ResidentShopGetReqFactory.INSTANCE; + } + + private enum ResidentShopGetReqFactory implements MessageFactory<ResidentShopGetReq> { + INSTANCE; + + @Override + public ResidentShopGetReq create() { + return ResidentShopGetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName shopIds = FieldName.forField("ShopIds"); + } + } + + /** + * Protobuf type {@code ResidentShopGetResp} + */ + public static final class ResidentShopGetResp extends ProtoMessage<ResidentShopGetResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + */ + private final RepeatedMessage<Public.ResidentShop> shops = RepeatedMessage.newEmptyInstance(Public.ResidentShop.getFactory()); + + private ResidentShopGetResp() { + } + + /** + * @return a new empty instance of {@code ResidentShopGetResp} + */ + public static ResidentShopGetResp newInstance() { + return new ResidentShopGetResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ResidentShopGetResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ResidentShopGetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ResidentShopGetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ResidentShopGetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @return whether the shops field is set + */ + public boolean hasShops() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @return this + */ + public ResidentShopGetResp clearShops() { + bitField0_ &= ~0x00000002; + shops.clear(); + return this; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShops()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ResidentShop> getShops() { + return shops; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ResidentShop> getMutableShops() { + bitField0_ |= 0x00000002; + return shops; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @param value the shops to add + * @return this + */ + public ResidentShopGetResp addShops(final Public.ResidentShop value) { + bitField0_ |= 0x00000002; + shops.add(value); + return this; + } + + /** + * <code>repeated .ResidentShop Shops = 1;</code> + * @param values the shops to add + * @return this + */ + public ResidentShopGetResp addAllShops(final Public.ResidentShop... values) { + bitField0_ |= 0x00000002; + shops.addAll(values); + return this; + } + + @Override + public ResidentShopGetResp copyFrom(final ResidentShopGetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + shops.copyFrom(other.shops); + } + return this; + } + + @Override + public ResidentShopGetResp mergeFrom(final ResidentShopGetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasShops()) { + getMutableShops().addAll(other.shops); + } + return this; + } + + @Override + public ResidentShopGetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + shops.clear(); + return this; + } + + @Override + public ResidentShopGetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + shops.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ResidentShopGetResp)) { + return false; + } + ResidentShopGetResp other = (ResidentShopGetResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasShops() || shops.equals(other.shops)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < shops.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(shops.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * shops.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(shops); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ResidentShopGetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // shops + tag = input.readRepeatedMessage(shops, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.shops, shops); + } + output.endObject(); + } + + @Override + public ResidentShopGetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79860765: { + if (input.isAtField(FieldNames.shops)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(shops); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ResidentShopGetResp clone() { + return new ResidentShopGetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ResidentShopGetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ResidentShopGetResp(), data).checkInitialized(); + } + + public static ResidentShopGetResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopGetResp(), input).checkInitialized(); + } + + public static ResidentShopGetResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopGetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ResidentShopGetResp messages + */ + public static MessageFactory<ResidentShopGetResp> getFactory() { + return ResidentShopGetRespFactory.INSTANCE; + } + + private enum ResidentShopGetRespFactory implements MessageFactory<ResidentShopGetResp> { + INSTANCE; + + @Override + public ResidentShopGetResp create() { + return ResidentShopGetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName shops = FieldName.forField("Shops"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ResidentShopPurchase.java b/src/generated/main/emu/nebula/proto/ResidentShopPurchase.java new file mode 100644 index 0000000..d1f7447 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ResidentShopPurchase.java @@ -0,0 +1,1273 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ResidentShopPurchase { + /** + * Protobuf type {@code ResidentShopPurchaseReq} + */ + public static final class ResidentShopPurchaseReq extends ProtoMessage<ResidentShopPurchaseReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 RefreshTime = 2;</code> + */ + private long refreshTime; + + /** + * <code>optional uint32 ShopId = 1;</code> + */ + private int shopId; + + /** + * <code>optional uint32 GoodsId = 3;</code> + */ + private int goodsId; + + /** + * <code>optional uint32 Number = 4;</code> + */ + private int number; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ResidentShopPurchaseReq() { + } + + /** + * @return a new empty instance of {@code ResidentShopPurchaseReq} + */ + public static ResidentShopPurchaseReq newInstance() { + return new ResidentShopPurchaseReq(); + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @return whether the refreshTime field is set + */ + public boolean hasRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @return this + */ + public ResidentShopPurchaseReq clearRefreshTime() { + bitField0_ &= ~0x00000001; + refreshTime = 0L; + return this; + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @return the refreshTime + */ + public long getRefreshTime() { + return refreshTime; + } + + /** + * <code>optional int64 RefreshTime = 2;</code> + * @param value the refreshTime to set + * @return this + */ + public ResidentShopPurchaseReq setRefreshTime(final long value) { + bitField0_ |= 0x00000001; + refreshTime = value; + return this; + } + + /** + * <code>optional uint32 ShopId = 1;</code> + * @return whether the shopId field is set + */ + public boolean hasShopId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 ShopId = 1;</code> + * @return this + */ + public ResidentShopPurchaseReq clearShopId() { + bitField0_ &= ~0x00000002; + shopId = 0; + return this; + } + + /** + * <code>optional uint32 ShopId = 1;</code> + * @return the shopId + */ + public int getShopId() { + return shopId; + } + + /** + * <code>optional uint32 ShopId = 1;</code> + * @param value the shopId to set + * @return this + */ + public ResidentShopPurchaseReq setShopId(final int value) { + bitField0_ |= 0x00000002; + shopId = value; + return this; + } + + /** + * <code>optional uint32 GoodsId = 3;</code> + * @return whether the goodsId field is set + */ + public boolean hasGoodsId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 GoodsId = 3;</code> + * @return this + */ + public ResidentShopPurchaseReq clearGoodsId() { + bitField0_ &= ~0x00000004; + goodsId = 0; + return this; + } + + /** + * <code>optional uint32 GoodsId = 3;</code> + * @return the goodsId + */ + public int getGoodsId() { + return goodsId; + } + + /** + * <code>optional uint32 GoodsId = 3;</code> + * @param value the goodsId to set + * @return this + */ + public ResidentShopPurchaseReq setGoodsId(final int value) { + bitField0_ |= 0x00000004; + goodsId = value; + return this; + } + + /** + * <code>optional uint32 Number = 4;</code> + * @return whether the number field is set + */ + public boolean hasNumber() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Number = 4;</code> + * @return this + */ + public ResidentShopPurchaseReq clearNumber() { + bitField0_ &= ~0x00000008; + number = 0; + return this; + } + + /** + * <code>optional uint32 Number = 4;</code> + * @return the number + */ + public int getNumber() { + return number; + } + + /** + * <code>optional uint32 Number = 4;</code> + * @param value the number to set + * @return this + */ + public ResidentShopPurchaseReq setNumber(final int value) { + bitField0_ |= 0x00000008; + number = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ResidentShopPurchaseReq clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ResidentShopPurchaseReq addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ResidentShopPurchaseReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ResidentShopPurchaseReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ResidentShopPurchaseReq copyFrom(final ResidentShopPurchaseReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + refreshTime = other.refreshTime; + shopId = other.shopId; + goodsId = other.goodsId; + number = other.number; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ResidentShopPurchaseReq mergeFrom(final ResidentShopPurchaseReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRefreshTime()) { + setRefreshTime(other.refreshTime); + } + if (other.hasShopId()) { + setShopId(other.shopId); + } + if (other.hasGoodsId()) { + setGoodsId(other.goodsId); + } + if (other.hasNumber()) { + setNumber(other.number); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ResidentShopPurchaseReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + refreshTime = 0L; + shopId = 0; + goodsId = 0; + number = 0; + nextPackage.clear(); + return this; + } + + @Override + public ResidentShopPurchaseReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ResidentShopPurchaseReq)) { + return false; + } + ResidentShopPurchaseReq other = (ResidentShopPurchaseReq) o; + return bitField0_ == other.bitField0_ + && (!hasRefreshTime() || refreshTime == other.refreshTime) + && (!hasShopId() || shopId == other.shopId) + && (!hasGoodsId() || goodsId == other.goodsId) + && (!hasNumber() || number == other.number) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeInt64NoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(shopId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(goodsId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(number); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(shopId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(goodsId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(number); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ResidentShopPurchaseReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // refreshTime + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // shopId + shopId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // goodsId + goodsId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // number + number = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.refreshTime, refreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.shopId, shopId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.goodsId, goodsId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.number, number); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ResidentShopPurchaseReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 280566824: { + if (input.isAtField(FieldNames.refreshTime)) { + if (!input.trySkipNullValue()) { + refreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1819284783: { + if (input.isAtField(FieldNames.shopId)) { + if (!input.trySkipNullValue()) { + shopId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1871690481: { + if (input.isAtField(FieldNames.goodsId)) { + if (!input.trySkipNullValue()) { + goodsId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1950496919: { + if (input.isAtField(FieldNames.number)) { + if (!input.trySkipNullValue()) { + number = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ResidentShopPurchaseReq clone() { + return new ResidentShopPurchaseReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ResidentShopPurchaseReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ResidentShopPurchaseReq(), data).checkInitialized(); + } + + public static ResidentShopPurchaseReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopPurchaseReq(), input).checkInitialized(); + } + + public static ResidentShopPurchaseReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopPurchaseReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ResidentShopPurchaseReq messages + */ + public static MessageFactory<ResidentShopPurchaseReq> getFactory() { + return ResidentShopPurchaseReqFactory.INSTANCE; + } + + private enum ResidentShopPurchaseReqFactory implements MessageFactory<ResidentShopPurchaseReq> { + INSTANCE; + + @Override + public ResidentShopPurchaseReq create() { + return ResidentShopPurchaseReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName refreshTime = FieldName.forField("RefreshTime"); + + static final FieldName shopId = FieldName.forField("ShopId"); + + static final FieldName goodsId = FieldName.forField("GoodsId"); + + static final FieldName number = FieldName.forField("Number"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ResidentShopPurchaseResp} + */ + public static final class ResidentShopPurchaseResp extends ProtoMessage<ResidentShopPurchaseResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 PurchasedNumber = 3;</code> + */ + private int purchasedNumber; + + /** + * <code>optional bool IsRefresh = 1;</code> + */ + private boolean isRefresh; + + /** + * <code>optional .ResidentShop Shop = 2;</code> + */ + private final Public.ResidentShop shop = Public.ResidentShop.newInstance(); + + /** + * <code>optional .ChangeInfo Change = 4;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ResidentShopPurchaseResp() { + } + + /** + * @return a new empty instance of {@code ResidentShopPurchaseResp} + */ + public static ResidentShopPurchaseResp newInstance() { + return new ResidentShopPurchaseResp(); + } + + /** + * <code>optional uint32 PurchasedNumber = 3;</code> + * @return whether the purchasedNumber field is set + */ + public boolean hasPurchasedNumber() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 PurchasedNumber = 3;</code> + * @return this + */ + public ResidentShopPurchaseResp clearPurchasedNumber() { + bitField0_ &= ~0x00000001; + purchasedNumber = 0; + return this; + } + + /** + * <code>optional uint32 PurchasedNumber = 3;</code> + * @return the purchasedNumber + */ + public int getPurchasedNumber() { + return purchasedNumber; + } + + /** + * <code>optional uint32 PurchasedNumber = 3;</code> + * @param value the purchasedNumber to set + * @return this + */ + public ResidentShopPurchaseResp setPurchasedNumber(final int value) { + bitField0_ |= 0x00000001; + purchasedNumber = value; + return this; + } + + /** + * <code>optional bool IsRefresh = 1;</code> + * @return whether the isRefresh field is set + */ + public boolean hasIsRefresh() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool IsRefresh = 1;</code> + * @return this + */ + public ResidentShopPurchaseResp clearIsRefresh() { + bitField0_ &= ~0x00000002; + isRefresh = false; + return this; + } + + /** + * <code>optional bool IsRefresh = 1;</code> + * @return the isRefresh + */ + public boolean getIsRefresh() { + return isRefresh; + } + + /** + * <code>optional bool IsRefresh = 1;</code> + * @param value the isRefresh to set + * @return this + */ + public ResidentShopPurchaseResp setIsRefresh(final boolean value) { + bitField0_ |= 0x00000002; + isRefresh = value; + return this; + } + + /** + * <code>optional .ResidentShop Shop = 2;</code> + * @return whether the shop field is set + */ + public boolean hasShop() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .ResidentShop Shop = 2;</code> + * @return this + */ + public ResidentShopPurchaseResp clearShop() { + bitField0_ &= ~0x00000004; + shop.clear(); + return this; + } + + /** + * <code>optional .ResidentShop Shop = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableShop()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ResidentShop getShop() { + return shop; + } + + /** + * <code>optional .ResidentShop Shop = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ResidentShop getMutableShop() { + bitField0_ |= 0x00000004; + return shop; + } + + /** + * <code>optional .ResidentShop Shop = 2;</code> + * @param value the shop to set + * @return this + */ + public ResidentShopPurchaseResp setShop(final Public.ResidentShop value) { + bitField0_ |= 0x00000004; + shop.copyFrom(value); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 4;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 4;</code> + * @return this + */ + public ResidentShopPurchaseResp clearChange() { + bitField0_ &= ~0x00000008; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000008; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 4;</code> + * @param value the change to set + * @return this + */ + public ResidentShopPurchaseResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000008; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ResidentShopPurchaseResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ResidentShopPurchaseResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ResidentShopPurchaseResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ResidentShopPurchaseResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ResidentShopPurchaseResp copyFrom(final ResidentShopPurchaseResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + purchasedNumber = other.purchasedNumber; + isRefresh = other.isRefresh; + shop.copyFrom(other.shop); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ResidentShopPurchaseResp mergeFrom(final ResidentShopPurchaseResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasPurchasedNumber()) { + setPurchasedNumber(other.purchasedNumber); + } + if (other.hasIsRefresh()) { + setIsRefresh(other.isRefresh); + } + if (other.hasShop()) { + getMutableShop().mergeFrom(other.shop); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ResidentShopPurchaseResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + purchasedNumber = 0; + isRefresh = false; + shop.clear(); + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ResidentShopPurchaseResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + shop.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ResidentShopPurchaseResp)) { + return false; + } + ResidentShopPurchaseResp other = (ResidentShopPurchaseResp) o; + return bitField0_ == other.bitField0_ + && (!hasPurchasedNumber() || purchasedNumber == other.purchasedNumber) + && (!hasIsRefresh() || isRefresh == other.isRefresh) + && (!hasShop() || shop.equals(other.shop)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(purchasedNumber); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(isRefresh); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(shop); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(purchasedNumber); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(shop); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ResidentShopPurchaseResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // purchasedNumber + purchasedNumber = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // isRefresh + isRefresh = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // shop + input.readMessage(shop); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // change + input.readMessage(change); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.purchasedNumber, purchasedNumber); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.isRefresh, isRefresh); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.shop, shop); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ResidentShopPurchaseResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1475882124: { + if (input.isAtField(FieldNames.purchasedNumber)) { + if (!input.trySkipNullValue()) { + purchasedNumber = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1785333199: { + if (input.isAtField(FieldNames.isRefresh)) { + if (!input.trySkipNullValue()) { + isRefresh = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2576150: { + if (input.isAtField(FieldNames.shop)) { + if (!input.trySkipNullValue()) { + input.readMessage(shop); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ResidentShopPurchaseResp clone() { + return new ResidentShopPurchaseResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ResidentShopPurchaseResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ResidentShopPurchaseResp(), data).checkInitialized(); + } + + public static ResidentShopPurchaseResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopPurchaseResp(), input).checkInitialized(); + } + + public static ResidentShopPurchaseResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ResidentShopPurchaseResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ResidentShopPurchaseResp messages + */ + public static MessageFactory<ResidentShopPurchaseResp> getFactory() { + return ResidentShopPurchaseRespFactory.INSTANCE; + } + + private enum ResidentShopPurchaseRespFactory implements MessageFactory<ResidentShopPurchaseResp> { + INSTANCE; + + @Override + public ResidentShopPurchaseResp create() { + return ResidentShopPurchaseResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName purchasedNumber = FieldName.forField("PurchasedNumber"); + + static final FieldName isRefresh = FieldName.forField("IsRefresh"); + + static final FieldName shop = FieldName.forField("Shop"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ScoreBossApply.java b/src/generated/main/emu/nebula/proto/ScoreBossApply.java new file mode 100644 index 0000000..c74946b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ScoreBossApply.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ScoreBossApply { + /** + * Protobuf type {@code ScoreBossApplyReq} + */ + public static final class ScoreBossApplyReq extends ProtoMessage<ScoreBossApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 2;</code> + */ + private long buildId; + + /** + * <code>optional uint32 LevelId = 1;</code> + */ + private int levelId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ScoreBossApplyReq() { + } + + /** + * @return a new empty instance of {@code ScoreBossApplyReq} + */ + public static ScoreBossApplyReq newInstance() { + return new ScoreBossApplyReq(); + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return this + */ + public ScoreBossApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @param value the buildId to set + * @return this + */ + public ScoreBossApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return whether the levelId field is set + */ + public boolean hasLevelId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return this + */ + public ScoreBossApplyReq clearLevelId() { + bitField0_ &= ~0x00000002; + levelId = 0; + return this; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @return the levelId + */ + public int getLevelId() { + return levelId; + } + + /** + * <code>optional uint32 LevelId = 1;</code> + * @param value the levelId to set + * @return this + */ + public ScoreBossApplyReq setLevelId(final int value) { + bitField0_ |= 0x00000002; + levelId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ScoreBossApplyReq copyFrom(final ScoreBossApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + levelId = other.levelId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossApplyReq mergeFrom(final ScoreBossApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasLevelId()) { + setLevelId(other.levelId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + levelId = 0; + nextPackage.clear(); + return this; + } + + @Override + public ScoreBossApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossApplyReq)) { + return false; + } + ScoreBossApplyReq other = (ScoreBossApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasLevelId() || levelId == other.levelId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // levelId + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelId, levelId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ScoreBossApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1734437791: { + if (input.isAtField(FieldNames.levelId)) { + if (!input.trySkipNullValue()) { + levelId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossApplyReq clone() { + return new ScoreBossApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossApplyReq(), data).checkInitialized(); + } + + public static ScoreBossApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossApplyReq(), input).checkInitialized(); + } + + public static ScoreBossApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossApplyReq messages + */ + public static MessageFactory<ScoreBossApplyReq> getFactory() { + return ScoreBossApplyReqFactory.INSTANCE; + } + + private enum ScoreBossApplyReqFactory implements MessageFactory<ScoreBossApplyReq> { + INSTANCE; + + @Override + public ScoreBossApplyReq create() { + return ScoreBossApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName levelId = FieldName.forField("LevelId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ScoreBossInfoOuterClass.java b/src/generated/main/emu/nebula/proto/ScoreBossInfoOuterClass.java new file mode 100644 index 0000000..aecb0ea --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ScoreBossInfoOuterClass.java @@ -0,0 +1,777 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class ScoreBossInfoOuterClass { + /** + * Protobuf type {@code ScoreBossInfo} + */ + public static final class ScoreBossInfo extends ProtoMessage<ScoreBossInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ControlId = 1;</code> + */ + private int controlId; + + /** + * <code>optional uint32 Score = 2;</code> + */ + private int score; + + /** + * <code>optional uint32 Star = 3;</code> + */ + private int star; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 StarRewards = 101;</code> + */ + private final RepeatedInt starRewards = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .ScoreBossLevel Levels = 102;</code> + */ + private final RepeatedMessage<Public.ScoreBossLevel> levels = RepeatedMessage.newEmptyInstance(Public.ScoreBossLevel.getFactory()); + + private ScoreBossInfo() { + } + + /** + * @return a new empty instance of {@code ScoreBossInfo} + */ + public static ScoreBossInfo newInstance() { + return new ScoreBossInfo(); + } + + /** + * <code>optional uint32 ControlId = 1;</code> + * @return whether the controlId field is set + */ + public boolean hasControlId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ControlId = 1;</code> + * @return this + */ + public ScoreBossInfo clearControlId() { + bitField0_ &= ~0x00000001; + controlId = 0; + return this; + } + + /** + * <code>optional uint32 ControlId = 1;</code> + * @return the controlId + */ + public int getControlId() { + return controlId; + } + + /** + * <code>optional uint32 ControlId = 1;</code> + * @param value the controlId to set + * @return this + */ + public ScoreBossInfo setControlId(final int value) { + bitField0_ |= 0x00000001; + controlId = value; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return this + */ + public ScoreBossInfo clearScore() { + bitField0_ &= ~0x00000002; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @param value the score to set + * @return this + */ + public ScoreBossInfo setScore(final int value) { + bitField0_ |= 0x00000002; + score = value; + return this; + } + + /** + * <code>optional uint32 Star = 3;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Star = 3;</code> + * @return this + */ + public ScoreBossInfo clearStar() { + bitField0_ &= ~0x00000004; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 3;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 3;</code> + * @param value the star to set + * @return this + */ + public ScoreBossInfo setStar(final int value) { + bitField0_ |= 0x00000004; + star = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 StarRewards = 101;</code> + * @return whether the starRewards field is set + */ + public boolean hasStarRewards() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint32 StarRewards = 101;</code> + * @return this + */ + public ScoreBossInfo clearStarRewards() { + bitField0_ &= ~0x00000010; + starRewards.clear(); + return this; + } + + /** + * <code>repeated uint32 StarRewards = 101;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStarRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getStarRewards() { + return starRewards; + } + + /** + * <code>repeated uint32 StarRewards = 101;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableStarRewards() { + bitField0_ |= 0x00000010; + return starRewards; + } + + /** + * <code>repeated uint32 StarRewards = 101;</code> + * @param value the starRewards to add + * @return this + */ + public ScoreBossInfo addStarRewards(final int value) { + bitField0_ |= 0x00000010; + starRewards.add(value); + return this; + } + + /** + * <code>repeated uint32 StarRewards = 101;</code> + * @param values the starRewards to add + * @return this + */ + public ScoreBossInfo addAllStarRewards(final int... values) { + bitField0_ |= 0x00000010; + starRewards.addAll(values); + return this; + } + + /** + * <code>repeated .ScoreBossLevel Levels = 102;</code> + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated .ScoreBossLevel Levels = 102;</code> + * @return this + */ + public ScoreBossInfo clearLevels() { + bitField0_ &= ~0x00000020; + levels.clear(); + return this; + } + + /** + * <code>repeated .ScoreBossLevel Levels = 102;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ScoreBossLevel> getLevels() { + return levels; + } + + /** + * <code>repeated .ScoreBossLevel Levels = 102;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ScoreBossLevel> getMutableLevels() { + bitField0_ |= 0x00000020; + return levels; + } + + /** + * <code>repeated .ScoreBossLevel Levels = 102;</code> + * @param value the levels to add + * @return this + */ + public ScoreBossInfo addLevels(final Public.ScoreBossLevel value) { + bitField0_ |= 0x00000020; + levels.add(value); + return this; + } + + /** + * <code>repeated .ScoreBossLevel Levels = 102;</code> + * @param values the levels to add + * @return this + */ + public ScoreBossInfo addAllLevels(final Public.ScoreBossLevel... values) { + bitField0_ |= 0x00000020; + levels.addAll(values); + return this; + } + + @Override + public ScoreBossInfo copyFrom(final ScoreBossInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + controlId = other.controlId; + score = other.score; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + starRewards.copyFrom(other.starRewards); + levels.copyFrom(other.levels); + } + return this; + } + + @Override + public ScoreBossInfo mergeFrom(final ScoreBossInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasControlId()) { + setControlId(other.controlId); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasStarRewards()) { + getMutableStarRewards().addAll(other.starRewards); + } + if (other.hasLevels()) { + getMutableLevels().addAll(other.levels); + } + return this; + } + + @Override + public ScoreBossInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + controlId = 0; + score = 0; + star = 0; + nextPackage.clear(); + starRewards.clear(); + levels.clear(); + return this; + } + + @Override + public ScoreBossInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + starRewards.clear(); + levels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossInfo)) { + return false; + } + ScoreBossInfo other = (ScoreBossInfo) o; + return bitField0_ == other.bitField0_ + && (!hasControlId() || controlId == other.controlId) + && (!hasScore() || score == other.score) + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasStarRewards() || starRewards.equals(other.starRewards)) + && (!hasLevels() || levels.equals(other.levels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(controlId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < starRewards.length(); i++) { + output.writeRawLittleEndian16((short) 1704); + output.writeUInt32NoTag(starRewards.array()[i]); + } + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < levels.length(); i++) { + output.writeRawLittleEndian16((short) 1714); + output.writeMessageNoTag(levels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(controlId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (2 * starRewards.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(starRewards); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (2 * levels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(levels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // controlId + controlId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 810) { + break; + } + } + case 810: { + // starRewards [packed=true] + input.readPackedUInt32(starRewards, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 818) { + break; + } + } + case 818: { + // levels + tag = input.readRepeatedMessage(levels, tag); + bitField0_ |= 0x00000020; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 808: { + // starRewards [packed=false] + tag = input.readRepeatedUInt32(starRewards, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.controlId, controlId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.starRewards, starRewards); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.levels, levels); + } + output.endObject(); + } + + @Override + public ScoreBossInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1608887096: { + if (input.isAtField(FieldNames.controlId)) { + if (!input.trySkipNullValue()) { + controlId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 208957522: { + if (input.isAtField(FieldNames.starRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(starRewards); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022260337: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(levels); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossInfo clone() { + return new ScoreBossInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossInfo parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossInfo(), data).checkInitialized(); + } + + public static ScoreBossInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossInfo(), input).checkInitialized(); + } + + public static ScoreBossInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossInfo messages + */ + public static MessageFactory<ScoreBossInfo> getFactory() { + return ScoreBossInfoFactory.INSTANCE; + } + + private enum ScoreBossInfoFactory implements MessageFactory<ScoreBossInfo> { + INSTANCE; + + @Override + public ScoreBossInfo create() { + return ScoreBossInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName controlId = FieldName.forField("ControlId"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName starRewards = FieldName.forField("StarRewards"); + + static final FieldName levels = FieldName.forField("Levels"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ScoreBossRank.java b/src/generated/main/emu/nebula/proto/ScoreBossRank.java new file mode 100644 index 0000000..6002d8e --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ScoreBossRank.java @@ -0,0 +1,2912 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class ScoreBossRank { + /** + * Protobuf type {@code ScoreBossRankInfo} + */ + public static final class ScoreBossRankInfo extends ProtoMessage<ScoreBossRankInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + */ + private long lastRefreshTime; + + /** + * <code>optional .ScoreBossRankData Self = 2;</code> + */ + private final ScoreBossRankData self = ScoreBossRankData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 Border = 4;</code> + */ + private final RepeatedLong border = RepeatedLong.newEmptyInstance(); + + /** + * <code>repeated .ScoreBossRankData Rank = 3;</code> + */ + private final RepeatedMessage<ScoreBossRankData> rank = RepeatedMessage.newEmptyInstance(ScoreBossRankData.getFactory()); + + private ScoreBossRankInfo() { + } + + /** + * @return a new empty instance of {@code ScoreBossRankInfo} + */ + public static ScoreBossRankInfo newInstance() { + return new ScoreBossRankInfo(); + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @return whether the lastRefreshTime field is set + */ + public boolean hasLastRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @return this + */ + public ScoreBossRankInfo clearLastRefreshTime() { + bitField0_ &= ~0x00000001; + lastRefreshTime = 0L; + return this; + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @return the lastRefreshTime + */ + public long getLastRefreshTime() { + return lastRefreshTime; + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @param value the lastRefreshTime to set + * @return this + */ + public ScoreBossRankInfo setLastRefreshTime(final long value) { + bitField0_ |= 0x00000001; + lastRefreshTime = value; + return this; + } + + /** + * <code>optional .ScoreBossRankData Self = 2;</code> + * @return whether the self field is set + */ + public boolean hasSelf() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ScoreBossRankData Self = 2;</code> + * @return this + */ + public ScoreBossRankInfo clearSelf() { + bitField0_ &= ~0x00000002; + self.clear(); + return this; + } + + /** + * <code>optional .ScoreBossRankData Self = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelf()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ScoreBossRankData getSelf() { + return self; + } + + /** + * <code>optional .ScoreBossRankData Self = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ScoreBossRankData getMutableSelf() { + bitField0_ |= 0x00000002; + return self; + } + + /** + * <code>optional .ScoreBossRankData Self = 2;</code> + * @param value the self to set + * @return this + */ + public ScoreBossRankInfo setSelf(final ScoreBossRankData value) { + bitField0_ |= 0x00000002; + self.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossRankInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossRankInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossRankInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossRankInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 Border = 4;</code> + * @return whether the border field is set + */ + public boolean hasBorder() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint64 Border = 4;</code> + * @return this + */ + public ScoreBossRankInfo clearBorder() { + bitField0_ &= ~0x00000008; + border.clear(); + return this; + } + + /** + * <code>repeated uint64 Border = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBorder()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getBorder() { + return border; + } + + /** + * <code>repeated uint64 Border = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableBorder() { + bitField0_ |= 0x00000008; + return border; + } + + /** + * <code>repeated uint64 Border = 4;</code> + * @param value the border to add + * @return this + */ + public ScoreBossRankInfo addBorder(final long value) { + bitField0_ |= 0x00000008; + border.add(value); + return this; + } + + /** + * <code>repeated uint64 Border = 4;</code> + * @param values the border to add + * @return this + */ + public ScoreBossRankInfo addAllBorder(final long... values) { + bitField0_ |= 0x00000008; + border.addAll(values); + return this; + } + + /** + * <code>repeated .ScoreBossRankData Rank = 3;</code> + * @return whether the rank field is set + */ + public boolean hasRank() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .ScoreBossRankData Rank = 3;</code> + * @return this + */ + public ScoreBossRankInfo clearRank() { + bitField0_ &= ~0x00000010; + rank.clear(); + return this; + } + + /** + * <code>repeated .ScoreBossRankData Rank = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRank()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ScoreBossRankData> getRank() { + return rank; + } + + /** + * <code>repeated .ScoreBossRankData Rank = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ScoreBossRankData> getMutableRank() { + bitField0_ |= 0x00000010; + return rank; + } + + /** + * <code>repeated .ScoreBossRankData Rank = 3;</code> + * @param value the rank to add + * @return this + */ + public ScoreBossRankInfo addRank(final ScoreBossRankData value) { + bitField0_ |= 0x00000010; + rank.add(value); + return this; + } + + /** + * <code>repeated .ScoreBossRankData Rank = 3;</code> + * @param values the rank to add + * @return this + */ + public ScoreBossRankInfo addAllRank(final ScoreBossRankData... values) { + bitField0_ |= 0x00000010; + rank.addAll(values); + return this; + } + + @Override + public ScoreBossRankInfo copyFrom(final ScoreBossRankInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lastRefreshTime = other.lastRefreshTime; + self.copyFrom(other.self); + nextPackage.copyFrom(other.nextPackage); + border.copyFrom(other.border); + rank.copyFrom(other.rank); + } + return this; + } + + @Override + public ScoreBossRankInfo mergeFrom(final ScoreBossRankInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLastRefreshTime()) { + setLastRefreshTime(other.lastRefreshTime); + } + if (other.hasSelf()) { + getMutableSelf().mergeFrom(other.self); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBorder()) { + getMutableBorder().addAll(other.border); + } + if (other.hasRank()) { + getMutableRank().addAll(other.rank); + } + return this; + } + + @Override + public ScoreBossRankInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lastRefreshTime = 0L; + self.clear(); + nextPackage.clear(); + border.clear(); + rank.clear(); + return this; + } + + @Override + public ScoreBossRankInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + self.clearQuick(); + nextPackage.clear(); + border.clear(); + rank.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossRankInfo)) { + return false; + } + ScoreBossRankInfo other = (ScoreBossRankInfo) o; + return bitField0_ == other.bitField0_ + && (!hasLastRefreshTime() || lastRefreshTime == other.lastRefreshTime) + && (!hasSelf() || self.equals(other.self)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBorder() || border.equals(other.border)) + && (!hasRank() || rank.equals(other.rank)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt64NoTag(lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(self); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < border.length(); i++) { + output.writeRawByte((byte) 32); + output.writeUInt64NoTag(border.array()[i]); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < rank.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(rank.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(self); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * border.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(border); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * rank.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rank); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossRankInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // lastRefreshTime + lastRefreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // self + input.readMessage(self); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // border [packed=true] + input.readPackedUInt64(border, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // rank + tag = input.readRepeatedMessage(rank, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 32: { + // border [packed=false] + tag = input.readRepeatedUInt64(border, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.lastRefreshTime, lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.self, self); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt64(FieldNames.border, border); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.rank, rank); + } + output.endObject(); + } + + @Override + public ScoreBossRankInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -197072974: { + if (input.isAtField(FieldNames.lastRefreshTime)) { + if (!input.trySkipNullValue()) { + lastRefreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2573164: { + if (input.isAtField(FieldNames.self)) { + if (!input.trySkipNullValue()) { + input.readMessage(self); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1995530316: { + if (input.isAtField(FieldNames.border)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(border); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2539596: { + if (input.isAtField(FieldNames.rank)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rank); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossRankInfo clone() { + return new ScoreBossRankInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossRankInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossRankInfo(), data).checkInitialized(); + } + + public static ScoreBossRankInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankInfo(), input).checkInitialized(); + } + + public static ScoreBossRankInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossRankInfo messages + */ + public static MessageFactory<ScoreBossRankInfo> getFactory() { + return ScoreBossRankInfoFactory.INSTANCE; + } + + private enum ScoreBossRankInfoFactory implements MessageFactory<ScoreBossRankInfo> { + INSTANCE; + + @Override + public ScoreBossRankInfo create() { + return ScoreBossRankInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lastRefreshTime = FieldName.forField("LastRefreshTime"); + + static final FieldName self = FieldName.forField("Self"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName border = FieldName.forField("Border"); + + static final FieldName rank = FieldName.forField("Rank"); + } + } + + /** + * Protobuf type {@code ScoreBossRankChar} + */ + public static final class ScoreBossRankChar extends ProtoMessage<ScoreBossRankChar> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ScoreBossRankChar() { + } + + /** + * @return a new empty instance of {@code ScoreBossRankChar} + */ + public static ScoreBossRankChar newInstance() { + return new ScoreBossRankChar(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public ScoreBossRankChar clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ScoreBossRankChar setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return this + */ + public ScoreBossRankChar clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public ScoreBossRankChar setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossRankChar clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossRankChar addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossRankChar addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossRankChar setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ScoreBossRankChar copyFrom(final ScoreBossRankChar other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + level = other.level; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossRankChar mergeFrom(final ScoreBossRankChar other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossRankChar clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + level = 0; + nextPackage.clear(); + return this; + } + + @Override + public ScoreBossRankChar clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossRankChar)) { + return false; + } + ScoreBossRankChar other = (ScoreBossRankChar) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasLevel() || level == other.level) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossRankChar mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ScoreBossRankChar mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossRankChar clone() { + return new ScoreBossRankChar().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossRankChar parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossRankChar(), data).checkInitialized(); + } + + public static ScoreBossRankChar parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankChar(), input).checkInitialized(); + } + + public static ScoreBossRankChar parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankChar(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossRankChar messages + */ + public static MessageFactory<ScoreBossRankChar> getFactory() { + return ScoreBossRankCharFactory.INSTANCE; + } + + private enum ScoreBossRankCharFactory implements MessageFactory<ScoreBossRankChar> { + INSTANCE; + + @Override + public ScoreBossRankChar create() { + return ScoreBossRankChar.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ScoreBossRankTeam} + */ + public static final class ScoreBossRankTeam extends ProtoMessage<ScoreBossRankTeam> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 BuildScore = 1;</code> + */ + private int buildScore; + + /** + * <code>optional uint32 LevelScore = 3;</code> + */ + private int levelScore; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ScoreBossRankChar Chars = 2;</code> + */ + private final RepeatedMessage<ScoreBossRankChar> chars = RepeatedMessage.newEmptyInstance(ScoreBossRankChar.getFactory()); + + private ScoreBossRankTeam() { + } + + /** + * @return a new empty instance of {@code ScoreBossRankTeam} + */ + public static ScoreBossRankTeam newInstance() { + return new ScoreBossRankTeam(); + } + + /** + * <code>optional uint32 BuildScore = 1;</code> + * @return whether the buildScore field is set + */ + public boolean hasBuildScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 BuildScore = 1;</code> + * @return this + */ + public ScoreBossRankTeam clearBuildScore() { + bitField0_ &= ~0x00000001; + buildScore = 0; + return this; + } + + /** + * <code>optional uint32 BuildScore = 1;</code> + * @return the buildScore + */ + public int getBuildScore() { + return buildScore; + } + + /** + * <code>optional uint32 BuildScore = 1;</code> + * @param value the buildScore to set + * @return this + */ + public ScoreBossRankTeam setBuildScore(final int value) { + bitField0_ |= 0x00000001; + buildScore = value; + return this; + } + + /** + * <code>optional uint32 LevelScore = 3;</code> + * @return whether the levelScore field is set + */ + public boolean hasLevelScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 LevelScore = 3;</code> + * @return this + */ + public ScoreBossRankTeam clearLevelScore() { + bitField0_ &= ~0x00000002; + levelScore = 0; + return this; + } + + /** + * <code>optional uint32 LevelScore = 3;</code> + * @return the levelScore + */ + public int getLevelScore() { + return levelScore; + } + + /** + * <code>optional uint32 LevelScore = 3;</code> + * @param value the levelScore to set + * @return this + */ + public ScoreBossRankTeam setLevelScore(final int value) { + bitField0_ |= 0x00000002; + levelScore = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossRankTeam clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossRankTeam addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossRankTeam addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossRankTeam setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ScoreBossRankChar Chars = 2;</code> + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .ScoreBossRankChar Chars = 2;</code> + * @return this + */ + public ScoreBossRankTeam clearChars() { + bitField0_ &= ~0x00000008; + chars.clear(); + return this; + } + + /** + * <code>repeated .ScoreBossRankChar Chars = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ScoreBossRankChar> getChars() { + return chars; + } + + /** + * <code>repeated .ScoreBossRankChar Chars = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ScoreBossRankChar> getMutableChars() { + bitField0_ |= 0x00000008; + return chars; + } + + /** + * <code>repeated .ScoreBossRankChar Chars = 2;</code> + * @param value the chars to add + * @return this + */ + public ScoreBossRankTeam addChars(final ScoreBossRankChar value) { + bitField0_ |= 0x00000008; + chars.add(value); + return this; + } + + /** + * <code>repeated .ScoreBossRankChar Chars = 2;</code> + * @param values the chars to add + * @return this + */ + public ScoreBossRankTeam addAllChars(final ScoreBossRankChar... values) { + bitField0_ |= 0x00000008; + chars.addAll(values); + return this; + } + + @Override + public ScoreBossRankTeam copyFrom(final ScoreBossRankTeam other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildScore = other.buildScore; + levelScore = other.levelScore; + nextPackage.copyFrom(other.nextPackage); + chars.copyFrom(other.chars); + } + return this; + } + + @Override + public ScoreBossRankTeam mergeFrom(final ScoreBossRankTeam other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildScore()) { + setBuildScore(other.buildScore); + } + if (other.hasLevelScore()) { + setLevelScore(other.levelScore); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + return this; + } + + @Override + public ScoreBossRankTeam clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildScore = 0; + levelScore = 0; + nextPackage.clear(); + chars.clear(); + return this; + } + + @Override + public ScoreBossRankTeam clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chars.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossRankTeam)) { + return false; + } + ScoreBossRankTeam other = (ScoreBossRankTeam) o; + return bitField0_ == other.bitField0_ + && (!hasBuildScore() || buildScore == other.buildScore) + && (!hasLevelScore() || levelScore == other.levelScore) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasChars() || chars.equals(other.chars)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(buildScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(levelScore); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(chars.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(buildScore); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(levelScore); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossRankTeam mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // buildScore + buildScore = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // levelScore + levelScore = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.buildScore, buildScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.levelScore, levelScore); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + output.endObject(); + } + + @Override + public ScoreBossRankTeam mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1511471332: { + if (input.isAtField(FieldNames.buildScore)) { + if (!input.trySkipNullValue()) { + buildScore = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2105990770: { + if (input.isAtField(FieldNames.levelScore)) { + if (!input.trySkipNullValue()) { + levelScore = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossRankTeam clone() { + return new ScoreBossRankTeam().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossRankTeam parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossRankTeam(), data).checkInitialized(); + } + + public static ScoreBossRankTeam parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankTeam(), input).checkInitialized(); + } + + public static ScoreBossRankTeam parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankTeam(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossRankTeam messages + */ + public static MessageFactory<ScoreBossRankTeam> getFactory() { + return ScoreBossRankTeamFactory.INSTANCE; + } + + private enum ScoreBossRankTeamFactory implements MessageFactory<ScoreBossRankTeam> { + INSTANCE; + + @Override + public ScoreBossRankTeam create() { + return ScoreBossRankTeam.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildScore = FieldName.forField("BuildScore"); + + static final FieldName levelScore = FieldName.forField("LevelScore"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName chars = FieldName.forField("Chars"); + } + } + + /** + * Protobuf type {@code ScoreBossRankData} + */ + public static final class ScoreBossRankData extends ProtoMessage<ScoreBossRankData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 Id = 1;</code> + */ + private long id; + + /** + * <code>optional uint32 WorldClass = 3;</code> + */ + private int worldClass; + + /** + * <code>optional uint32 HeadIcon = 4;</code> + */ + private int headIcon; + + /** + * <code>optional uint32 Score = 5;</code> + */ + private int score; + + /** + * <code>optional uint32 Rank = 6;</code> + */ + private int rank; + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + */ + private int titlePrefix; + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + */ + private int titleSuffix; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string NickName = 2;</code> + */ + private final Utf8String nickName = Utf8String.newEmptyInstance(); + + /** + * <code>repeated .ScoreBossRankTeam Teams = 9;</code> + */ + private final RepeatedMessage<ScoreBossRankTeam> teams = RepeatedMessage.newEmptyInstance(ScoreBossRankTeam.getFactory()); + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + */ + private final RepeatedMessage<Public.HonorInfo> honors = RepeatedMessage.newEmptyInstance(Public.HonorInfo.getFactory()); + + private ScoreBossRankData() { + } + + /** + * @return a new empty instance of {@code ScoreBossRankData} + */ + public static ScoreBossRankData newInstance() { + return new ScoreBossRankData(); + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return this + */ + public ScoreBossRankData clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return the id + */ + public long getId() { + return id; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @param value the id to set + * @return this + */ + public ScoreBossRankData setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @return whether the worldClass field is set + */ + public boolean hasWorldClass() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @return this + */ + public ScoreBossRankData clearWorldClass() { + bitField0_ &= ~0x00000002; + worldClass = 0; + return this; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @return the worldClass + */ + public int getWorldClass() { + return worldClass; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @param value the worldClass to set + * @return this + */ + public ScoreBossRankData setWorldClass(final int value) { + bitField0_ |= 0x00000002; + worldClass = value; + return this; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return whether the headIcon field is set + */ + public boolean hasHeadIcon() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return this + */ + public ScoreBossRankData clearHeadIcon() { + bitField0_ &= ~0x00000004; + headIcon = 0; + return this; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return the headIcon + */ + public int getHeadIcon() { + return headIcon; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @param value the headIcon to set + * @return this + */ + public ScoreBossRankData setHeadIcon(final int value) { + bitField0_ |= 0x00000004; + headIcon = value; + return this; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return this + */ + public ScoreBossRankData clearScore() { + bitField0_ &= ~0x00000008; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @param value the score to set + * @return this + */ + public ScoreBossRankData setScore(final int value) { + bitField0_ |= 0x00000008; + score = value; + return this; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @return whether the rank field is set + */ + public boolean hasRank() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @return this + */ + public ScoreBossRankData clearRank() { + bitField0_ &= ~0x00000010; + rank = 0; + return this; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @return the rank + */ + public int getRank() { + return rank; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @param value the rank to set + * @return this + */ + public ScoreBossRankData setRank(final int value) { + bitField0_ |= 0x00000010; + rank = value; + return this; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @return whether the titlePrefix field is set + */ + public boolean hasTitlePrefix() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @return this + */ + public ScoreBossRankData clearTitlePrefix() { + bitField0_ &= ~0x00000020; + titlePrefix = 0; + return this; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @return the titlePrefix + */ + public int getTitlePrefix() { + return titlePrefix; + } + + /** + * <code>optional uint32 TitlePrefix = 7;</code> + * @param value the titlePrefix to set + * @return this + */ + public ScoreBossRankData setTitlePrefix(final int value) { + bitField0_ |= 0x00000020; + titlePrefix = value; + return this; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @return whether the titleSuffix field is set + */ + public boolean hasTitleSuffix() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @return this + */ + public ScoreBossRankData clearTitleSuffix() { + bitField0_ &= ~0x00000040; + titleSuffix = 0; + return this; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @return the titleSuffix + */ + public int getTitleSuffix() { + return titleSuffix; + } + + /** + * <code>optional uint32 TitleSuffix = 8;</code> + * @param value the titleSuffix to set + * @return this + */ + public ScoreBossRankData setTitleSuffix(final int value) { + bitField0_ |= 0x00000040; + titleSuffix = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossRankData clearNextPackage() { + bitField0_ &= ~0x00000080; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000080; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossRankData addNextPackage(final byte value) { + bitField0_ |= 0x00000080; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossRankData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossRankData setNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @return whether the nickName field is set + */ + public boolean hasNickName() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional string NickName = 2;</code> + * @return this + */ + public ScoreBossRankData clearNickName() { + bitField0_ &= ~0x00000100; + nickName.clear(); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @return the nickName + */ + public String getNickName() { + return nickName.getString(); + } + + /** + * <code>optional string NickName = 2;</code> + * @return internal {@code Utf8String} representation of nickName for reading + */ + public Utf8String getNickNameBytes() { + return this.nickName; + } + + /** + * <code>optional string NickName = 2;</code> + * @return internal {@code Utf8String} representation of nickName for modifications + */ + public Utf8String getMutableNickNameBytes() { + bitField0_ |= 0x00000100; + return this.nickName; + } + + /** + * <code>optional string NickName = 2;</code> + * @param value the nickName to set + * @return this + */ + public ScoreBossRankData setNickName(final CharSequence value) { + bitField0_ |= 0x00000100; + nickName.copyFrom(value); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @param value the nickName to set + * @return this + */ + public ScoreBossRankData setNickName(final Utf8String value) { + bitField0_ |= 0x00000100; + nickName.copyFrom(value); + return this; + } + + /** + * <code>repeated .ScoreBossRankTeam Teams = 9;</code> + * @return whether the teams field is set + */ + public boolean hasTeams() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>repeated .ScoreBossRankTeam Teams = 9;</code> + * @return this + */ + public ScoreBossRankData clearTeams() { + bitField0_ &= ~0x00000200; + teams.clear(); + return this; + } + + /** + * <code>repeated .ScoreBossRankTeam Teams = 9;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTeams()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<ScoreBossRankTeam> getTeams() { + return teams; + } + + /** + * <code>repeated .ScoreBossRankTeam Teams = 9;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<ScoreBossRankTeam> getMutableTeams() { + bitField0_ |= 0x00000200; + return teams; + } + + /** + * <code>repeated .ScoreBossRankTeam Teams = 9;</code> + * @param value the teams to add + * @return this + */ + public ScoreBossRankData addTeams(final ScoreBossRankTeam value) { + bitField0_ |= 0x00000200; + teams.add(value); + return this; + } + + /** + * <code>repeated .ScoreBossRankTeam Teams = 9;</code> + * @param values the teams to add + * @return this + */ + public ScoreBossRankData addAllTeams(final ScoreBossRankTeam... values) { + bitField0_ |= 0x00000200; + teams.addAll(values); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @return whether the honors field is set + */ + public boolean hasHonors() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @return this + */ + public ScoreBossRankData clearHonors() { + bitField0_ &= ~0x00000400; + honors.clear(); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHonors()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.HonorInfo> getHonors() { + return honors; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.HonorInfo> getMutableHonors() { + bitField0_ |= 0x00000400; + return honors; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @param value the honors to add + * @return this + */ + public ScoreBossRankData addHonors(final Public.HonorInfo value) { + bitField0_ |= 0x00000400; + honors.add(value); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @param values the honors to add + * @return this + */ + public ScoreBossRankData addAllHonors(final Public.HonorInfo... values) { + bitField0_ |= 0x00000400; + honors.addAll(values); + return this; + } + + @Override + public ScoreBossRankData copyFrom(final ScoreBossRankData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + worldClass = other.worldClass; + headIcon = other.headIcon; + score = other.score; + rank = other.rank; + titlePrefix = other.titlePrefix; + titleSuffix = other.titleSuffix; + nextPackage.copyFrom(other.nextPackage); + nickName.copyFrom(other.nickName); + teams.copyFrom(other.teams); + honors.copyFrom(other.honors); + } + return this; + } + + @Override + public ScoreBossRankData mergeFrom(final ScoreBossRankData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasWorldClass()) { + setWorldClass(other.worldClass); + } + if (other.hasHeadIcon()) { + setHeadIcon(other.headIcon); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasRank()) { + setRank(other.rank); + } + if (other.hasTitlePrefix()) { + setTitlePrefix(other.titlePrefix); + } + if (other.hasTitleSuffix()) { + setTitleSuffix(other.titleSuffix); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNickName()) { + getMutableNickNameBytes().copyFrom(other.nickName); + } + if (other.hasTeams()) { + getMutableTeams().addAll(other.teams); + } + if (other.hasHonors()) { + getMutableHonors().addAll(other.honors); + } + return this; + } + + @Override + public ScoreBossRankData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + worldClass = 0; + headIcon = 0; + score = 0; + rank = 0; + titlePrefix = 0; + titleSuffix = 0; + nextPackage.clear(); + nickName.clear(); + teams.clear(); + honors.clear(); + return this; + } + + @Override + public ScoreBossRankData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + nickName.clear(); + teams.clearQuick(); + honors.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossRankData)) { + return false; + } + ScoreBossRankData other = (ScoreBossRankData) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasWorldClass() || worldClass == other.worldClass) + && (!hasHeadIcon() || headIcon == other.headIcon) + && (!hasScore() || score == other.score) + && (!hasRank() || rank == other.rank) + && (!hasTitlePrefix() || titlePrefix == other.titlePrefix) + && (!hasTitleSuffix() || titleSuffix == other.titleSuffix) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNickName() || nickName.equals(other.nickName)) + && (!hasTeams() || teams.equals(other.teams)) + && (!hasHonors() || honors.equals(other.honors)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(rank); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + for (int i = 0; i < teams.length(); i++) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(teams.get(i)); + } + } + if ((bitField0_ & 0x00000400) != 0) { + for (int i = 0; i < honors.length(); i++) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(honors.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(rank); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + size += (1 * teams.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(teams); + } + if ((bitField0_ & 0x00000400) != 0) { + size += (1 * honors.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(honors); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossRankData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // worldClass + worldClass = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // headIcon + headIcon = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // rank + rank = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // titlePrefix + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // titleSuffix + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // nickName + input.readString(nickName); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // teams + tag = input.readRepeatedMessage(teams, tag); + bitField0_ |= 0x00000200; + if (tag != 122) { + break; + } + } + case 122: { + // honors + tag = input.readRepeatedMessage(honors, tag); + bitField0_ |= 0x00000400; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.worldClass, worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.headIcon, headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.rank, rank); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.titlePrefix, titlePrefix); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.titleSuffix, titleSuffix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeString(FieldNames.nickName, nickName); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRepeatedMessage(FieldNames.teams, teams); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRepeatedMessage(FieldNames.honors, honors); + } + output.endObject(); + } + + @Override + public ScoreBossRankData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1869617882: { + if (input.isAtField(FieldNames.worldClass)) { + if (!input.trySkipNullValue()) { + worldClass = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1051463015: { + if (input.isAtField(FieldNames.headIcon)) { + if (!input.trySkipNullValue()) { + headIcon = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2539596: { + if (input.isAtField(FieldNames.rank)) { + if (!input.trySkipNullValue()) { + rank = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2096776938: { + if (input.isAtField(FieldNames.titlePrefix)) { + if (!input.trySkipNullValue()) { + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2109502551: { + if (input.isAtField(FieldNames.titleSuffix)) { + if (!input.trySkipNullValue()) { + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 134381742: { + if (input.isAtField(FieldNames.nickName)) { + if (!input.trySkipNullValue()) { + input.readString(nickName); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80681366: { + if (input.isAtField(FieldNames.teams)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(teams); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2127770263: { + if (input.isAtField(FieldNames.honors)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(honors); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossRankData clone() { + return new ScoreBossRankData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossRankData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossRankData(), data).checkInitialized(); + } + + public static ScoreBossRankData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankData(), input).checkInitialized(); + } + + public static ScoreBossRankData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossRankData(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossRankData messages + */ + public static MessageFactory<ScoreBossRankData> getFactory() { + return ScoreBossRankDataFactory.INSTANCE; + } + + private enum ScoreBossRankDataFactory implements MessageFactory<ScoreBossRankData> { + INSTANCE; + + @Override + public ScoreBossRankData create() { + return ScoreBossRankData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName worldClass = FieldName.forField("WorldClass"); + + static final FieldName headIcon = FieldName.forField("HeadIcon"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName rank = FieldName.forField("Rank"); + + static final FieldName titlePrefix = FieldName.forField("TitlePrefix"); + + static final FieldName titleSuffix = FieldName.forField("TitleSuffix"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nickName = FieldName.forField("NickName"); + + static final FieldName teams = FieldName.forField("Teams"); + + static final FieldName honors = FieldName.forField("Honors"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ScoreBossSettle.java b/src/generated/main/emu/nebula/proto/ScoreBossSettle.java new file mode 100644 index 0000000..45f9180 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ScoreBossSettle.java @@ -0,0 +1,1464 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class ScoreBossSettle { + /** + * Protobuf type {@code ScoreBossSettleReq} + */ + public static final class ScoreBossSettleReq extends ProtoMessage<ScoreBossSettleReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Star = 1;</code> + */ + private int star; + + /** + * <code>optional uint32 Score = 2;</code> + */ + private int score; + + /** + * <code>optional uint32 DamageScore = 4;</code> + */ + private int damageScore; + + /** + * <code>optional uint32 SkillScore = 5;</code> + */ + private int skillScore; + + /** + * <code>optional uint32 BossResultLevel = 6;</code> + */ + private int bossResultLevel; + + /** + * <code>optional .TravelerDuelBattleSamples sample = 3;</code> + */ + private final TravelerDuelRankUpload.TravelerDuelBattleSamples sample = TravelerDuelRankUpload.TravelerDuelBattleSamples.newInstance(); + + /** + * <code>optional .Events Events = 15;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ScoreBossSettleReq() { + } + + /** + * @return a new empty instance of {@code ScoreBossSettleReq} + */ + public static ScoreBossSettleReq newInstance() { + return new ScoreBossSettleReq(); + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return this + */ + public ScoreBossSettleReq clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @param value the star to set + * @return this + */ + public ScoreBossSettleReq setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return this + */ + public ScoreBossSettleReq clearScore() { + bitField0_ &= ~0x00000002; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 2;</code> + * @param value the score to set + * @return this + */ + public ScoreBossSettleReq setScore(final int value) { + bitField0_ |= 0x00000002; + score = value; + return this; + } + + /** + * <code>optional uint32 DamageScore = 4;</code> + * @return whether the damageScore field is set + */ + public boolean hasDamageScore() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 DamageScore = 4;</code> + * @return this + */ + public ScoreBossSettleReq clearDamageScore() { + bitField0_ &= ~0x00000004; + damageScore = 0; + return this; + } + + /** + * <code>optional uint32 DamageScore = 4;</code> + * @return the damageScore + */ + public int getDamageScore() { + return damageScore; + } + + /** + * <code>optional uint32 DamageScore = 4;</code> + * @param value the damageScore to set + * @return this + */ + public ScoreBossSettleReq setDamageScore(final int value) { + bitField0_ |= 0x00000004; + damageScore = value; + return this; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @return whether the skillScore field is set + */ + public boolean hasSkillScore() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @return this + */ + public ScoreBossSettleReq clearSkillScore() { + bitField0_ &= ~0x00000008; + skillScore = 0; + return this; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @return the skillScore + */ + public int getSkillScore() { + return skillScore; + } + + /** + * <code>optional uint32 SkillScore = 5;</code> + * @param value the skillScore to set + * @return this + */ + public ScoreBossSettleReq setSkillScore(final int value) { + bitField0_ |= 0x00000008; + skillScore = value; + return this; + } + + /** + * <code>optional uint32 BossResultLevel = 6;</code> + * @return whether the bossResultLevel field is set + */ + public boolean hasBossResultLevel() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 BossResultLevel = 6;</code> + * @return this + */ + public ScoreBossSettleReq clearBossResultLevel() { + bitField0_ &= ~0x00000010; + bossResultLevel = 0; + return this; + } + + /** + * <code>optional uint32 BossResultLevel = 6;</code> + * @return the bossResultLevel + */ + public int getBossResultLevel() { + return bossResultLevel; + } + + /** + * <code>optional uint32 BossResultLevel = 6;</code> + * @param value the bossResultLevel to set + * @return this + */ + public ScoreBossSettleReq setBossResultLevel(final int value) { + bitField0_ |= 0x00000010; + bossResultLevel = value; + return this; + } + + /** + * <code>optional .TravelerDuelBattleSamples sample = 3;</code> + * @return whether the sample field is set + */ + public boolean hasSample() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional .TravelerDuelBattleSamples sample = 3;</code> + * @return this + */ + public ScoreBossSettleReq clearSample() { + bitField0_ &= ~0x00000020; + sample.clear(); + return this; + } + + /** + * <code>optional .TravelerDuelBattleSamples sample = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSample()} if you want to modify it. + * + * @return internal storage object for reading + */ + public TravelerDuelRankUpload.TravelerDuelBattleSamples getSample() { + return sample; + } + + /** + * <code>optional .TravelerDuelBattleSamples sample = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public TravelerDuelRankUpload.TravelerDuelBattleSamples getMutableSample() { + bitField0_ |= 0x00000020; + return sample; + } + + /** + * <code>optional .TravelerDuelBattleSamples sample = 3;</code> + * @param value the sample to set + * @return this + */ + public ScoreBossSettleReq setSample( + final TravelerDuelRankUpload.TravelerDuelBattleSamples value) { + bitField0_ |= 0x00000020; + sample.copyFrom(value); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return this + */ + public ScoreBossSettleReq clearEvents() { + bitField0_ &= ~0x00000040; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000040; + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * @param value the events to set + * @return this + */ + public ScoreBossSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000040; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossSettleReq clearNextPackage() { + bitField0_ &= ~0x00000080; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000080; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000080; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ScoreBossSettleReq copyFrom(final ScoreBossSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + score = other.score; + damageScore = other.damageScore; + skillScore = other.skillScore; + bossResultLevel = other.bossResultLevel; + sample.copyFrom(other.sample); + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossSettleReq mergeFrom(final ScoreBossSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasDamageScore()) { + setDamageScore(other.damageScore); + } + if (other.hasSkillScore()) { + setSkillScore(other.skillScore); + } + if (other.hasBossResultLevel()) { + setBossResultLevel(other.bossResultLevel); + } + if (other.hasSample()) { + getMutableSample().mergeFrom(other.sample); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + score = 0; + damageScore = 0; + skillScore = 0; + bossResultLevel = 0; + sample.clear(); + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public ScoreBossSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + sample.clearQuick(); + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossSettleReq)) { + return false; + } + ScoreBossSettleReq other = (ScoreBossSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasScore() || score == other.score) + && (!hasDamageScore() || damageScore == other.damageScore) + && (!hasSkillScore() || skillScore == other.skillScore) + && (!hasBossResultLevel() || bossResultLevel == other.bossResultLevel) + && (!hasSample() || sample.equals(other.sample)) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(damageScore); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(skillScore); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(bossResultLevel); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(sample); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(damageScore); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(skillScore); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossResultLevel); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(sample); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // damageScore + damageScore = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // skillScore + skillScore = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // bossResultLevel + bossResultLevel = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // sample + input.readMessage(sample); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.damageScore, damageScore); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.skillScore, skillScore); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.bossResultLevel, bossResultLevel); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.sample, sample); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ScoreBossSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1815857085: { + if (input.isAtField(FieldNames.damageScore)) { + if (!input.trySkipNullValue()) { + damageScore = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -705549599: { + if (input.isAtField(FieldNames.skillScore)) { + if (!input.trySkipNullValue()) { + skillScore = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -172418150: { + if (input.isAtField(FieldNames.bossResultLevel)) { + if (!input.trySkipNullValue()) { + bossResultLevel = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -909675094: { + if (input.isAtField(FieldNames.sample)) { + if (!input.trySkipNullValue()) { + input.readMessage(sample); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossSettleReq clone() { + return new ScoreBossSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossSettleReq(), data).checkInitialized(); + } + + public static ScoreBossSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossSettleReq(), input).checkInitialized(); + } + + public static ScoreBossSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossSettleReq messages + */ + public static MessageFactory<ScoreBossSettleReq> getFactory() { + return ScoreBossSettleReqFactory.INSTANCE; + } + + private enum ScoreBossSettleReqFactory implements MessageFactory<ScoreBossSettleReq> { + INSTANCE; + + @Override + public ScoreBossSettleReq create() { + return ScoreBossSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName damageScore = FieldName.forField("DamageScore"); + + static final FieldName skillScore = FieldName.forField("SkillScore"); + + static final FieldName bossResultLevel = FieldName.forField("BossResultLevel"); + + static final FieldName sample = FieldName.forField("sample"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code ScoreBossSettleResp} + */ + public static final class ScoreBossSettleResp extends ProtoMessage<ScoreBossSettleResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 oldRank = 2;</code> + */ + private int oldRank; + + /** + * <code>optional uint32 newRank = 3;</code> + */ + private int newRank; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string token = 1;</code> + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + private ScoreBossSettleResp() { + } + + /** + * @return a new empty instance of {@code ScoreBossSettleResp} + */ + public static ScoreBossSettleResp newInstance() { + return new ScoreBossSettleResp(); + } + + /** + * <code>optional uint32 oldRank = 2;</code> + * @return whether the oldRank field is set + */ + public boolean hasOldRank() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 oldRank = 2;</code> + * @return this + */ + public ScoreBossSettleResp clearOldRank() { + bitField0_ &= ~0x00000001; + oldRank = 0; + return this; + } + + /** + * <code>optional uint32 oldRank = 2;</code> + * @return the oldRank + */ + public int getOldRank() { + return oldRank; + } + + /** + * <code>optional uint32 oldRank = 2;</code> + * @param value the oldRank to set + * @return this + */ + public ScoreBossSettleResp setOldRank(final int value) { + bitField0_ |= 0x00000001; + oldRank = value; + return this; + } + + /** + * <code>optional uint32 newRank = 3;</code> + * @return whether the newRank field is set + */ + public boolean hasNewRank() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 newRank = 3;</code> + * @return this + */ + public ScoreBossSettleResp clearNewRank() { + bitField0_ &= ~0x00000002; + newRank = 0; + return this; + } + + /** + * <code>optional uint32 newRank = 3;</code> + * @return the newRank + */ + public int getNewRank() { + return newRank; + } + + /** + * <code>optional uint32 newRank = 3;</code> + * @param value the newRank to set + * @return this + */ + public ScoreBossSettleResp setNewRank(final int value) { + bitField0_ |= 0x00000002; + newRank = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossSettleResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string token = 1;</code> + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional string token = 1;</code> + * @return this + */ + public ScoreBossSettleResp clearToken() { + bitField0_ &= ~0x00000008; + token.clear(); + return this; + } + + /** + * <code>optional string token = 1;</code> + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * <code>optional string token = 1;</code> + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * <code>optional string token = 1;</code> + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000008; + return this.token; + } + + /** + * <code>optional string token = 1;</code> + * @param value the token to set + * @return this + */ + public ScoreBossSettleResp setToken(final CharSequence value) { + bitField0_ |= 0x00000008; + token.copyFrom(value); + return this; + } + + /** + * <code>optional string token = 1;</code> + * @param value the token to set + * @return this + */ + public ScoreBossSettleResp setToken(final Utf8String value) { + bitField0_ |= 0x00000008; + token.copyFrom(value); + return this; + } + + @Override + public ScoreBossSettleResp copyFrom(final ScoreBossSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + oldRank = other.oldRank; + newRank = other.newRank; + nextPackage.copyFrom(other.nextPackage); + token.copyFrom(other.token); + } + return this; + } + + @Override + public ScoreBossSettleResp mergeFrom(final ScoreBossSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOldRank()) { + setOldRank(other.oldRank); + } + if (other.hasNewRank()) { + setNewRank(other.newRank); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + return this; + } + + @Override + public ScoreBossSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + oldRank = 0; + newRank = 0; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public ScoreBossSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossSettleResp)) { + return false; + } + ScoreBossSettleResp other = (ScoreBossSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasOldRank() || oldRank == other.oldRank) + && (!hasNewRank() || newRank == other.newRank) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasToken() || token.equals(other.token)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(oldRank); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(newRank); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeStringNoTag(token); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(oldRank); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(newRank); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // oldRank + oldRank = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // newRank + newRank = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // token + input.readString(token); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.oldRank, oldRank); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.newRank, newRank); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.token, token); + } + output.endObject(); + } + + @Override + public ScoreBossSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1379466509: { + if (input.isAtField(FieldNames.oldRank)) { + if (!input.trySkipNullValue()) { + oldRank = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1845139948: { + if (input.isAtField(FieldNames.newRank)) { + if (!input.trySkipNullValue()) { + newRank = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 110541305: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossSettleResp clone() { + return new ScoreBossSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossSettleResp(), data).checkInitialized(); + } + + public static ScoreBossSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossSettleResp(), input).checkInitialized(); + } + + public static ScoreBossSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ScoreBossSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossSettleResp messages + */ + public static MessageFactory<ScoreBossSettleResp> getFactory() { + return ScoreBossSettleRespFactory.INSTANCE; + } + + private enum ScoreBossSettleRespFactory implements MessageFactory<ScoreBossSettleResp> { + INSTANCE; + + @Override + public ScoreBossSettleResp create() { + return ScoreBossSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName oldRank = FieldName.forField("oldRank"); + + static final FieldName newRank = FieldName.forField("newRank"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName token = FieldName.forField("token"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/ScoreBossStarRewardReceive.java b/src/generated/main/emu/nebula/proto/ScoreBossStarRewardReceive.java new file mode 100644 index 0000000..e1183f1 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/ScoreBossStarRewardReceive.java @@ -0,0 +1,385 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class ScoreBossStarRewardReceive { + /** + * Protobuf type {@code ScoreBossStarRewardReceiveReq} + */ + public static final class ScoreBossStarRewardReceiveReq extends ProtoMessage<ScoreBossStarRewardReceiveReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Star = 1;</code> + */ + private int star; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private ScoreBossStarRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code ScoreBossStarRewardReceiveReq} + */ + public static ScoreBossStarRewardReceiveReq newInstance() { + return new ScoreBossStarRewardReceiveReq(); + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return this + */ + public ScoreBossStarRewardReceiveReq clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @param value the star to set + * @return this + */ + public ScoreBossStarRewardReceiveReq setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public ScoreBossStarRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public ScoreBossStarRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public ScoreBossStarRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public ScoreBossStarRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public ScoreBossStarRewardReceiveReq copyFrom(final ScoreBossStarRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossStarRewardReceiveReq mergeFrom(final ScoreBossStarRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public ScoreBossStarRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + nextPackage.clear(); + return this; + } + + @Override + public ScoreBossStarRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ScoreBossStarRewardReceiveReq)) { + return false; + } + ScoreBossStarRewardReceiveReq other = (ScoreBossStarRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ScoreBossStarRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public ScoreBossStarRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ScoreBossStarRewardReceiveReq clone() { + return new ScoreBossStarRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ScoreBossStarRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ScoreBossStarRewardReceiveReq(), data).checkInitialized(); + } + + public static ScoreBossStarRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ScoreBossStarRewardReceiveReq(), input).checkInitialized(); + } + + public static ScoreBossStarRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ScoreBossStarRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating ScoreBossStarRewardReceiveReq messages + */ + public static MessageFactory<ScoreBossStarRewardReceiveReq> getFactory() { + return ScoreBossStarRewardReceiveReqFactory.INSTANCE; + } + + private enum ScoreBossStarRewardReceiveReqFactory implements MessageFactory<ScoreBossStarRewardReceiveReq> { + INSTANCE; + + @Override + public ScoreBossStarRewardReceiveReq create() { + return ScoreBossStarRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/SkillInstanceApply.java b/src/generated/main/emu/nebula/proto/SkillInstanceApply.java new file mode 100644 index 0000000..41d3bb0 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/SkillInstanceApply.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class SkillInstanceApply { + /** + * Protobuf type {@code SkillInstanceApplyReq} + */ + public static final class SkillInstanceApplyReq extends ProtoMessage<SkillInstanceApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 2;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SkillInstanceApplyReq() { + } + + /** + * @return a new empty instance of {@code SkillInstanceApplyReq} + */ + public static SkillInstanceApplyReq newInstance() { + return new SkillInstanceApplyReq(); + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return this + */ + public SkillInstanceApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @param value the buildId to set + * @return this + */ + public SkillInstanceApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public SkillInstanceApplyReq clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public SkillInstanceApplyReq setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SkillInstanceApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SkillInstanceApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SkillInstanceApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SkillInstanceApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SkillInstanceApplyReq copyFrom(final SkillInstanceApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstanceApplyReq mergeFrom(final SkillInstanceApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstanceApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public SkillInstanceApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkillInstanceApplyReq)) { + return false; + } + SkillInstanceApplyReq other = (SkillInstanceApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkillInstanceApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SkillInstanceApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkillInstanceApplyReq clone() { + return new SkillInstanceApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkillInstanceApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkillInstanceApplyReq(), data).checkInitialized(); + } + + public static SkillInstanceApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceApplyReq(), input).checkInitialized(); + } + + public static SkillInstanceApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating SkillInstanceApplyReq messages + */ + public static MessageFactory<SkillInstanceApplyReq> getFactory() { + return SkillInstanceApplyReqFactory.INSTANCE; + } + + private enum SkillInstanceApplyReqFactory implements MessageFactory<SkillInstanceApplyReq> { + INSTANCE; + + @Override + public SkillInstanceApplyReq create() { + return SkillInstanceApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/SkillInstanceSettle.java b/src/generated/main/emu/nebula/proto/SkillInstanceSettle.java new file mode 100644 index 0000000..2c27bb8 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/SkillInstanceSettle.java @@ -0,0 +1,1566 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class SkillInstanceSettle { + /** + * Protobuf type {@code SkillInstanceSettleReq} + */ + public static final class SkillInstanceSettleReq extends ProtoMessage<SkillInstanceSettleReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Star = 1;</code> + */ + private int star; + + /** + * <code>optional .Events Events = 15;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SkillInstanceSettleReq() { + } + + /** + * @return a new empty instance of {@code SkillInstanceSettleReq} + */ + public static SkillInstanceSettleReq newInstance() { + return new SkillInstanceSettleReq(); + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return this + */ + public SkillInstanceSettleReq clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @param value the star to set + * @return this + */ + public SkillInstanceSettleReq setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return this + */ + public SkillInstanceSettleReq clearEvents() { + bitField0_ &= ~0x00000002; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000002; + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * @param value the events to set + * @return this + */ + public SkillInstanceSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000002; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SkillInstanceSettleReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SkillInstanceSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SkillInstanceSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SkillInstanceSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SkillInstanceSettleReq copyFrom(final SkillInstanceSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstanceSettleReq mergeFrom(final SkillInstanceSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstanceSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public SkillInstanceSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkillInstanceSettleReq)) { + return false; + } + SkillInstanceSettleReq other = (SkillInstanceSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkillInstanceSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SkillInstanceSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkillInstanceSettleReq clone() { + return new SkillInstanceSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkillInstanceSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkillInstanceSettleReq(), data).checkInitialized(); + } + + public static SkillInstanceSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSettleReq(), input).checkInitialized(); + } + + public static SkillInstanceSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating SkillInstanceSettleReq messages + */ + public static MessageFactory<SkillInstanceSettleReq> getFactory() { + return SkillInstanceSettleReqFactory.INSTANCE; + } + + private enum SkillInstanceSettleReqFactory implements MessageFactory<SkillInstanceSettleReq> { + INSTANCE; + + @Override + public SkillInstanceSettleReq create() { + return SkillInstanceSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code SkillInstanceSettleResp} + */ + public static final class SkillInstanceSettleResp extends ProtoMessage<SkillInstanceSettleResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Exp = 7;</code> + */ + private int exp; + + /** + * <code>optional bool First = 1;</code> + */ + private boolean first; + + /** + * <code>optional bool ThreeStar = 2;</code> + */ + private boolean threeStar; + + /** + * <code>optional .ChangeInfo Change = 3;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + */ + private final RepeatedMessage<Public.ItemTpl> awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + */ + private final RepeatedMessage<Public.ItemTpl> firstItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + */ + private final RepeatedMessage<Public.ItemTpl> threeStarItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + */ + private final RepeatedMessage<Public.ItemTpl> surpriseItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private SkillInstanceSettleResp() { + } + + /** + * @return a new empty instance of {@code SkillInstanceSettleResp} + */ + public static SkillInstanceSettleResp newInstance() { + return new SkillInstanceSettleResp(); + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @return this + */ + public SkillInstanceSettleResp clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 7;</code> + * @param value the exp to set + * @return this + */ + public SkillInstanceSettleResp setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * <code>optional bool First = 1;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool First = 1;</code> + * @return this + */ + public SkillInstanceSettleResp clearFirst() { + bitField0_ &= ~0x00000002; + first = false; + return this; + } + + /** + * <code>optional bool First = 1;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 1;</code> + * @param value the first to set + * @return this + */ + public SkillInstanceSettleResp setFirst(final boolean value) { + bitField0_ |= 0x00000002; + first = value; + return this; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @return whether the threeStar field is set + */ + public boolean hasThreeStar() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @return this + */ + public SkillInstanceSettleResp clearThreeStar() { + bitField0_ &= ~0x00000004; + threeStar = false; + return this; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @return the threeStar + */ + public boolean getThreeStar() { + return threeStar; + } + + /** + * <code>optional bool ThreeStar = 2;</code> + * @param value the threeStar to set + * @return this + */ + public SkillInstanceSettleResp setThreeStar(final boolean value) { + bitField0_ |= 0x00000004; + threeStar = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @return this + */ + public SkillInstanceSettleResp clearChange() { + bitField0_ &= ~0x00000008; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000008; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @param value the change to set + * @return this + */ + public SkillInstanceSettleResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000008; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SkillInstanceSettleResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SkillInstanceSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SkillInstanceSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SkillInstanceSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @return this + */ + public SkillInstanceSettleResp clearAwardItems() { + bitField0_ &= ~0x00000020; + awardItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getAwardItems() { + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableAwardItems() { + bitField0_ |= 0x00000020; + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @param value the awardItems to add + * @return this + */ + public SkillInstanceSettleResp addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000020; + awardItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 4;</code> + * @param values the awardItems to add + * @return this + */ + public SkillInstanceSettleResp addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000020; + awardItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @return whether the firstItems field is set + */ + public boolean hasFirstItems() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @return this + */ + public SkillInstanceSettleResp clearFirstItems() { + bitField0_ &= ~0x00000040; + firstItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFirstItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getFirstItems() { + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableFirstItems() { + bitField0_ |= 0x00000040; + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @param value the firstItems to add + * @return this + */ + public SkillInstanceSettleResp addFirstItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000040; + firstItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 5;</code> + * @param values the firstItems to add + * @return this + */ + public SkillInstanceSettleResp addAllFirstItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000040; + firstItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @return whether the threeStarItems field is set + */ + public boolean hasThreeStarItems() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @return this + */ + public SkillInstanceSettleResp clearThreeStarItems() { + bitField0_ &= ~0x00000080; + threeStarItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableThreeStarItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getThreeStarItems() { + return threeStarItems; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableThreeStarItems() { + bitField0_ |= 0x00000080; + return threeStarItems; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @param value the threeStarItems to add + * @return this + */ + public SkillInstanceSettleResp addThreeStarItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000080; + threeStarItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl ThreeStarItems = 6;</code> + * @param values the threeStarItems to add + * @return this + */ + public SkillInstanceSettleResp addAllThreeStarItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000080; + threeStarItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @return whether the surpriseItems field is set + */ + public boolean hasSurpriseItems() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @return this + */ + public SkillInstanceSettleResp clearSurpriseItems() { + bitField0_ &= ~0x00000100; + surpriseItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSurpriseItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getSurpriseItems() { + return surpriseItems; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableSurpriseItems() { + bitField0_ |= 0x00000100; + return surpriseItems; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @param value the surpriseItems to add + * @return this + */ + public SkillInstanceSettleResp addSurpriseItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000100; + surpriseItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 8;</code> + * @param values the surpriseItems to add + * @return this + */ + public SkillInstanceSettleResp addAllSurpriseItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000100; + surpriseItems.addAll(values); + return this; + } + + @Override + public SkillInstanceSettleResp copyFrom(final SkillInstanceSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + first = other.first; + threeStar = other.threeStar; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + firstItems.copyFrom(other.firstItems); + threeStarItems.copyFrom(other.threeStarItems); + surpriseItems.copyFrom(other.surpriseItems); + } + return this; + } + + @Override + public SkillInstanceSettleResp mergeFrom(final SkillInstanceSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasThreeStar()) { + setThreeStar(other.threeStar); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + if (other.hasFirstItems()) { + getMutableFirstItems().addAll(other.firstItems); + } + if (other.hasThreeStarItems()) { + getMutableThreeStarItems().addAll(other.threeStarItems); + } + if (other.hasSurpriseItems()) { + getMutableSurpriseItems().addAll(other.surpriseItems); + } + return this; + } + + @Override + public SkillInstanceSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + first = false; + threeStar = false; + change.clear(); + nextPackage.clear(); + awardItems.clear(); + firstItems.clear(); + threeStarItems.clear(); + surpriseItems.clear(); + return this; + } + + @Override + public SkillInstanceSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + awardItems.clearQuick(); + firstItems.clearQuick(); + threeStarItems.clearQuick(); + surpriseItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkillInstanceSettleResp)) { + return false; + } + SkillInstanceSettleResp other = (SkillInstanceSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasFirst() || first == other.first) + && (!hasThreeStar() || threeStar == other.threeStar) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)) + && (!hasFirstItems() || firstItems.equals(other.firstItems)) + && (!hasThreeStarItems() || threeStarItems.equals(other.threeStarItems)) + && (!hasSurpriseItems() || surpriseItems.equals(other.surpriseItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(threeStar); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(awardItems.get(i)); + } + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < firstItems.length(); i++) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(firstItems.get(i)); + } + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < threeStarItems.length(); i++) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(threeStarItems.get(i)); + } + } + if ((bitField0_ & 0x00000100) != 0) { + for (int i = 0; i < surpriseItems.length(); i++) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(surpriseItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * firstItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(firstItems); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * threeStarItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(threeStarItems); + } + if ((bitField0_ & 0x00000100) != 0) { + size += (1 * surpriseItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(surpriseItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkillInstanceSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 56: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // first + first = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // threeStar + threeStar = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000020; + if (tag != 42) { + break; + } + } + case 42: { + // firstItems + tag = input.readRepeatedMessage(firstItems, tag); + bitField0_ |= 0x00000040; + if (tag != 50) { + break; + } + } + case 50: { + // threeStarItems + tag = input.readRepeatedMessage(threeStarItems, tag); + bitField0_ |= 0x00000080; + if (tag != 66) { + break; + } + } + case 66: { + // surpriseItems + tag = input.readRepeatedMessage(surpriseItems, tag); + bitField0_ |= 0x00000100; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.threeStar, threeStar); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.firstItems, firstItems); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedMessage(FieldNames.threeStarItems, threeStarItems); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.surpriseItems, surpriseItems); + } + output.endObject(); + } + + @Override + public SkillInstanceSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 444940528: { + if (input.isAtField(FieldNames.threeStar)) { + if (!input.trySkipNullValue()) { + threeStar = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1812344592: { + if (input.isAtField(FieldNames.firstItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(firstItems); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2071409488: { + if (input.isAtField(FieldNames.threeStarItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(threeStarItems); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 477801015: { + if (input.isAtField(FieldNames.surpriseItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(surpriseItems); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkillInstanceSettleResp clone() { + return new SkillInstanceSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkillInstanceSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkillInstanceSettleResp(), data).checkInitialized(); + } + + public static SkillInstanceSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSettleResp(), input).checkInitialized(); + } + + public static SkillInstanceSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating SkillInstanceSettleResp messages + */ + public static MessageFactory<SkillInstanceSettleResp> getFactory() { + return SkillInstanceSettleRespFactory.INSTANCE; + } + + private enum SkillInstanceSettleRespFactory implements MessageFactory<SkillInstanceSettleResp> { + INSTANCE; + + @Override + public SkillInstanceSettleResp create() { + return SkillInstanceSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName threeStar = FieldName.forField("ThreeStar"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + + static final FieldName firstItems = FieldName.forField("FirstItems"); + + static final FieldName threeStarItems = FieldName.forField("ThreeStarItems"); + + static final FieldName surpriseItems = FieldName.forField("SurpriseItems"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/SkillInstanceSweep.java b/src/generated/main/emu/nebula/proto/SkillInstanceSweep.java new file mode 100644 index 0000000..fc3be64 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/SkillInstanceSweep.java @@ -0,0 +1,1548 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class SkillInstanceSweep { + /** + * Protobuf type {@code SkillInstanceSweepReq} + */ + public static final class SkillInstanceSweepReq extends ProtoMessage<SkillInstanceSweepReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Times = 2;</code> + */ + private int times; + + /** + * <code>optional .Events Events = 15;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private SkillInstanceSweepReq() { + } + + /** + * @return a new empty instance of {@code SkillInstanceSweepReq} + */ + public static SkillInstanceSweepReq newInstance() { + return new SkillInstanceSweepReq(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public SkillInstanceSweepReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public SkillInstanceSweepReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return whether the times field is set + */ + public boolean hasTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return this + */ + public SkillInstanceSweepReq clearTimes() { + bitField0_ &= ~0x00000002; + times = 0; + return this; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @return the times + */ + public int getTimes() { + return times; + } + + /** + * <code>optional uint32 Times = 2;</code> + * @param value the times to set + * @return this + */ + public SkillInstanceSweepReq setTimes(final int value) { + bitField0_ |= 0x00000002; + times = value; + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return this + */ + public SkillInstanceSweepReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * @param value the events to set + * @return this + */ + public SkillInstanceSweepReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SkillInstanceSweepReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SkillInstanceSweepReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SkillInstanceSweepReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SkillInstanceSweepReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public SkillInstanceSweepReq copyFrom(final SkillInstanceSweepReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + times = other.times; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstanceSweepReq mergeFrom(final SkillInstanceSweepReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasTimes()) { + setTimes(other.times); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public SkillInstanceSweepReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + times = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public SkillInstanceSweepReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkillInstanceSweepReq)) { + return false; + } + SkillInstanceSweepReq other = (SkillInstanceSweepReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasTimes() || times == other.times) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(times); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkillInstanceSweepReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // times + times = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.times, times); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public SkillInstanceSweepReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80811814: { + if (input.isAtField(FieldNames.times)) { + if (!input.trySkipNullValue()) { + times = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkillInstanceSweepReq clone() { + return new SkillInstanceSweepReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkillInstanceSweepReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepReq(), data).checkInitialized(); + } + + public static SkillInstanceSweepReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepReq(), input).checkInitialized(); + } + + public static SkillInstanceSweepReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepReq(), input).checkInitialized(); + } + + /** + * @return factory for creating SkillInstanceSweepReq messages + */ + public static MessageFactory<SkillInstanceSweepReq> getFactory() { + return SkillInstanceSweepReqFactory.INSTANCE; + } + + private enum SkillInstanceSweepReqFactory implements MessageFactory<SkillInstanceSweepReq> { + INSTANCE; + + @Override + public SkillInstanceSweepReq create() { + return SkillInstanceSweepReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName times = FieldName.forField("Times"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code SkillInstanceSweepResp} + */ + public static final class SkillInstanceSweepResp extends ProtoMessage<SkillInstanceSweepResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .SkillInstanceSweepRewards Rewards = 2;</code> + */ + private final RepeatedMessage<SkillInstanceSweepRewards> rewards = RepeatedMessage.newEmptyInstance(SkillInstanceSweepRewards.getFactory()); + + private SkillInstanceSweepResp() { + } + + /** + * @return a new empty instance of {@code SkillInstanceSweepResp} + */ + public static SkillInstanceSweepResp newInstance() { + return new SkillInstanceSweepResp(); + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public SkillInstanceSweepResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public SkillInstanceSweepResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SkillInstanceSweepResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SkillInstanceSweepResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SkillInstanceSweepResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SkillInstanceSweepResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .SkillInstanceSweepRewards Rewards = 2;</code> + * @return whether the rewards field is set + */ + public boolean hasRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .SkillInstanceSweepRewards Rewards = 2;</code> + * @return this + */ + public SkillInstanceSweepResp clearRewards() { + bitField0_ &= ~0x00000004; + rewards.clear(); + return this; + } + + /** + * <code>repeated .SkillInstanceSweepRewards Rewards = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<SkillInstanceSweepRewards> getRewards() { + return rewards; + } + + /** + * <code>repeated .SkillInstanceSweepRewards Rewards = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<SkillInstanceSweepRewards> getMutableRewards() { + bitField0_ |= 0x00000004; + return rewards; + } + + /** + * <code>repeated .SkillInstanceSweepRewards Rewards = 2;</code> + * @param value the rewards to add + * @return this + */ + public SkillInstanceSweepResp addRewards(final SkillInstanceSweepRewards value) { + bitField0_ |= 0x00000004; + rewards.add(value); + return this; + } + + /** + * <code>repeated .SkillInstanceSweepRewards Rewards = 2;</code> + * @param values the rewards to add + * @return this + */ + public SkillInstanceSweepResp addAllRewards(final SkillInstanceSweepRewards... values) { + bitField0_ |= 0x00000004; + rewards.addAll(values); + return this; + } + + @Override + public SkillInstanceSweepResp copyFrom(final SkillInstanceSweepResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + rewards.copyFrom(other.rewards); + } + return this; + } + + @Override + public SkillInstanceSweepResp mergeFrom(final SkillInstanceSweepResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewards()) { + getMutableRewards().addAll(other.rewards); + } + return this; + } + + @Override + public SkillInstanceSweepResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + rewards.clear(); + return this; + } + + @Override + public SkillInstanceSweepResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + rewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkillInstanceSweepResp)) { + return false; + } + SkillInstanceSweepResp other = (SkillInstanceSweepResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewards() || rewards.equals(other.rewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < rewards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * rewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkillInstanceSweepResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rewards + tag = input.readRepeatedMessage(rewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.rewards, rewards); + } + output.endObject(); + } + + @Override + public SkillInstanceSweepResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1529663740: { + if (input.isAtField(FieldNames.rewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkillInstanceSweepResp clone() { + return new SkillInstanceSweepResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkillInstanceSweepResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepResp(), data).checkInitialized(); + } + + public static SkillInstanceSweepResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepResp(), input).checkInitialized(); + } + + public static SkillInstanceSweepResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepResp(), input).checkInitialized(); + } + + /** + * @return factory for creating SkillInstanceSweepResp messages + */ + public static MessageFactory<SkillInstanceSweepResp> getFactory() { + return SkillInstanceSweepRespFactory.INSTANCE; + } + + private enum SkillInstanceSweepRespFactory implements MessageFactory<SkillInstanceSweepResp> { + INSTANCE; + + @Override + public SkillInstanceSweepResp create() { + return SkillInstanceSweepResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewards = FieldName.forField("Rewards"); + } + } + + /** + * Protobuf type {@code SkillInstanceSweepRewards} + */ + public static final class SkillInstanceSweepRewards extends ProtoMessage<SkillInstanceSweepRewards> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Exp = 2;</code> + */ + private int exp; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + */ + private final RepeatedMessage<Public.ItemTpl> awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private SkillInstanceSweepRewards() { + } + + /** + * @return a new empty instance of {@code SkillInstanceSweepRewards} + */ + public static SkillInstanceSweepRewards newInstance() { + return new SkillInstanceSweepRewards(); + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return whether the exp field is set + */ + public boolean hasExp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return this + */ + public SkillInstanceSweepRewards clearExp() { + bitField0_ &= ~0x00000001; + exp = 0; + return this; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @return the exp + */ + public int getExp() { + return exp; + } + + /** + * <code>optional uint32 Exp = 2;</code> + * @param value the exp to set + * @return this + */ + public SkillInstanceSweepRewards setExp(final int value) { + bitField0_ |= 0x00000001; + exp = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public SkillInstanceSweepRewards clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public SkillInstanceSweepRewards addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public SkillInstanceSweepRewards addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public SkillInstanceSweepRewards setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @return this + */ + public SkillInstanceSweepRewards clearAwardItems() { + bitField0_ &= ~0x00000004; + awardItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getAwardItems() { + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableAwardItems() { + bitField0_ |= 0x00000004; + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @param value the awardItems to add + * @return this + */ + public SkillInstanceSweepRewards addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + awardItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 1;</code> + * @param values the awardItems to add + * @return this + */ + public SkillInstanceSweepRewards addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + awardItems.addAll(values); + return this; + } + + @Override + public SkillInstanceSweepRewards copyFrom(final SkillInstanceSweepRewards other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + exp = other.exp; + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + } + return this; + } + + @Override + public SkillInstanceSweepRewards mergeFrom(final SkillInstanceSweepRewards other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasExp()) { + setExp(other.exp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + return this; + } + + @Override + public SkillInstanceSweepRewards clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + exp = 0; + nextPackage.clear(); + awardItems.clear(); + return this; + } + + @Override + public SkillInstanceSweepRewards clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + awardItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof SkillInstanceSweepRewards)) { + return false; + } + SkillInstanceSweepRewards other = (SkillInstanceSweepRewards) o; + return bitField0_ == other.bitField0_ + && (!hasExp() || exp == other.exp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(awardItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(exp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public SkillInstanceSweepRewards mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // exp + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.exp, exp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + output.endObject(); + } + + @Override + public SkillInstanceSweepRewards mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70141: { + if (input.isAtField(FieldNames.exp)) { + if (!input.trySkipNullValue()) { + exp = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public SkillInstanceSweepRewards clone() { + return new SkillInstanceSweepRewards().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static SkillInstanceSweepRewards parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepRewards(), data).checkInitialized(); + } + + public static SkillInstanceSweepRewards parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepRewards(), input).checkInitialized(); + } + + public static SkillInstanceSweepRewards parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new SkillInstanceSweepRewards(), input).checkInitialized(); + } + + /** + * @return factory for creating SkillInstanceSweepRewards messages + */ + public static MessageFactory<SkillInstanceSweepRewards> getFactory() { + return SkillInstanceSweepRewardsFactory.INSTANCE; + } + + private enum SkillInstanceSweepRewardsFactory implements MessageFactory<SkillInstanceSweepRewards> { + INSTANCE; + + @Override + public SkillInstanceSweepRewards create() { + return SkillInstanceSweepRewards.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName exp = FieldName.forField("Exp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerApply.java b/src/generated/main/emu/nebula/proto/StarTowerApply.java new file mode 100644 index 0000000..884b6f3 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerApply.java @@ -0,0 +1,2057 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class StarTowerApply { + /** + * Protobuf type {@code StarTowerApplyReq} + */ + public static final class StarTowerApplyReq extends ProtoMessage<StarTowerApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 FormationId = 2;</code> + */ + private int formationId; + + /** + * <code>optional uint32 CharHp = 3;</code> + */ + private int charHp; + + /** + * <code>optional uint32 MapId = 4;</code> + */ + private int mapId; + + /** + * <code>optional uint32 ParamId = 5;</code> + */ + private int paramId; + + /** + * <code>optional uint32 MapTableId = 7;</code> + */ + private int mapTableId; + + /** + * <code>optional bool Sweep = 15;</code> + */ + private boolean sweep; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string MapParam = 6;</code> + */ + private final Utf8String mapParam = Utf8String.newEmptyInstance(); + + private StarTowerApplyReq() { + } + + /** + * @return a new empty instance of {@code StarTowerApplyReq} + */ + public static StarTowerApplyReq newInstance() { + return new StarTowerApplyReq(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerApplyReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerApplyReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 FormationId = 2;</code> + * @return whether the formationId field is set + */ + public boolean hasFormationId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 FormationId = 2;</code> + * @return this + */ + public StarTowerApplyReq clearFormationId() { + bitField0_ &= ~0x00000002; + formationId = 0; + return this; + } + + /** + * <code>optional uint32 FormationId = 2;</code> + * @return the formationId + */ + public int getFormationId() { + return formationId; + } + + /** + * <code>optional uint32 FormationId = 2;</code> + * @param value the formationId to set + * @return this + */ + public StarTowerApplyReq setFormationId(final int value) { + bitField0_ |= 0x00000002; + formationId = value; + return this; + } + + /** + * <code>optional uint32 CharHp = 3;</code> + * @return whether the charHp field is set + */ + public boolean hasCharHp() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 CharHp = 3;</code> + * @return this + */ + public StarTowerApplyReq clearCharHp() { + bitField0_ &= ~0x00000004; + charHp = 0; + return this; + } + + /** + * <code>optional uint32 CharHp = 3;</code> + * @return the charHp + */ + public int getCharHp() { + return charHp; + } + + /** + * <code>optional uint32 CharHp = 3;</code> + * @param value the charHp to set + * @return this + */ + public StarTowerApplyReq setCharHp(final int value) { + bitField0_ |= 0x00000004; + charHp = value; + return this; + } + + /** + * <code>optional uint32 MapId = 4;</code> + * @return whether the mapId field is set + */ + public boolean hasMapId() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 MapId = 4;</code> + * @return this + */ + public StarTowerApplyReq clearMapId() { + bitField0_ &= ~0x00000008; + mapId = 0; + return this; + } + + /** + * <code>optional uint32 MapId = 4;</code> + * @return the mapId + */ + public int getMapId() { + return mapId; + } + + /** + * <code>optional uint32 MapId = 4;</code> + * @param value the mapId to set + * @return this + */ + public StarTowerApplyReq setMapId(final int value) { + bitField0_ |= 0x00000008; + mapId = value; + return this; + } + + /** + * <code>optional uint32 ParamId = 5;</code> + * @return whether the paramId field is set + */ + public boolean hasParamId() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 ParamId = 5;</code> + * @return this + */ + public StarTowerApplyReq clearParamId() { + bitField0_ &= ~0x00000010; + paramId = 0; + return this; + } + + /** + * <code>optional uint32 ParamId = 5;</code> + * @return the paramId + */ + public int getParamId() { + return paramId; + } + + /** + * <code>optional uint32 ParamId = 5;</code> + * @param value the paramId to set + * @return this + */ + public StarTowerApplyReq setParamId(final int value) { + bitField0_ |= 0x00000010; + paramId = value; + return this; + } + + /** + * <code>optional uint32 MapTableId = 7;</code> + * @return whether the mapTableId field is set + */ + public boolean hasMapTableId() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 MapTableId = 7;</code> + * @return this + */ + public StarTowerApplyReq clearMapTableId() { + bitField0_ &= ~0x00000020; + mapTableId = 0; + return this; + } + + /** + * <code>optional uint32 MapTableId = 7;</code> + * @return the mapTableId + */ + public int getMapTableId() { + return mapTableId; + } + + /** + * <code>optional uint32 MapTableId = 7;</code> + * @param value the mapTableId to set + * @return this + */ + public StarTowerApplyReq setMapTableId(final int value) { + bitField0_ |= 0x00000020; + mapTableId = value; + return this; + } + + /** + * <code>optional bool Sweep = 15;</code> + * @return whether the sweep field is set + */ + public boolean hasSweep() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional bool Sweep = 15;</code> + * @return this + */ + public StarTowerApplyReq clearSweep() { + bitField0_ &= ~0x00000040; + sweep = false; + return this; + } + + /** + * <code>optional bool Sweep = 15;</code> + * @return the sweep + */ + public boolean getSweep() { + return sweep; + } + + /** + * <code>optional bool Sweep = 15;</code> + * @param value the sweep to set + * @return this + */ + public StarTowerApplyReq setSweep(final boolean value) { + bitField0_ |= 0x00000040; + sweep = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerApplyReq clearNextPackage() { + bitField0_ &= ~0x00000080; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000080; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000080; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000080; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string MapParam = 6;</code> + * @return whether the mapParam field is set + */ + public boolean hasMapParam() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional string MapParam = 6;</code> + * @return this + */ + public StarTowerApplyReq clearMapParam() { + bitField0_ &= ~0x00000100; + mapParam.clear(); + return this; + } + + /** + * <code>optional string MapParam = 6;</code> + * @return the mapParam + */ + public String getMapParam() { + return mapParam.getString(); + } + + /** + * <code>optional string MapParam = 6;</code> + * @return internal {@code Utf8String} representation of mapParam for reading + */ + public Utf8String getMapParamBytes() { + return this.mapParam; + } + + /** + * <code>optional string MapParam = 6;</code> + * @return internal {@code Utf8String} representation of mapParam for modifications + */ + public Utf8String getMutableMapParamBytes() { + bitField0_ |= 0x00000100; + return this.mapParam; + } + + /** + * <code>optional string MapParam = 6;</code> + * @param value the mapParam to set + * @return this + */ + public StarTowerApplyReq setMapParam(final CharSequence value) { + bitField0_ |= 0x00000100; + mapParam.copyFrom(value); + return this; + } + + /** + * <code>optional string MapParam = 6;</code> + * @param value the mapParam to set + * @return this + */ + public StarTowerApplyReq setMapParam(final Utf8String value) { + bitField0_ |= 0x00000100; + mapParam.copyFrom(value); + return this; + } + + @Override + public StarTowerApplyReq copyFrom(final StarTowerApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + formationId = other.formationId; + charHp = other.charHp; + mapId = other.mapId; + paramId = other.paramId; + mapTableId = other.mapTableId; + sweep = other.sweep; + nextPackage.copyFrom(other.nextPackage); + mapParam.copyFrom(other.mapParam); + } + return this; + } + + @Override + public StarTowerApplyReq mergeFrom(final StarTowerApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasFormationId()) { + setFormationId(other.formationId); + } + if (other.hasCharHp()) { + setCharHp(other.charHp); + } + if (other.hasMapId()) { + setMapId(other.mapId); + } + if (other.hasParamId()) { + setParamId(other.paramId); + } + if (other.hasMapTableId()) { + setMapTableId(other.mapTableId); + } + if (other.hasSweep()) { + setSweep(other.sweep); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasMapParam()) { + getMutableMapParamBytes().copyFrom(other.mapParam); + } + return this; + } + + @Override + public StarTowerApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + formationId = 0; + charHp = 0; + mapId = 0; + paramId = 0; + mapTableId = 0; + sweep = false; + nextPackage.clear(); + mapParam.clear(); + return this; + } + + @Override + public StarTowerApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + mapParam.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerApplyReq)) { + return false; + } + StarTowerApplyReq other = (StarTowerApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasFormationId() || formationId == other.formationId) + && (!hasCharHp() || charHp == other.charHp) + && (!hasMapId() || mapId == other.mapId) + && (!hasParamId() || paramId == other.paramId) + && (!hasMapTableId() || mapTableId == other.mapTableId) + && (!hasSweep() || sweep == other.sweep) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasMapParam() || mapParam.equals(other.mapParam)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(formationId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(charHp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(mapId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(paramId); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(mapTableId); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 120); + output.writeBoolNoTag(sweep); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 50); + output.writeStringNoTag(mapParam); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(formationId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charHp); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mapId); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(paramId); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(mapTableId); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000080) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(mapParam); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // formationId + formationId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // charHp + charHp = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // mapId + mapId = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // paramId + paramId = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // mapTableId + mapTableId = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 120) { + break; + } + } + case 120: { + // sweep + sweep = input.readBool(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // mapParam + input.readString(mapParam); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.formationId, formationId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.charHp, charHp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.mapId, mapId); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.paramId, paramId); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.mapTableId, mapTableId); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBool(FieldNames.sweep, sweep); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeString(FieldNames.mapParam, mapParam); + } + output.endObject(); + } + + @Override + public StarTowerApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1159409268: { + if (input.isAtField(FieldNames.formationId)) { + if (!input.trySkipNullValue()) { + formationId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017200926: { + if (input.isAtField(FieldNames.charHp)) { + if (!input.trySkipNullValue()) { + charHp = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 74110839: { + if (input.isAtField(FieldNames.mapId)) { + if (!input.trySkipNullValue()) { + mapId = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 871156328: { + if (input.isAtField(FieldNames.paramId)) { + if (!input.trySkipNullValue()) { + paramId = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 556914861: { + if (input.isAtField(FieldNames.mapTableId)) { + if (!input.trySkipNullValue()) { + mapTableId = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80297676: { + if (input.isAtField(FieldNames.sweep)) { + if (!input.trySkipNullValue()) { + sweep = input.readBool(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 229302449: { + if (input.isAtField(FieldNames.mapParam)) { + if (!input.trySkipNullValue()) { + input.readString(mapParam); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerApplyReq clone() { + return new StarTowerApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerApplyReq(), data).checkInitialized(); + } + + public static StarTowerApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerApplyReq(), input).checkInitialized(); + } + + public static StarTowerApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerApplyReq messages + */ + public static MessageFactory<StarTowerApplyReq> getFactory() { + return StarTowerApplyReqFactory.INSTANCE; + } + + private enum StarTowerApplyReqFactory implements MessageFactory<StarTowerApplyReq> { + INSTANCE; + + @Override + public StarTowerApplyReq create() { + return StarTowerApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName formationId = FieldName.forField("FormationId"); + + static final FieldName charHp = FieldName.forField("CharHp"); + + static final FieldName mapId = FieldName.forField("MapId"); + + static final FieldName paramId = FieldName.forField("ParamId"); + + static final FieldName mapTableId = FieldName.forField("MapTableId"); + + static final FieldName sweep = FieldName.forField("Sweep"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName mapParam = FieldName.forField("MapParam"); + } + } + + /** + * Protobuf type {@code StarTowerApplyResp} + */ + public static final class StarTowerApplyResp extends ProtoMessage<StarTowerApplyResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 LastId = 2;</code> + */ + private int lastId; + + /** + * <code>optional uint32 CoinQty = 4;</code> + */ + private int coinQty; + + /** + * <code>optional uint32 FateCardId = 6;</code> + */ + private int fateCardId; + + /** + * <code>optional uint32 SweepTicket = 8;</code> + */ + private int sweepTicket; + + /** + * <code>optional uint32 SweepTicketUndated = 9;</code> + */ + private int sweepTicketUndated; + + /** + * <code>optional bool NewFateCard = 7;</code> + */ + private boolean newFateCard; + + /** + * <code>optional .StarTowerInfo Info = 1;</code> + */ + private final PublicStarTower.StarTowerInfo info = PublicStarTower.StarTowerInfo.newInstance(); + + /** + * <code>optional .ChangeInfo Change = 15;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .SubNoteSkillInfo Infos = 5;</code> + */ + private final RepeatedMessage<PublicStarTower.SubNoteSkillInfo> infos = RepeatedMessage.newEmptyInstance(PublicStarTower.SubNoteSkillInfo.getFactory()); + + private StarTowerApplyResp() { + } + + /** + * @return a new empty instance of {@code StarTowerApplyResp} + */ + public static StarTowerApplyResp newInstance() { + return new StarTowerApplyResp(); + } + + /** + * <code>optional uint32 LastId = 2;</code> + * @return whether the lastId field is set + */ + public boolean hasLastId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 LastId = 2;</code> + * @return this + */ + public StarTowerApplyResp clearLastId() { + bitField0_ &= ~0x00000001; + lastId = 0; + return this; + } + + /** + * <code>optional uint32 LastId = 2;</code> + * @return the lastId + */ + public int getLastId() { + return lastId; + } + + /** + * <code>optional uint32 LastId = 2;</code> + * @param value the lastId to set + * @return this + */ + public StarTowerApplyResp setLastId(final int value) { + bitField0_ |= 0x00000001; + lastId = value; + return this; + } + + /** + * <code>optional uint32 CoinQty = 4;</code> + * @return whether the coinQty field is set + */ + public boolean hasCoinQty() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 CoinQty = 4;</code> + * @return this + */ + public StarTowerApplyResp clearCoinQty() { + bitField0_ &= ~0x00000002; + coinQty = 0; + return this; + } + + /** + * <code>optional uint32 CoinQty = 4;</code> + * @return the coinQty + */ + public int getCoinQty() { + return coinQty; + } + + /** + * <code>optional uint32 CoinQty = 4;</code> + * @param value the coinQty to set + * @return this + */ + public StarTowerApplyResp setCoinQty(final int value) { + bitField0_ |= 0x00000002; + coinQty = value; + return this; + } + + /** + * <code>optional uint32 FateCardId = 6;</code> + * @return whether the fateCardId field is set + */ + public boolean hasFateCardId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 FateCardId = 6;</code> + * @return this + */ + public StarTowerApplyResp clearFateCardId() { + bitField0_ &= ~0x00000004; + fateCardId = 0; + return this; + } + + /** + * <code>optional uint32 FateCardId = 6;</code> + * @return the fateCardId + */ + public int getFateCardId() { + return fateCardId; + } + + /** + * <code>optional uint32 FateCardId = 6;</code> + * @param value the fateCardId to set + * @return this + */ + public StarTowerApplyResp setFateCardId(final int value) { + bitField0_ |= 0x00000004; + fateCardId = value; + return this; + } + + /** + * <code>optional uint32 SweepTicket = 8;</code> + * @return whether the sweepTicket field is set + */ + public boolean hasSweepTicket() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 SweepTicket = 8;</code> + * @return this + */ + public StarTowerApplyResp clearSweepTicket() { + bitField0_ &= ~0x00000008; + sweepTicket = 0; + return this; + } + + /** + * <code>optional uint32 SweepTicket = 8;</code> + * @return the sweepTicket + */ + public int getSweepTicket() { + return sweepTicket; + } + + /** + * <code>optional uint32 SweepTicket = 8;</code> + * @param value the sweepTicket to set + * @return this + */ + public StarTowerApplyResp setSweepTicket(final int value) { + bitField0_ |= 0x00000008; + sweepTicket = value; + return this; + } + + /** + * <code>optional uint32 SweepTicketUndated = 9;</code> + * @return whether the sweepTicketUndated field is set + */ + public boolean hasSweepTicketUndated() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 SweepTicketUndated = 9;</code> + * @return this + */ + public StarTowerApplyResp clearSweepTicketUndated() { + bitField0_ &= ~0x00000010; + sweepTicketUndated = 0; + return this; + } + + /** + * <code>optional uint32 SweepTicketUndated = 9;</code> + * @return the sweepTicketUndated + */ + public int getSweepTicketUndated() { + return sweepTicketUndated; + } + + /** + * <code>optional uint32 SweepTicketUndated = 9;</code> + * @param value the sweepTicketUndated to set + * @return this + */ + public StarTowerApplyResp setSweepTicketUndated(final int value) { + bitField0_ |= 0x00000010; + sweepTicketUndated = value; + return this; + } + + /** + * <code>optional bool NewFateCard = 7;</code> + * @return whether the newFateCard field is set + */ + public boolean hasNewFateCard() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bool NewFateCard = 7;</code> + * @return this + */ + public StarTowerApplyResp clearNewFateCard() { + bitField0_ &= ~0x00000020; + newFateCard = false; + return this; + } + + /** + * <code>optional bool NewFateCard = 7;</code> + * @return the newFateCard + */ + public boolean getNewFateCard() { + return newFateCard; + } + + /** + * <code>optional bool NewFateCard = 7;</code> + * @param value the newFateCard to set + * @return this + */ + public StarTowerApplyResp setNewFateCard(final boolean value) { + bitField0_ |= 0x00000020; + newFateCard = value; + return this; + } + + /** + * <code>optional .StarTowerInfo Info = 1;</code> + * @return whether the info field is set + */ + public boolean hasInfo() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional .StarTowerInfo Info = 1;</code> + * @return this + */ + public StarTowerApplyResp clearInfo() { + bitField0_ &= ~0x00000040; + info.clear(); + return this; + } + + /** + * <code>optional .StarTowerInfo Info = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.StarTowerInfo getInfo() { + return info; + } + + /** + * <code>optional .StarTowerInfo Info = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.StarTowerInfo getMutableInfo() { + bitField0_ |= 0x00000040; + return info; + } + + /** + * <code>optional .StarTowerInfo Info = 1;</code> + * @param value the info to set + * @return this + */ + public StarTowerApplyResp setInfo(final PublicStarTower.StarTowerInfo value) { + bitField0_ |= 0x00000040; + info.copyFrom(value); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @return this + */ + public StarTowerApplyResp clearChange() { + bitField0_ &= ~0x00000080; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000080; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 15;</code> + * @param value the change to set + * @return this + */ + public StarTowerApplyResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000080; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerApplyResp clearNextPackage() { + bitField0_ &= ~0x00000100; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000100; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerApplyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000100; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerApplyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerApplyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 5;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 5;</code> + * @return this + */ + public StarTowerApplyResp clearInfos() { + bitField0_ &= ~0x00000200; + infos.clear(); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PublicStarTower.SubNoteSkillInfo> getInfos() { + return infos; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PublicStarTower.SubNoteSkillInfo> getMutableInfos() { + bitField0_ |= 0x00000200; + return infos; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 5;</code> + * @param value the infos to add + * @return this + */ + public StarTowerApplyResp addInfos(final PublicStarTower.SubNoteSkillInfo value) { + bitField0_ |= 0x00000200; + infos.add(value); + return this; + } + + /** + * <code>repeated .SubNoteSkillInfo Infos = 5;</code> + * @param values the infos to add + * @return this + */ + public StarTowerApplyResp addAllInfos(final PublicStarTower.SubNoteSkillInfo... values) { + bitField0_ |= 0x00000200; + infos.addAll(values); + return this; + } + + @Override + public StarTowerApplyResp copyFrom(final StarTowerApplyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lastId = other.lastId; + coinQty = other.coinQty; + fateCardId = other.fateCardId; + sweepTicket = other.sweepTicket; + sweepTicketUndated = other.sweepTicketUndated; + newFateCard = other.newFateCard; + info.copyFrom(other.info); + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public StarTowerApplyResp mergeFrom(final StarTowerApplyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLastId()) { + setLastId(other.lastId); + } + if (other.hasCoinQty()) { + setCoinQty(other.coinQty); + } + if (other.hasFateCardId()) { + setFateCardId(other.fateCardId); + } + if (other.hasSweepTicket()) { + setSweepTicket(other.sweepTicket); + } + if (other.hasSweepTicketUndated()) { + setSweepTicketUndated(other.sweepTicketUndated); + } + if (other.hasNewFateCard()) { + setNewFateCard(other.newFateCard); + } + if (other.hasInfo()) { + getMutableInfo().mergeFrom(other.info); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public StarTowerApplyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lastId = 0; + coinQty = 0; + fateCardId = 0; + sweepTicket = 0; + sweepTicketUndated = 0; + newFateCard = false; + info.clear(); + change.clear(); + nextPackage.clear(); + infos.clear(); + return this; + } + + @Override + public StarTowerApplyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + info.clearQuick(); + change.clearQuick(); + nextPackage.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerApplyResp)) { + return false; + } + StarTowerApplyResp other = (StarTowerApplyResp) o; + return bitField0_ == other.bitField0_ + && (!hasLastId() || lastId == other.lastId) + && (!hasCoinQty() || coinQty == other.coinQty) + && (!hasFateCardId() || fateCardId == other.fateCardId) + && (!hasSweepTicket() || sweepTicket == other.sweepTicket) + && (!hasSweepTicketUndated() || sweepTicketUndated == other.sweepTicketUndated) + && (!hasNewFateCard() || newFateCard == other.newFateCard) + && (!hasInfo() || info.equals(other.info)) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(lastId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(coinQty); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(fateCardId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(sweepTicket); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(sweepTicketUndated); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 56); + output.writeBoolNoTag(newFateCard); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(info); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(lastId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(coinQty); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(fateCardId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sweepTicket); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sweepTicketUndated); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(info); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerApplyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // lastId + lastId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // coinQty + coinQty = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // fateCardId + fateCardId = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // sweepTicket + sweepTicket = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // sweepTicketUndated + sweepTicketUndated = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // newFateCard + newFateCard = input.readBool(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // info + input.readMessage(info); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // change + input.readMessage(change); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000200; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.lastId, lastId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.coinQty, coinQty); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.fateCardId, fateCardId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.sweepTicket, sweepTicket); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.sweepTicketUndated, sweepTicketUndated); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBool(FieldNames.newFateCard, newFateCard); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeMessage(FieldNames.info, info); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public StarTowerApplyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2026030479: { + if (input.isAtField(FieldNames.lastId)) { + if (!input.trySkipNullValue()) { + lastId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1683598779: { + if (input.isAtField(FieldNames.coinQty)) { + if (!input.trySkipNullValue()) { + coinQty = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1656856567: { + if (input.isAtField(FieldNames.fateCardId)) { + if (!input.trySkipNullValue()) { + fateCardId = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 153570552: { + if (input.isAtField(FieldNames.sweepTicket)) { + if (!input.trySkipNullValue()) { + sweepTicket = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2051306341: { + if (input.isAtField(FieldNames.sweepTicketUndated)) { + if (!input.trySkipNullValue()) { + sweepTicketUndated = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -387463364: { + if (input.isAtField(FieldNames.newFateCard)) { + if (!input.trySkipNullValue()) { + newFateCard = input.readBool(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2283726: { + if (input.isAtField(FieldNames.info)) { + if (!input.trySkipNullValue()) { + input.readMessage(info); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerApplyResp clone() { + return new StarTowerApplyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerApplyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerApplyResp(), data).checkInitialized(); + } + + public static StarTowerApplyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerApplyResp(), input).checkInitialized(); + } + + public static StarTowerApplyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerApplyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerApplyResp messages + */ + public static MessageFactory<StarTowerApplyResp> getFactory() { + return StarTowerApplyRespFactory.INSTANCE; + } + + private enum StarTowerApplyRespFactory implements MessageFactory<StarTowerApplyResp> { + INSTANCE; + + @Override + public StarTowerApplyResp create() { + return StarTowerApplyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lastId = FieldName.forField("LastId"); + + static final FieldName coinQty = FieldName.forField("CoinQty"); + + static final FieldName fateCardId = FieldName.forField("FateCardId"); + + static final FieldName sweepTicket = FieldName.forField("SweepTicket"); + + static final FieldName sweepTicketUndated = FieldName.forField("SweepTicketUndated"); + + static final FieldName newFateCard = FieldName.forField("NewFateCard"); + + static final FieldName info = FieldName.forField("Info"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBookCharPotentialGet.java b/src/generated/main/emu/nebula/proto/StarTowerBookCharPotentialGet.java new file mode 100644 index 0000000..60e628c --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBookCharPotentialGet.java @@ -0,0 +1,542 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class StarTowerBookCharPotentialGet { + /** + * Protobuf type {@code StarTowerBookPotentialGetResp} + */ + public static final class StarTowerBookPotentialGetResp extends ProtoMessage<StarTowerBookPotentialGetResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + */ + private final RepeatedInt receivedIds = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .StarTowerBookPotential Potentials = 1;</code> + */ + private final RepeatedMessage<PublicStarTower.StarTowerBookPotential> potentials = RepeatedMessage.newEmptyInstance(PublicStarTower.StarTowerBookPotential.getFactory()); + + private StarTowerBookPotentialGetResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBookPotentialGetResp} + */ + public static StarTowerBookPotentialGetResp newInstance() { + return new StarTowerBookPotentialGetResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBookPotentialGetResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookPotentialGetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookPotentialGetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookPotentialGetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @return whether the receivedIds field is set + */ + public boolean hasReceivedIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @return this + */ + public StarTowerBookPotentialGetResp clearReceivedIds() { + bitField0_ &= ~0x00000002; + receivedIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReceivedIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getReceivedIds() { + return receivedIds; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableReceivedIds() { + bitField0_ |= 0x00000002; + return receivedIds; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @param value the receivedIds to add + * @return this + */ + public StarTowerBookPotentialGetResp addReceivedIds(final int value) { + bitField0_ |= 0x00000002; + receivedIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @param values the receivedIds to add + * @return this + */ + public StarTowerBookPotentialGetResp addAllReceivedIds(final int... values) { + bitField0_ |= 0x00000002; + receivedIds.addAll(values); + return this; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 1;</code> + * @return whether the potentials field is set + */ + public boolean hasPotentials() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 1;</code> + * @return this + */ + public StarTowerBookPotentialGetResp clearPotentials() { + bitField0_ &= ~0x00000004; + potentials.clear(); + return this; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePotentials()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PublicStarTower.StarTowerBookPotential> getPotentials() { + return potentials; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PublicStarTower.StarTowerBookPotential> getMutablePotentials() { + bitField0_ |= 0x00000004; + return potentials; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 1;</code> + * @param value the potentials to add + * @return this + */ + public StarTowerBookPotentialGetResp addPotentials( + final PublicStarTower.StarTowerBookPotential value) { + bitField0_ |= 0x00000004; + potentials.add(value); + return this; + } + + /** + * <code>repeated .StarTowerBookPotential Potentials = 1;</code> + * @param values the potentials to add + * @return this + */ + public StarTowerBookPotentialGetResp addAllPotentials( + final PublicStarTower.StarTowerBookPotential... values) { + bitField0_ |= 0x00000004; + potentials.addAll(values); + return this; + } + + @Override + public StarTowerBookPotentialGetResp copyFrom(final StarTowerBookPotentialGetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + receivedIds.copyFrom(other.receivedIds); + potentials.copyFrom(other.potentials); + } + return this; + } + + @Override + public StarTowerBookPotentialGetResp mergeFrom(final StarTowerBookPotentialGetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasReceivedIds()) { + getMutableReceivedIds().addAll(other.receivedIds); + } + if (other.hasPotentials()) { + getMutablePotentials().addAll(other.potentials); + } + return this; + } + + @Override + public StarTowerBookPotentialGetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + receivedIds.clear(); + potentials.clear(); + return this; + } + + @Override + public StarTowerBookPotentialGetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + receivedIds.clear(); + potentials.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookPotentialGetResp)) { + return false; + } + StarTowerBookPotentialGetResp other = (StarTowerBookPotentialGetResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasReceivedIds() || receivedIds.equals(other.receivedIds)) + && (!hasPotentials() || potentials.equals(other.potentials)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < receivedIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(receivedIds.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < potentials.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(potentials.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * receivedIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(receivedIds); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * potentials.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(potentials); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookPotentialGetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // receivedIds [packed=true] + input.readPackedUInt32(receivedIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // potentials + tag = input.readRepeatedMessage(potentials, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // receivedIds [packed=false] + tag = input.readRepeatedUInt32(receivedIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.receivedIds, receivedIds); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.potentials, potentials); + } + output.endObject(); + } + + @Override + public StarTowerBookPotentialGetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -435125001: { + if (input.isAtField(FieldNames.receivedIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(receivedIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1405493301: { + if (input.isAtField(FieldNames.potentials)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(potentials); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookPotentialGetResp clone() { + return new StarTowerBookPotentialGetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookPotentialGetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialGetResp(), data).checkInitialized(); + } + + public static StarTowerBookPotentialGetResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialGetResp(), input).checkInitialized(); + } + + public static StarTowerBookPotentialGetResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialGetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookPotentialGetResp messages + */ + public static MessageFactory<StarTowerBookPotentialGetResp> getFactory() { + return StarTowerBookPotentialGetRespFactory.INSTANCE; + } + + private enum StarTowerBookPotentialGetRespFactory implements MessageFactory<StarTowerBookPotentialGetResp> { + INSTANCE; + + @Override + public StarTowerBookPotentialGetResp create() { + return StarTowerBookPotentialGetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName receivedIds = FieldName.forField("ReceivedIds"); + + static final FieldName potentials = FieldName.forField("Potentials"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBookEventRewardReceive.java b/src/generated/main/emu/nebula/proto/StarTowerBookEventRewardReceive.java new file mode 100644 index 0000000..060fc9e --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBookEventRewardReceive.java @@ -0,0 +1,531 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class StarTowerBookEventRewardReceive { + /** + * Protobuf type {@code StarTowerBookEventRewardReceiveResp} + */ + public static final class StarTowerBookEventRewardReceiveResp extends ProtoMessage<StarTowerBookEventRewardReceiveResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + */ + private final RepeatedInt receivedIds = RepeatedInt.newEmptyInstance(); + + private StarTowerBookEventRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBookEventRewardReceiveResp} + */ + public static StarTowerBookEventRewardReceiveResp newInstance() { + return new StarTowerBookEventRewardReceiveResp(); + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public StarTowerBookEventRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public StarTowerBookEventRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBookEventRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookEventRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookEventRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookEventRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @return whether the receivedIds field is set + */ + public boolean hasReceivedIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @return this + */ + public StarTowerBookEventRewardReceiveResp clearReceivedIds() { + bitField0_ &= ~0x00000004; + receivedIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReceivedIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getReceivedIds() { + return receivedIds; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableReceivedIds() { + bitField0_ |= 0x00000004; + return receivedIds; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @param value the receivedIds to add + * @return this + */ + public StarTowerBookEventRewardReceiveResp addReceivedIds(final int value) { + bitField0_ |= 0x00000004; + receivedIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @param values the receivedIds to add + * @return this + */ + public StarTowerBookEventRewardReceiveResp addAllReceivedIds(final int... values) { + bitField0_ |= 0x00000004; + receivedIds.addAll(values); + return this; + } + + @Override + public StarTowerBookEventRewardReceiveResp copyFrom( + final StarTowerBookEventRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + receivedIds.copyFrom(other.receivedIds); + } + return this; + } + + @Override + public StarTowerBookEventRewardReceiveResp mergeFrom( + final StarTowerBookEventRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasReceivedIds()) { + getMutableReceivedIds().addAll(other.receivedIds); + } + return this; + } + + @Override + public StarTowerBookEventRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + receivedIds.clear(); + return this; + } + + @Override + public StarTowerBookEventRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + receivedIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookEventRewardReceiveResp)) { + return false; + } + StarTowerBookEventRewardReceiveResp other = (StarTowerBookEventRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasReceivedIds() || receivedIds.equals(other.receivedIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < receivedIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(receivedIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * receivedIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(receivedIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookEventRewardReceiveResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // receivedIds [packed=true] + input.readPackedUInt32(receivedIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // receivedIds [packed=false] + tag = input.readRepeatedUInt32(receivedIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.receivedIds, receivedIds); + } + output.endObject(); + } + + @Override + public StarTowerBookEventRewardReceiveResp mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -435125001: { + if (input.isAtField(FieldNames.receivedIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(receivedIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookEventRewardReceiveResp clone() { + return new StarTowerBookEventRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookEventRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookEventRewardReceiveResp(), data).checkInitialized(); + } + + public static StarTowerBookEventRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookEventRewardReceiveResp(), input).checkInitialized(); + } + + public static StarTowerBookEventRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookEventRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookEventRewardReceiveResp messages + */ + public static MessageFactory<StarTowerBookEventRewardReceiveResp> getFactory() { + return StarTowerBookEventRewardReceiveRespFactory.INSTANCE; + } + + private enum StarTowerBookEventRewardReceiveRespFactory implements MessageFactory<StarTowerBookEventRewardReceiveResp> { + INSTANCE; + + @Override + public StarTowerBookEventRewardReceiveResp create() { + return StarTowerBookEventRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName receivedIds = FieldName.forField("ReceivedIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBookPotentialBriefListGet.java b/src/generated/main/emu/nebula/proto/StarTowerBookPotentialBriefListGet.java new file mode 100644 index 0000000..1eb04e2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBookPotentialBriefListGet.java @@ -0,0 +1,425 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class StarTowerBookPotentialBriefListGet { + /** + * Protobuf type {@code StarTowerBookPotentialBriefListResp} + */ + public static final class StarTowerBookPotentialBriefListResp extends ProtoMessage<StarTowerBookPotentialBriefListResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StarTowerBookCharPotentialBrief Infos = 1;</code> + */ + private final RepeatedMessage<PublicStarTower.StarTowerBookCharPotentialBrief> infos = RepeatedMessage.newEmptyInstance(PublicStarTower.StarTowerBookCharPotentialBrief.getFactory()); + + private StarTowerBookPotentialBriefListResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBookPotentialBriefListResp} + */ + public static StarTowerBookPotentialBriefListResp newInstance() { + return new StarTowerBookPotentialBriefListResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBookPotentialBriefListResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookPotentialBriefListResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookPotentialBriefListResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookPotentialBriefListResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StarTowerBookCharPotentialBrief Infos = 1;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .StarTowerBookCharPotentialBrief Infos = 1;</code> + * @return this + */ + public StarTowerBookPotentialBriefListResp clearInfos() { + bitField0_ &= ~0x00000002; + infos.clear(); + return this; + } + + /** + * <code>repeated .StarTowerBookCharPotentialBrief Infos = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PublicStarTower.StarTowerBookCharPotentialBrief> getInfos() { + return infos; + } + + /** + * <code>repeated .StarTowerBookCharPotentialBrief Infos = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PublicStarTower.StarTowerBookCharPotentialBrief> getMutableInfos() { + bitField0_ |= 0x00000002; + return infos; + } + + /** + * <code>repeated .StarTowerBookCharPotentialBrief Infos = 1;</code> + * @param value the infos to add + * @return this + */ + public StarTowerBookPotentialBriefListResp addInfos( + final PublicStarTower.StarTowerBookCharPotentialBrief value) { + bitField0_ |= 0x00000002; + infos.add(value); + return this; + } + + /** + * <code>repeated .StarTowerBookCharPotentialBrief Infos = 1;</code> + * @param values the infos to add + * @return this + */ + public StarTowerBookPotentialBriefListResp addAllInfos( + final PublicStarTower.StarTowerBookCharPotentialBrief... values) { + bitField0_ |= 0x00000002; + infos.addAll(values); + return this; + } + + @Override + public StarTowerBookPotentialBriefListResp copyFrom( + final StarTowerBookPotentialBriefListResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public StarTowerBookPotentialBriefListResp mergeFrom( + final StarTowerBookPotentialBriefListResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public StarTowerBookPotentialBriefListResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clear(); + return this; + } + + @Override + public StarTowerBookPotentialBriefListResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookPotentialBriefListResp)) { + return false; + } + StarTowerBookPotentialBriefListResp other = (StarTowerBookPotentialBriefListResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookPotentialBriefListResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public StarTowerBookPotentialBriefListResp mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookPotentialBriefListResp clone() { + return new StarTowerBookPotentialBriefListResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookPotentialBriefListResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialBriefListResp(), data).checkInitialized(); + } + + public static StarTowerBookPotentialBriefListResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialBriefListResp(), input).checkInitialized(); + } + + public static StarTowerBookPotentialBriefListResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialBriefListResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookPotentialBriefListResp messages + */ + public static MessageFactory<StarTowerBookPotentialBriefListResp> getFactory() { + return StarTowerBookPotentialBriefListRespFactory.INSTANCE; + } + + private enum StarTowerBookPotentialBriefListRespFactory implements MessageFactory<StarTowerBookPotentialBriefListResp> { + INSTANCE; + + @Override + public StarTowerBookPotentialBriefListResp create() { + return StarTowerBookPotentialBriefListResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBookPotentialRewardReceive.java b/src/generated/main/emu/nebula/proto/StarTowerBookPotentialRewardReceive.java new file mode 100644 index 0000000..de76f7e --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBookPotentialRewardReceive.java @@ -0,0 +1,531 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class StarTowerBookPotentialRewardReceive { + /** + * Protobuf type {@code StarTowerBookPotentialRewardReceiveResp} + */ + public static final class StarTowerBookPotentialRewardReceiveResp extends ProtoMessage<StarTowerBookPotentialRewardReceiveResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + */ + private final RepeatedInt receivedIds = RepeatedInt.newEmptyInstance(); + + private StarTowerBookPotentialRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBookPotentialRewardReceiveResp} + */ + public static StarTowerBookPotentialRewardReceiveResp newInstance() { + return new StarTowerBookPotentialRewardReceiveResp(); + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @return whether the receivedIds field is set + */ + public boolean hasReceivedIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp clearReceivedIds() { + bitField0_ &= ~0x00000004; + receivedIds.clear(); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReceivedIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getReceivedIds() { + return receivedIds; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableReceivedIds() { + bitField0_ |= 0x00000004; + return receivedIds; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @param value the receivedIds to add + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp addReceivedIds(final int value) { + bitField0_ |= 0x00000004; + receivedIds.add(value); + return this; + } + + /** + * <code>repeated uint32 ReceivedIds = 2;</code> + * @param values the receivedIds to add + * @return this + */ + public StarTowerBookPotentialRewardReceiveResp addAllReceivedIds(final int... values) { + bitField0_ |= 0x00000004; + receivedIds.addAll(values); + return this; + } + + @Override + public StarTowerBookPotentialRewardReceiveResp copyFrom( + final StarTowerBookPotentialRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + receivedIds.copyFrom(other.receivedIds); + } + return this; + } + + @Override + public StarTowerBookPotentialRewardReceiveResp mergeFrom( + final StarTowerBookPotentialRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasReceivedIds()) { + getMutableReceivedIds().addAll(other.receivedIds); + } + return this; + } + + @Override + public StarTowerBookPotentialRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + receivedIds.clear(); + return this; + } + + @Override + public StarTowerBookPotentialRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + receivedIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBookPotentialRewardReceiveResp)) { + return false; + } + StarTowerBookPotentialRewardReceiveResp other = (StarTowerBookPotentialRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasReceivedIds() || receivedIds.equals(other.receivedIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < receivedIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(receivedIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * receivedIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(receivedIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBookPotentialRewardReceiveResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // receivedIds [packed=true] + input.readPackedUInt32(receivedIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // receivedIds [packed=false] + tag = input.readRepeatedUInt32(receivedIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.receivedIds, receivedIds); + } + output.endObject(); + } + + @Override + public StarTowerBookPotentialRewardReceiveResp mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -435125001: { + if (input.isAtField(FieldNames.receivedIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(receivedIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBookPotentialRewardReceiveResp clone() { + return new StarTowerBookPotentialRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBookPotentialRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialRewardReceiveResp(), data).checkInitialized(); + } + + public static StarTowerBookPotentialRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialRewardReceiveResp(), input).checkInitialized(); + } + + public static StarTowerBookPotentialRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBookPotentialRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBookPotentialRewardReceiveResp messages + */ + public static MessageFactory<StarTowerBookPotentialRewardReceiveResp> getFactory() { + return StarTowerBookPotentialRewardReceiveRespFactory.INSTANCE; + } + + private enum StarTowerBookPotentialRewardReceiveRespFactory implements MessageFactory<StarTowerBookPotentialRewardReceiveResp> { + INSTANCE; + + @Override + public StarTowerBookPotentialRewardReceiveResp create() { + return StarTowerBookPotentialRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName receivedIds = FieldName.forField("ReceivedIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBuildBriefListGet.java b/src/generated/main/emu/nebula/proto/StarTowerBuildBriefListGet.java new file mode 100644 index 0000000..aafa063 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBuildBriefListGet.java @@ -0,0 +1,421 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class StarTowerBuildBriefListGet { + /** + * Protobuf type {@code StarTowerBuildBriefListGetResp} + */ + public static final class StarTowerBuildBriefListGetResp extends ProtoMessage<StarTowerBuildBriefListGetResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StarTowerBuildBrief Briefs = 1;</code> + */ + private final RepeatedMessage<PublicStarTower.StarTowerBuildBrief> briefs = RepeatedMessage.newEmptyInstance(PublicStarTower.StarTowerBuildBrief.getFactory()); + + private StarTowerBuildBriefListGetResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildBriefListGetResp} + */ + public static StarTowerBuildBriefListGetResp newInstance() { + return new StarTowerBuildBriefListGetResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildBriefListGetResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildBriefListGetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildBriefListGetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildBriefListGetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StarTowerBuildBrief Briefs = 1;</code> + * @return whether the briefs field is set + */ + public boolean hasBriefs() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .StarTowerBuildBrief Briefs = 1;</code> + * @return this + */ + public StarTowerBuildBriefListGetResp clearBriefs() { + bitField0_ &= ~0x00000002; + briefs.clear(); + return this; + } + + /** + * <code>repeated .StarTowerBuildBrief Briefs = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBriefs()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PublicStarTower.StarTowerBuildBrief> getBriefs() { + return briefs; + } + + /** + * <code>repeated .StarTowerBuildBrief Briefs = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PublicStarTower.StarTowerBuildBrief> getMutableBriefs() { + bitField0_ |= 0x00000002; + return briefs; + } + + /** + * <code>repeated .StarTowerBuildBrief Briefs = 1;</code> + * @param value the briefs to add + * @return this + */ + public StarTowerBuildBriefListGetResp addBriefs( + final PublicStarTower.StarTowerBuildBrief value) { + bitField0_ |= 0x00000002; + briefs.add(value); + return this; + } + + /** + * <code>repeated .StarTowerBuildBrief Briefs = 1;</code> + * @param values the briefs to add + * @return this + */ + public StarTowerBuildBriefListGetResp addAllBriefs( + final PublicStarTower.StarTowerBuildBrief... values) { + bitField0_ |= 0x00000002; + briefs.addAll(values); + return this; + } + + @Override + public StarTowerBuildBriefListGetResp copyFrom(final StarTowerBuildBriefListGetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + briefs.copyFrom(other.briefs); + } + return this; + } + + @Override + public StarTowerBuildBriefListGetResp mergeFrom(final StarTowerBuildBriefListGetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBriefs()) { + getMutableBriefs().addAll(other.briefs); + } + return this; + } + + @Override + public StarTowerBuildBriefListGetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + briefs.clear(); + return this; + } + + @Override + public StarTowerBuildBriefListGetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + briefs.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildBriefListGetResp)) { + return false; + } + StarTowerBuildBriefListGetResp other = (StarTowerBuildBriefListGetResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBriefs() || briefs.equals(other.briefs)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < briefs.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(briefs.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * briefs.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(briefs); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildBriefListGetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // briefs + tag = input.readRepeatedMessage(briefs, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.briefs, briefs); + } + output.endObject(); + } + + @Override + public StarTowerBuildBriefListGetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1998033753: { + if (input.isAtField(FieldNames.briefs)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(briefs); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildBriefListGetResp clone() { + return new StarTowerBuildBriefListGetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildBriefListGetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildBriefListGetResp(), data).checkInitialized(); + } + + public static StarTowerBuildBriefListGetResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildBriefListGetResp(), input).checkInitialized(); + } + + public static StarTowerBuildBriefListGetResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildBriefListGetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildBriefListGetResp messages + */ + public static MessageFactory<StarTowerBuildBriefListGetResp> getFactory() { + return StarTowerBuildBriefListGetRespFactory.INSTANCE; + } + + private enum StarTowerBuildBriefListGetRespFactory implements MessageFactory<StarTowerBuildBriefListGetResp> { + INSTANCE; + + @Override + public StarTowerBuildBriefListGetResp create() { + return StarTowerBuildBriefListGetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName briefs = FieldName.forField("Briefs"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBuildDelete.java b/src/generated/main/emu/nebula/proto/StarTowerBuildDelete.java new file mode 100644 index 0000000..0a2ff17 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBuildDelete.java @@ -0,0 +1,893 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; + +public final class StarTowerBuildDelete { + /** + * Protobuf type {@code StarTowerBuildDeleteReq} + */ + public static final class StarTowerBuildDeleteReq extends ProtoMessage<StarTowerBuildDeleteReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 BuildIds = 1;</code> + */ + private final RepeatedLong buildIds = RepeatedLong.newEmptyInstance(); + + private StarTowerBuildDeleteReq() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildDeleteReq} + */ + public static StarTowerBuildDeleteReq newInstance() { + return new StarTowerBuildDeleteReq(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildDeleteReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildDeleteReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildDeleteReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildDeleteReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 1;</code> + * @return whether the buildIds field is set + */ + public boolean hasBuildIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint64 BuildIds = 1;</code> + * @return this + */ + public StarTowerBuildDeleteReq clearBuildIds() { + bitField0_ &= ~0x00000002; + buildIds.clear(); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBuildIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getBuildIds() { + return buildIds; + } + + /** + * <code>repeated uint64 BuildIds = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableBuildIds() { + bitField0_ |= 0x00000002; + return buildIds; + } + + /** + * <code>repeated uint64 BuildIds = 1;</code> + * @param value the buildIds to add + * @return this + */ + public StarTowerBuildDeleteReq addBuildIds(final long value) { + bitField0_ |= 0x00000002; + buildIds.add(value); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 1;</code> + * @param values the buildIds to add + * @return this + */ + public StarTowerBuildDeleteReq addAllBuildIds(final long... values) { + bitField0_ |= 0x00000002; + buildIds.addAll(values); + return this; + } + + @Override + public StarTowerBuildDeleteReq copyFrom(final StarTowerBuildDeleteReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + buildIds.copyFrom(other.buildIds); + } + return this; + } + + @Override + public StarTowerBuildDeleteReq mergeFrom(final StarTowerBuildDeleteReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBuildIds()) { + getMutableBuildIds().addAll(other.buildIds); + } + return this; + } + + @Override + public StarTowerBuildDeleteReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + buildIds.clear(); + return this; + } + + @Override + public StarTowerBuildDeleteReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + buildIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildDeleteReq)) { + return false; + } + StarTowerBuildDeleteReq other = (StarTowerBuildDeleteReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBuildIds() || buildIds.equals(other.buildIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < buildIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(buildIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * buildIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(buildIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildDeleteReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // buildIds [packed=true] + input.readPackedUInt64(buildIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // buildIds [packed=false] + tag = input.readRepeatedUInt64(buildIds, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt64(FieldNames.buildIds, buildIds); + } + output.endObject(); + } + + @Override + public StarTowerBuildDeleteReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1366033014: { + if (input.isAtField(FieldNames.buildIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(buildIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildDeleteReq clone() { + return new StarTowerBuildDeleteReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildDeleteReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildDeleteReq(), data).checkInitialized(); + } + + public static StarTowerBuildDeleteReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDeleteReq(), input).checkInitialized(); + } + + public static StarTowerBuildDeleteReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDeleteReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildDeleteReq messages + */ + public static MessageFactory<StarTowerBuildDeleteReq> getFactory() { + return StarTowerBuildDeleteReqFactory.INSTANCE; + } + + private enum StarTowerBuildDeleteReqFactory implements MessageFactory<StarTowerBuildDeleteReq> { + INSTANCE; + + @Override + public StarTowerBuildDeleteReq create() { + return StarTowerBuildDeleteReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName buildIds = FieldName.forField("BuildIds"); + } + } + + /** + * Protobuf type {@code StarTowerBuildDeleteResp} + */ + public static final class StarTowerBuildDeleteResp extends ProtoMessage<StarTowerBuildDeleteResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Ticket = 2;</code> + */ + private int ticket; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBuildDeleteResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildDeleteResp} + */ + public static StarTowerBuildDeleteResp newInstance() { + return new StarTowerBuildDeleteResp(); + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @return whether the ticket field is set + */ + public boolean hasTicket() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @return this + */ + public StarTowerBuildDeleteResp clearTicket() { + bitField0_ &= ~0x00000001; + ticket = 0; + return this; + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @return the ticket + */ + public int getTicket() { + return ticket; + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @param value the ticket to set + * @return this + */ + public StarTowerBuildDeleteResp setTicket(final int value) { + bitField0_ |= 0x00000001; + ticket = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public StarTowerBuildDeleteResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public StarTowerBuildDeleteResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildDeleteResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildDeleteResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildDeleteResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildDeleteResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBuildDeleteResp copyFrom(final StarTowerBuildDeleteResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + ticket = other.ticket; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildDeleteResp mergeFrom(final StarTowerBuildDeleteResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTicket()) { + setTicket(other.ticket); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildDeleteResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + ticket = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBuildDeleteResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildDeleteResp)) { + return false; + } + StarTowerBuildDeleteResp other = (StarTowerBuildDeleteResp) o; + return bitField0_ == other.bitField0_ + && (!hasTicket() || ticket == other.ticket) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(ticket); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(ticket); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildDeleteResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // ticket + ticket = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.ticket, ticket); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBuildDeleteResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1790093524: { + if (input.isAtField(FieldNames.ticket)) { + if (!input.trySkipNullValue()) { + ticket = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildDeleteResp clone() { + return new StarTowerBuildDeleteResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildDeleteResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildDeleteResp(), data).checkInitialized(); + } + + public static StarTowerBuildDeleteResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDeleteResp(), input).checkInitialized(); + } + + public static StarTowerBuildDeleteResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDeleteResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildDeleteResp messages + */ + public static MessageFactory<StarTowerBuildDeleteResp> getFactory() { + return StarTowerBuildDeleteRespFactory.INSTANCE; + } + + private enum StarTowerBuildDeleteRespFactory implements MessageFactory<StarTowerBuildDeleteResp> { + INSTANCE; + + @Override + public StarTowerBuildDeleteResp create() { + return StarTowerBuildDeleteResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName ticket = FieldName.forField("Ticket"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBuildDetailGet.java b/src/generated/main/emu/nebula/proto/StarTowerBuildDetailGet.java new file mode 100644 index 0000000..d876236 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBuildDetailGet.java @@ -0,0 +1,773 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class StarTowerBuildDetailGet { + /** + * Protobuf type {@code StarTowerBuildDetailGetReq} + */ + public static final class StarTowerBuildDetailGetReq extends ProtoMessage<StarTowerBuildDetailGetReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 1;</code> + */ + private long buildId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBuildDetailGetReq() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildDetailGetReq} + */ + public static StarTowerBuildDetailGetReq newInstance() { + return new StarTowerBuildDetailGetReq(); + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return this + */ + public StarTowerBuildDetailGetReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @param value the buildId to set + * @return this + */ + public StarTowerBuildDetailGetReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildDetailGetReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildDetailGetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildDetailGetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildDetailGetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBuildDetailGetReq copyFrom(final StarTowerBuildDetailGetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildDetailGetReq mergeFrom(final StarTowerBuildDetailGetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildDetailGetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBuildDetailGetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildDetailGetReq)) { + return false; + } + StarTowerBuildDetailGetReq other = (StarTowerBuildDetailGetReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildDetailGetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBuildDetailGetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildDetailGetReq clone() { + return new StarTowerBuildDetailGetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildDetailGetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetailGetReq(), data).checkInitialized(); + } + + public static StarTowerBuildDetailGetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetailGetReq(), input).checkInitialized(); + } + + public static StarTowerBuildDetailGetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetailGetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildDetailGetReq messages + */ + public static MessageFactory<StarTowerBuildDetailGetReq> getFactory() { + return StarTowerBuildDetailGetReqFactory.INSTANCE; + } + + private enum StarTowerBuildDetailGetReqFactory implements MessageFactory<StarTowerBuildDetailGetReq> { + INSTANCE; + + @Override + public StarTowerBuildDetailGetReq create() { + return StarTowerBuildDetailGetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerBuildDetailGetResp} + */ + public static final class StarTowerBuildDetailGetResp extends ProtoMessage<StarTowerBuildDetailGetResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .StarTowerBuildDetail Detail = 1;</code> + */ + private final PublicStarTower.StarTowerBuildDetail detail = PublicStarTower.StarTowerBuildDetail.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBuildDetailGetResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildDetailGetResp} + */ + public static StarTowerBuildDetailGetResp newInstance() { + return new StarTowerBuildDetailGetResp(); + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 1;</code> + * @return whether the detail field is set + */ + public boolean hasDetail() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 1;</code> + * @return this + */ + public StarTowerBuildDetailGetResp clearDetail() { + bitField0_ &= ~0x00000001; + detail.clear(); + return this; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDetail()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.StarTowerBuildDetail getDetail() { + return detail; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.StarTowerBuildDetail getMutableDetail() { + bitField0_ |= 0x00000001; + return detail; + } + + /** + * <code>optional .StarTowerBuildDetail Detail = 1;</code> + * @param value the detail to set + * @return this + */ + public StarTowerBuildDetailGetResp setDetail(final PublicStarTower.StarTowerBuildDetail value) { + bitField0_ |= 0x00000001; + detail.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildDetailGetResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildDetailGetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildDetailGetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildDetailGetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBuildDetailGetResp copyFrom(final StarTowerBuildDetailGetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + detail.copyFrom(other.detail); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildDetailGetResp mergeFrom(final StarTowerBuildDetailGetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDetail()) { + getMutableDetail().mergeFrom(other.detail); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildDetailGetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + detail.clear(); + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBuildDetailGetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + detail.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildDetailGetResp)) { + return false; + } + StarTowerBuildDetailGetResp other = (StarTowerBuildDetailGetResp) o; + return bitField0_ == other.bitField0_ + && (!hasDetail() || detail.equals(other.detail)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(detail); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(detail); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildDetailGetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // detail + input.readMessage(detail); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.detail, detail); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBuildDetailGetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2043610225: { + if (input.isAtField(FieldNames.detail)) { + if (!input.trySkipNullValue()) { + input.readMessage(detail); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildDetailGetResp clone() { + return new StarTowerBuildDetailGetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildDetailGetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetailGetResp(), data).checkInitialized(); + } + + public static StarTowerBuildDetailGetResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetailGetResp(), input).checkInitialized(); + } + + public static StarTowerBuildDetailGetResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildDetailGetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildDetailGetResp messages + */ + public static MessageFactory<StarTowerBuildDetailGetResp> getFactory() { + return StarTowerBuildDetailGetRespFactory.INSTANCE; + } + + private enum StarTowerBuildDetailGetRespFactory implements MessageFactory<StarTowerBuildDetailGetResp> { + INSTANCE; + + @Override + public StarTowerBuildDetailGetResp create() { + return StarTowerBuildDetailGetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName detail = FieldName.forField("Detail"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBuildLockUnlock.java b/src/generated/main/emu/nebula/proto/StarTowerBuildLockUnlock.java new file mode 100644 index 0000000..54eab5d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBuildLockUnlock.java @@ -0,0 +1,464 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class StarTowerBuildLockUnlock { + /** + * Protobuf type {@code StarTowerBuildLockUnlockReq} + */ + public static final class StarTowerBuildLockUnlockReq extends ProtoMessage<StarTowerBuildLockUnlockReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 1;</code> + */ + private long buildId; + + /** + * <code>optional bool Lock = 2;</code> + */ + private boolean lock; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBuildLockUnlockReq() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildLockUnlockReq} + */ + public static StarTowerBuildLockUnlockReq newInstance() { + return new StarTowerBuildLockUnlockReq(); + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return this + */ + public StarTowerBuildLockUnlockReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @param value the buildId to set + * @return this + */ + public StarTowerBuildLockUnlockReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional bool Lock = 2;</code> + * @return whether the lock field is set + */ + public boolean hasLock() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Lock = 2;</code> + * @return this + */ + public StarTowerBuildLockUnlockReq clearLock() { + bitField0_ &= ~0x00000002; + lock = false; + return this; + } + + /** + * <code>optional bool Lock = 2;</code> + * @return the lock + */ + public boolean getLock() { + return lock; + } + + /** + * <code>optional bool Lock = 2;</code> + * @param value the lock to set + * @return this + */ + public StarTowerBuildLockUnlockReq setLock(final boolean value) { + bitField0_ |= 0x00000002; + lock = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildLockUnlockReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildLockUnlockReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildLockUnlockReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildLockUnlockReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBuildLockUnlockReq copyFrom(final StarTowerBuildLockUnlockReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + lock = other.lock; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildLockUnlockReq mergeFrom(final StarTowerBuildLockUnlockReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasLock()) { + setLock(other.lock); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildLockUnlockReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + lock = false; + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBuildLockUnlockReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildLockUnlockReq)) { + return false; + } + StarTowerBuildLockUnlockReq other = (StarTowerBuildLockUnlockReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasLock() || lock == other.lock) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(lock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildLockUnlockReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // lock + lock = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.lock, lock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBuildLockUnlockReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2373963: { + if (input.isAtField(FieldNames.lock)) { + if (!input.trySkipNullValue()) { + lock = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildLockUnlockReq clone() { + return new StarTowerBuildLockUnlockReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildLockUnlockReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildLockUnlockReq(), data).checkInitialized(); + } + + public static StarTowerBuildLockUnlockReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildLockUnlockReq(), input).checkInitialized(); + } + + public static StarTowerBuildLockUnlockReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildLockUnlockReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildLockUnlockReq messages + */ + public static MessageFactory<StarTowerBuildLockUnlockReq> getFactory() { + return StarTowerBuildLockUnlockReqFactory.INSTANCE; + } + + private enum StarTowerBuildLockUnlockReqFactory implements MessageFactory<StarTowerBuildLockUnlockReq> { + INSTANCE; + + @Override + public StarTowerBuildLockUnlockReq create() { + return StarTowerBuildLockUnlockReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName lock = FieldName.forField("Lock"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBuildNameSet.java b/src/generated/main/emu/nebula/proto/StarTowerBuildNameSet.java new file mode 100644 index 0000000..45bb095 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBuildNameSet.java @@ -0,0 +1,493 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class StarTowerBuildNameSet { + /** + * Protobuf type {@code StarTowerBuildNameSetReq} + */ + public static final class StarTowerBuildNameSetReq extends ProtoMessage<StarTowerBuildNameSetReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 1;</code> + */ + private long buildId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string Name = 2;</code> + */ + private final Utf8String name = Utf8String.newEmptyInstance(); + + private StarTowerBuildNameSetReq() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildNameSetReq} + */ + public static StarTowerBuildNameSetReq newInstance() { + return new StarTowerBuildNameSetReq(); + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return this + */ + public StarTowerBuildNameSetReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 1;</code> + * @param value the buildId to set + * @return this + */ + public StarTowerBuildNameSetReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildNameSetReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildNameSetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildNameSetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildNameSetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string Name = 2;</code> + * @return whether the name field is set + */ + public boolean hasName() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional string Name = 2;</code> + * @return this + */ + public StarTowerBuildNameSetReq clearName() { + bitField0_ &= ~0x00000004; + name.clear(); + return this; + } + + /** + * <code>optional string Name = 2;</code> + * @return the name + */ + public String getName() { + return name.getString(); + } + + /** + * <code>optional string Name = 2;</code> + * @return internal {@code Utf8String} representation of name for reading + */ + public Utf8String getNameBytes() { + return this.name; + } + + /** + * <code>optional string Name = 2;</code> + * @return internal {@code Utf8String} representation of name for modifications + */ + public Utf8String getMutableNameBytes() { + bitField0_ |= 0x00000004; + return this.name; + } + + /** + * <code>optional string Name = 2;</code> + * @param value the name to set + * @return this + */ + public StarTowerBuildNameSetReq setName(final CharSequence value) { + bitField0_ |= 0x00000004; + name.copyFrom(value); + return this; + } + + /** + * <code>optional string Name = 2;</code> + * @param value the name to set + * @return this + */ + public StarTowerBuildNameSetReq setName(final Utf8String value) { + bitField0_ |= 0x00000004; + name.copyFrom(value); + return this; + } + + @Override + public StarTowerBuildNameSetReq copyFrom(final StarTowerBuildNameSetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + nextPackage.copyFrom(other.nextPackage); + name.copyFrom(other.name); + } + return this; + } + + @Override + public StarTowerBuildNameSetReq mergeFrom(final StarTowerBuildNameSetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasName()) { + getMutableNameBytes().copyFrom(other.name); + } + return this; + } + + @Override + public StarTowerBuildNameSetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + nextPackage.clear(); + name.clear(); + return this; + } + + @Override + public StarTowerBuildNameSetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + name.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildNameSetReq)) { + return false; + } + StarTowerBuildNameSetReq other = (StarTowerBuildNameSetReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasName() || name.equals(other.name)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(name); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(name); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildNameSetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // name + input.readString(name); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeString(FieldNames.name, name); + } + output.endObject(); + } + + @Override + public StarTowerBuildNameSetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2420395: { + if (input.isAtField(FieldNames.name)) { + if (!input.trySkipNullValue()) { + input.readString(name); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildNameSetReq clone() { + return new StarTowerBuildNameSetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildNameSetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildNameSetReq(), data).checkInitialized(); + } + + public static StarTowerBuildNameSetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildNameSetReq(), input).checkInitialized(); + } + + public static StarTowerBuildNameSetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildNameSetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildNameSetReq messages + */ + public static MessageFactory<StarTowerBuildNameSetReq> getFactory() { + return StarTowerBuildNameSetReqFactory.INSTANCE; + } + + private enum StarTowerBuildNameSetReqFactory implements MessageFactory<StarTowerBuildNameSetReq> { + INSTANCE; + + @Override + public StarTowerBuildNameSetReq create() { + return StarTowerBuildNameSetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName name = FieldName.forField("Name"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBuildPreferenceSet.java b/src/generated/main/emu/nebula/proto/StarTowerBuildPreferenceSet.java new file mode 100644 index 0000000..b556579 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBuildPreferenceSet.java @@ -0,0 +1,546 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; + +public final class StarTowerBuildPreferenceSet { + /** + * Protobuf type {@code StarTowerBuildPreferenceSetReq} + */ + public static final class StarTowerBuildPreferenceSetReq extends ProtoMessage<StarTowerBuildPreferenceSetReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 CheckInIds = 1;</code> + */ + private final RepeatedLong checkInIds = RepeatedLong.newEmptyInstance(); + + /** + * <code>repeated uint64 CheckOutIds = 2;</code> + */ + private final RepeatedLong checkOutIds = RepeatedLong.newEmptyInstance(); + + private StarTowerBuildPreferenceSetReq() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildPreferenceSetReq} + */ + public static StarTowerBuildPreferenceSetReq newInstance() { + return new StarTowerBuildPreferenceSetReq(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildPreferenceSetReq clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildPreferenceSetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildPreferenceSetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildPreferenceSetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 CheckInIds = 1;</code> + * @return whether the checkInIds field is set + */ + public boolean hasCheckInIds() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint64 CheckInIds = 1;</code> + * @return this + */ + public StarTowerBuildPreferenceSetReq clearCheckInIds() { + bitField0_ &= ~0x00000002; + checkInIds.clear(); + return this; + } + + /** + * <code>repeated uint64 CheckInIds = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCheckInIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getCheckInIds() { + return checkInIds; + } + + /** + * <code>repeated uint64 CheckInIds = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableCheckInIds() { + bitField0_ |= 0x00000002; + return checkInIds; + } + + /** + * <code>repeated uint64 CheckInIds = 1;</code> + * @param value the checkInIds to add + * @return this + */ + public StarTowerBuildPreferenceSetReq addCheckInIds(final long value) { + bitField0_ |= 0x00000002; + checkInIds.add(value); + return this; + } + + /** + * <code>repeated uint64 CheckInIds = 1;</code> + * @param values the checkInIds to add + * @return this + */ + public StarTowerBuildPreferenceSetReq addAllCheckInIds(final long... values) { + bitField0_ |= 0x00000002; + checkInIds.addAll(values); + return this; + } + + /** + * <code>repeated uint64 CheckOutIds = 2;</code> + * @return whether the checkOutIds field is set + */ + public boolean hasCheckOutIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint64 CheckOutIds = 2;</code> + * @return this + */ + public StarTowerBuildPreferenceSetReq clearCheckOutIds() { + bitField0_ &= ~0x00000004; + checkOutIds.clear(); + return this; + } + + /** + * <code>repeated uint64 CheckOutIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCheckOutIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getCheckOutIds() { + return checkOutIds; + } + + /** + * <code>repeated uint64 CheckOutIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableCheckOutIds() { + bitField0_ |= 0x00000004; + return checkOutIds; + } + + /** + * <code>repeated uint64 CheckOutIds = 2;</code> + * @param value the checkOutIds to add + * @return this + */ + public StarTowerBuildPreferenceSetReq addCheckOutIds(final long value) { + bitField0_ |= 0x00000004; + checkOutIds.add(value); + return this; + } + + /** + * <code>repeated uint64 CheckOutIds = 2;</code> + * @param values the checkOutIds to add + * @return this + */ + public StarTowerBuildPreferenceSetReq addAllCheckOutIds(final long... values) { + bitField0_ |= 0x00000004; + checkOutIds.addAll(values); + return this; + } + + @Override + public StarTowerBuildPreferenceSetReq copyFrom(final StarTowerBuildPreferenceSetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + checkInIds.copyFrom(other.checkInIds); + checkOutIds.copyFrom(other.checkOutIds); + } + return this; + } + + @Override + public StarTowerBuildPreferenceSetReq mergeFrom(final StarTowerBuildPreferenceSetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCheckInIds()) { + getMutableCheckInIds().addAll(other.checkInIds); + } + if (other.hasCheckOutIds()) { + getMutableCheckOutIds().addAll(other.checkOutIds); + } + return this; + } + + @Override + public StarTowerBuildPreferenceSetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + checkInIds.clear(); + checkOutIds.clear(); + return this; + } + + @Override + public StarTowerBuildPreferenceSetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + checkInIds.clear(); + checkOutIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildPreferenceSetReq)) { + return false; + } + StarTowerBuildPreferenceSetReq other = (StarTowerBuildPreferenceSetReq) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCheckInIds() || checkInIds.equals(other.checkInIds)) + && (!hasCheckOutIds() || checkOutIds.equals(other.checkOutIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < checkInIds.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(checkInIds.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < checkOutIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(checkOutIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * checkInIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(checkInIds); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * checkOutIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(checkOutIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildPreferenceSetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // checkInIds [packed=true] + input.readPackedUInt64(checkInIds, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // checkOutIds [packed=true] + input.readPackedUInt64(checkOutIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // checkInIds [packed=false] + tag = input.readRepeatedUInt64(checkInIds, tag); + bitField0_ |= 0x00000002; + break; + } + case 16: { + // checkOutIds [packed=false] + tag = input.readRepeatedUInt64(checkOutIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt64(FieldNames.checkInIds, checkInIds); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt64(FieldNames.checkOutIds, checkOutIds); + } + output.endObject(); + } + + @Override + public StarTowerBuildPreferenceSetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1454616395: { + if (input.isAtField(FieldNames.checkInIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(checkInIds); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1972037742: { + if (input.isAtField(FieldNames.checkOutIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(checkOutIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildPreferenceSetReq clone() { + return new StarTowerBuildPreferenceSetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildPreferenceSetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildPreferenceSetReq(), data).checkInitialized(); + } + + public static StarTowerBuildPreferenceSetReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildPreferenceSetReq(), input).checkInitialized(); + } + + public static StarTowerBuildPreferenceSetReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildPreferenceSetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildPreferenceSetReq messages + */ + public static MessageFactory<StarTowerBuildPreferenceSetReq> getFactory() { + return StarTowerBuildPreferenceSetReqFactory.INSTANCE; + } + + private enum StarTowerBuildPreferenceSetReqFactory implements MessageFactory<StarTowerBuildPreferenceSetReq> { + INSTANCE; + + @Override + public StarTowerBuildPreferenceSetReq create() { + return StarTowerBuildPreferenceSetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName checkInIds = FieldName.forField("CheckInIds"); + + static final FieldName checkOutIds = FieldName.forField("CheckOutIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerBuildWhetherSave.java b/src/generated/main/emu/nebula/proto/StarTowerBuildWhetherSave.java new file mode 100644 index 0000000..8c630af --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerBuildWhetherSave.java @@ -0,0 +1,1126 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.Utf8String; + +public final class StarTowerBuildWhetherSave { + /** + * Protobuf type {@code StarTowerBuildWhetherSaveReq} + */ + public static final class StarTowerBuildWhetherSaveReq extends ProtoMessage<StarTowerBuildWhetherSaveReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool Delete = 1;</code> + */ + private boolean delete; + + /** + * <code>optional bool Lock = 2;</code> + */ + private boolean lock; + + /** + * <code>optional bool Preference = 3;</code> + */ + private boolean preference; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string BuildName = 4;</code> + */ + private final Utf8String buildName = Utf8String.newEmptyInstance(); + + private StarTowerBuildWhetherSaveReq() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildWhetherSaveReq} + */ + public static StarTowerBuildWhetherSaveReq newInstance() { + return new StarTowerBuildWhetherSaveReq(); + } + + /** + * <code>optional bool Delete = 1;</code> + * @return whether the delete field is set + */ + public boolean hasDelete() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool Delete = 1;</code> + * @return this + */ + public StarTowerBuildWhetherSaveReq clearDelete() { + bitField0_ &= ~0x00000001; + delete = false; + return this; + } + + /** + * <code>optional bool Delete = 1;</code> + * @return the delete + */ + public boolean getDelete() { + return delete; + } + + /** + * <code>optional bool Delete = 1;</code> + * @param value the delete to set + * @return this + */ + public StarTowerBuildWhetherSaveReq setDelete(final boolean value) { + bitField0_ |= 0x00000001; + delete = value; + return this; + } + + /** + * <code>optional bool Lock = 2;</code> + * @return whether the lock field is set + */ + public boolean hasLock() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Lock = 2;</code> + * @return this + */ + public StarTowerBuildWhetherSaveReq clearLock() { + bitField0_ &= ~0x00000002; + lock = false; + return this; + } + + /** + * <code>optional bool Lock = 2;</code> + * @return the lock + */ + public boolean getLock() { + return lock; + } + + /** + * <code>optional bool Lock = 2;</code> + * @param value the lock to set + * @return this + */ + public StarTowerBuildWhetherSaveReq setLock(final boolean value) { + bitField0_ |= 0x00000002; + lock = value; + return this; + } + + /** + * <code>optional bool Preference = 3;</code> + * @return whether the preference field is set + */ + public boolean hasPreference() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bool Preference = 3;</code> + * @return this + */ + public StarTowerBuildWhetherSaveReq clearPreference() { + bitField0_ &= ~0x00000004; + preference = false; + return this; + } + + /** + * <code>optional bool Preference = 3;</code> + * @return the preference + */ + public boolean getPreference() { + return preference; + } + + /** + * <code>optional bool Preference = 3;</code> + * @param value the preference to set + * @return this + */ + public StarTowerBuildWhetherSaveReq setPreference(final boolean value) { + bitField0_ |= 0x00000004; + preference = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildWhetherSaveReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildWhetherSaveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildWhetherSaveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildWhetherSaveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string BuildName = 4;</code> + * @return whether the buildName field is set + */ + public boolean hasBuildName() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional string BuildName = 4;</code> + * @return this + */ + public StarTowerBuildWhetherSaveReq clearBuildName() { + bitField0_ &= ~0x00000010; + buildName.clear(); + return this; + } + + /** + * <code>optional string BuildName = 4;</code> + * @return the buildName + */ + public String getBuildName() { + return buildName.getString(); + } + + /** + * <code>optional string BuildName = 4;</code> + * @return internal {@code Utf8String} representation of buildName for reading + */ + public Utf8String getBuildNameBytes() { + return this.buildName; + } + + /** + * <code>optional string BuildName = 4;</code> + * @return internal {@code Utf8String} representation of buildName for modifications + */ + public Utf8String getMutableBuildNameBytes() { + bitField0_ |= 0x00000010; + return this.buildName; + } + + /** + * <code>optional string BuildName = 4;</code> + * @param value the buildName to set + * @return this + */ + public StarTowerBuildWhetherSaveReq setBuildName(final CharSequence value) { + bitField0_ |= 0x00000010; + buildName.copyFrom(value); + return this; + } + + /** + * <code>optional string BuildName = 4;</code> + * @param value the buildName to set + * @return this + */ + public StarTowerBuildWhetherSaveReq setBuildName(final Utf8String value) { + bitField0_ |= 0x00000010; + buildName.copyFrom(value); + return this; + } + + @Override + public StarTowerBuildWhetherSaveReq copyFrom(final StarTowerBuildWhetherSaveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + delete = other.delete; + lock = other.lock; + preference = other.preference; + nextPackage.copyFrom(other.nextPackage); + buildName.copyFrom(other.buildName); + } + return this; + } + + @Override + public StarTowerBuildWhetherSaveReq mergeFrom(final StarTowerBuildWhetherSaveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDelete()) { + setDelete(other.delete); + } + if (other.hasLock()) { + setLock(other.lock); + } + if (other.hasPreference()) { + setPreference(other.preference); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBuildName()) { + getMutableBuildNameBytes().copyFrom(other.buildName); + } + return this; + } + + @Override + public StarTowerBuildWhetherSaveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + delete = false; + lock = false; + preference = false; + nextPackage.clear(); + buildName.clear(); + return this; + } + + @Override + public StarTowerBuildWhetherSaveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + buildName.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildWhetherSaveReq)) { + return false; + } + StarTowerBuildWhetherSaveReq other = (StarTowerBuildWhetherSaveReq) o; + return bitField0_ == other.bitField0_ + && (!hasDelete() || delete == other.delete) + && (!hasLock() || lock == other.lock) + && (!hasPreference() || preference == other.preference) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBuildName() || buildName.equals(other.buildName)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(delete); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(lock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(preference); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 34); + output.writeStringNoTag(buildName); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(buildName); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildWhetherSaveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // delete + delete = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // lock + lock = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // preference + preference = input.readBool(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // buildName + input.readString(buildName); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.delete, delete); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.lock, lock); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBool(FieldNames.preference, preference); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeString(FieldNames.buildName, buildName); + } + output.endObject(); + } + + @Override + public StarTowerBuildWhetherSaveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2043376075: { + if (input.isAtField(FieldNames.delete)) { + if (!input.trySkipNullValue()) { + delete = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2373963: { + if (input.isAtField(FieldNames.lock)) { + if (!input.trySkipNullValue()) { + lock = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 533633275: { + if (input.isAtField(FieldNames.preference)) { + if (!input.trySkipNullValue()) { + preference = input.readBool(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 602795513: { + if (input.isAtField(FieldNames.buildName)) { + if (!input.trySkipNullValue()) { + input.readString(buildName); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildWhetherSaveReq clone() { + return new StarTowerBuildWhetherSaveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildWhetherSaveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildWhetherSaveReq(), data).checkInitialized(); + } + + public static StarTowerBuildWhetherSaveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildWhetherSaveReq(), input).checkInitialized(); + } + + public static StarTowerBuildWhetherSaveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildWhetherSaveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildWhetherSaveReq messages + */ + public static MessageFactory<StarTowerBuildWhetherSaveReq> getFactory() { + return StarTowerBuildWhetherSaveReqFactory.INSTANCE; + } + + private enum StarTowerBuildWhetherSaveReqFactory implements MessageFactory<StarTowerBuildWhetherSaveReq> { + INSTANCE; + + @Override + public StarTowerBuildWhetherSaveReq create() { + return StarTowerBuildWhetherSaveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName delete = FieldName.forField("Delete"); + + static final FieldName lock = FieldName.forField("Lock"); + + static final FieldName preference = FieldName.forField("Preference"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName buildName = FieldName.forField("BuildName"); + } + } + + /** + * Protobuf type {@code StarTowerBuildWhetherSaveResp} + */ + public static final class StarTowerBuildWhetherSaveResp extends ProtoMessage<StarTowerBuildWhetherSaveResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Ticket = 2;</code> + */ + private int ticket; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerBuildWhetherSaveResp() { + } + + /** + * @return a new empty instance of {@code StarTowerBuildWhetherSaveResp} + */ + public static StarTowerBuildWhetherSaveResp newInstance() { + return new StarTowerBuildWhetherSaveResp(); + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @return whether the ticket field is set + */ + public boolean hasTicket() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @return this + */ + public StarTowerBuildWhetherSaveResp clearTicket() { + bitField0_ &= ~0x00000001; + ticket = 0; + return this; + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @return the ticket + */ + public int getTicket() { + return ticket; + } + + /** + * <code>optional uint32 Ticket = 2;</code> + * @param value the ticket to set + * @return this + */ + public StarTowerBuildWhetherSaveResp setTicket(final int value) { + bitField0_ |= 0x00000001; + ticket = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public StarTowerBuildWhetherSaveResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public StarTowerBuildWhetherSaveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerBuildWhetherSaveResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerBuildWhetherSaveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerBuildWhetherSaveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerBuildWhetherSaveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerBuildWhetherSaveResp copyFrom(final StarTowerBuildWhetherSaveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + ticket = other.ticket; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildWhetherSaveResp mergeFrom(final StarTowerBuildWhetherSaveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTicket()) { + setTicket(other.ticket); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerBuildWhetherSaveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + ticket = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public StarTowerBuildWhetherSaveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerBuildWhetherSaveResp)) { + return false; + } + StarTowerBuildWhetherSaveResp other = (StarTowerBuildWhetherSaveResp) o; + return bitField0_ == other.bitField0_ + && (!hasTicket() || ticket == other.ticket) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(ticket); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(ticket); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerBuildWhetherSaveResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // ticket + ticket = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.ticket, ticket); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerBuildWhetherSaveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1790093524: { + if (input.isAtField(FieldNames.ticket)) { + if (!input.trySkipNullValue()) { + ticket = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerBuildWhetherSaveResp clone() { + return new StarTowerBuildWhetherSaveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerBuildWhetherSaveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerBuildWhetherSaveResp(), data).checkInitialized(); + } + + public static StarTowerBuildWhetherSaveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildWhetherSaveResp(), input).checkInitialized(); + } + + public static StarTowerBuildWhetherSaveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new StarTowerBuildWhetherSaveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerBuildWhetherSaveResp messages + */ + public static MessageFactory<StarTowerBuildWhetherSaveResp> getFactory() { + return StarTowerBuildWhetherSaveRespFactory.INSTANCE; + } + + private enum StarTowerBuildWhetherSaveRespFactory implements MessageFactory<StarTowerBuildWhetherSaveResp> { + INSTANCE; + + @Override + public StarTowerBuildWhetherSaveResp create() { + return StarTowerBuildWhetherSaveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName ticket = FieldName.forField("Ticket"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerGiveUp.java b/src/generated/main/emu/nebula/proto/StarTowerGiveUp.java new file mode 100644 index 0000000..219059b --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerGiveUp.java @@ -0,0 +1,1174 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; +import us.hebi.quickbuf.RepeatedMessage; + +public final class StarTowerGiveUp { + /** + * Protobuf type {@code StarTowerGiveUpResp} + */ + public static final class StarTowerGiveUpResp extends ProtoMessage<StarTowerGiveUpResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 NpcInteraction = 4;</code> + */ + private int npcInteraction; + + /** + * <code>optional uint32 Floor = 12;</code> + */ + private int floor; + + /** + * <code>optional uint32 PotentialCnt = 13;</code> + */ + private int potentialCnt; + + /** + * <code>optional uint32 TotalTime = 14;</code> + */ + private int totalTime; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + */ + private final PublicStarTower.StarTowerBuildInfo build = PublicStarTower.StarTowerBuildInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + */ + private final RepeatedLong totalDamages = RepeatedLong.newEmptyInstance(); + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 3;</code> + */ + private final RepeatedMessage<PublicStarTower.NPCAffinityLevelReward> reward = RepeatedMessage.newEmptyInstance(PublicStarTower.NPCAffinityLevelReward.getFactory()); + + /** + * <code>repeated .ItemTpl TowerRewards = 5;</code> + */ + private final RepeatedMessage<Public.ItemTpl> towerRewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private StarTowerGiveUpResp() { + } + + /** + * @return a new empty instance of {@code StarTowerGiveUpResp} + */ + public static StarTowerGiveUpResp newInstance() { + return new StarTowerGiveUpResp(); + } + + /** + * <code>optional uint32 NpcInteraction = 4;</code> + * @return whether the npcInteraction field is set + */ + public boolean hasNpcInteraction() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 NpcInteraction = 4;</code> + * @return this + */ + public StarTowerGiveUpResp clearNpcInteraction() { + bitField0_ &= ~0x00000001; + npcInteraction = 0; + return this; + } + + /** + * <code>optional uint32 NpcInteraction = 4;</code> + * @return the npcInteraction + */ + public int getNpcInteraction() { + return npcInteraction; + } + + /** + * <code>optional uint32 NpcInteraction = 4;</code> + * @param value the npcInteraction to set + * @return this + */ + public StarTowerGiveUpResp setNpcInteraction(final int value) { + bitField0_ |= 0x00000001; + npcInteraction = value; + return this; + } + + /** + * <code>optional uint32 Floor = 12;</code> + * @return whether the floor field is set + */ + public boolean hasFloor() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Floor = 12;</code> + * @return this + */ + public StarTowerGiveUpResp clearFloor() { + bitField0_ &= ~0x00000002; + floor = 0; + return this; + } + + /** + * <code>optional uint32 Floor = 12;</code> + * @return the floor + */ + public int getFloor() { + return floor; + } + + /** + * <code>optional uint32 Floor = 12;</code> + * @param value the floor to set + * @return this + */ + public StarTowerGiveUpResp setFloor(final int value) { + bitField0_ |= 0x00000002; + floor = value; + return this; + } + + /** + * <code>optional uint32 PotentialCnt = 13;</code> + * @return whether the potentialCnt field is set + */ + public boolean hasPotentialCnt() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 PotentialCnt = 13;</code> + * @return this + */ + public StarTowerGiveUpResp clearPotentialCnt() { + bitField0_ &= ~0x00000004; + potentialCnt = 0; + return this; + } + + /** + * <code>optional uint32 PotentialCnt = 13;</code> + * @return the potentialCnt + */ + public int getPotentialCnt() { + return potentialCnt; + } + + /** + * <code>optional uint32 PotentialCnt = 13;</code> + * @param value the potentialCnt to set + * @return this + */ + public StarTowerGiveUpResp setPotentialCnt(final int value) { + bitField0_ |= 0x00000004; + potentialCnt = value; + return this; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return whether the totalTime field is set + */ + public boolean hasTotalTime() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return this + */ + public StarTowerGiveUpResp clearTotalTime() { + bitField0_ &= ~0x00000008; + totalTime = 0; + return this; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @return the totalTime + */ + public int getTotalTime() { + return totalTime; + } + + /** + * <code>optional uint32 TotalTime = 14;</code> + * @param value the totalTime to set + * @return this + */ + public StarTowerGiveUpResp setTotalTime(final int value) { + bitField0_ |= 0x00000008; + totalTime = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public StarTowerGiveUpResp clearChange() { + bitField0_ &= ~0x00000010; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000010; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public StarTowerGiveUpResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000010; + change.copyFrom(value); + return this; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * @return whether the build field is set + */ + public boolean hasBuild() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * @return this + */ + public StarTowerGiveUpResp clearBuild() { + bitField0_ &= ~0x00000020; + build.clear(); + return this; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBuild()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.StarTowerBuildInfo getBuild() { + return build; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.StarTowerBuildInfo getMutableBuild() { + bitField0_ |= 0x00000020; + return build; + } + + /** + * <code>optional .StarTowerBuildInfo Build = 2;</code> + * @param value the build to set + * @return this + */ + public StarTowerGiveUpResp setBuild(final PublicStarTower.StarTowerBuildInfo value) { + bitField0_ |= 0x00000020; + build.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerGiveUpResp clearNextPackage() { + bitField0_ &= ~0x00000040; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000040; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerGiveUpResp addNextPackage(final byte value) { + bitField0_ |= 0x00000040; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerGiveUpResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerGiveUpResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @return whether the totalDamages field is set + */ + public boolean hasTotalDamages() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @return this + */ + public StarTowerGiveUpResp clearTotalDamages() { + bitField0_ &= ~0x00000080; + totalDamages.clear(); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTotalDamages()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getTotalDamages() { + return totalDamages; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableTotalDamages() { + bitField0_ |= 0x00000080; + return totalDamages; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @param value the totalDamages to add + * @return this + */ + public StarTowerGiveUpResp addTotalDamages(final long value) { + bitField0_ |= 0x00000080; + totalDamages.add(value); + return this; + } + + /** + * <code>repeated uint64 TotalDamages = 15;</code> + * @param values the totalDamages to add + * @return this + */ + public StarTowerGiveUpResp addAllTotalDamages(final long... values) { + bitField0_ |= 0x00000080; + totalDamages.addAll(values); + return this; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 3;</code> + * @return whether the reward field is set + */ + public boolean hasReward() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 3;</code> + * @return this + */ + public StarTowerGiveUpResp clearReward() { + bitField0_ &= ~0x00000100; + reward.clear(); + return this; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PublicStarTower.NPCAffinityLevelReward> getReward() { + return reward; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PublicStarTower.NPCAffinityLevelReward> getMutableReward() { + bitField0_ |= 0x00000100; + return reward; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 3;</code> + * @param value the reward to add + * @return this + */ + public StarTowerGiveUpResp addReward(final PublicStarTower.NPCAffinityLevelReward value) { + bitField0_ |= 0x00000100; + reward.add(value); + return this; + } + + /** + * <code>repeated .NPCAffinityLevelReward Reward = 3;</code> + * @param values the reward to add + * @return this + */ + public StarTowerGiveUpResp addAllReward( + final PublicStarTower.NPCAffinityLevelReward... values) { + bitField0_ |= 0x00000100; + reward.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 5;</code> + * @return whether the towerRewards field is set + */ + public boolean hasTowerRewards() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 5;</code> + * @return this + */ + public StarTowerGiveUpResp clearTowerRewards() { + bitField0_ &= ~0x00000200; + towerRewards.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTowerRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getTowerRewards() { + return towerRewards; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableTowerRewards() { + bitField0_ |= 0x00000200; + return towerRewards; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 5;</code> + * @param value the towerRewards to add + * @return this + */ + public StarTowerGiveUpResp addTowerRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000200; + towerRewards.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl TowerRewards = 5;</code> + * @param values the towerRewards to add + * @return this + */ + public StarTowerGiveUpResp addAllTowerRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000200; + towerRewards.addAll(values); + return this; + } + + @Override + public StarTowerGiveUpResp copyFrom(final StarTowerGiveUpResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + npcInteraction = other.npcInteraction; + floor = other.floor; + potentialCnt = other.potentialCnt; + totalTime = other.totalTime; + change.copyFrom(other.change); + build.copyFrom(other.build); + nextPackage.copyFrom(other.nextPackage); + totalDamages.copyFrom(other.totalDamages); + reward.copyFrom(other.reward); + towerRewards.copyFrom(other.towerRewards); + } + return this; + } + + @Override + public StarTowerGiveUpResp mergeFrom(final StarTowerGiveUpResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNpcInteraction()) { + setNpcInteraction(other.npcInteraction); + } + if (other.hasFloor()) { + setFloor(other.floor); + } + if (other.hasPotentialCnt()) { + setPotentialCnt(other.potentialCnt); + } + if (other.hasTotalTime()) { + setTotalTime(other.totalTime); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasBuild()) { + getMutableBuild().mergeFrom(other.build); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasTotalDamages()) { + getMutableTotalDamages().addAll(other.totalDamages); + } + if (other.hasReward()) { + getMutableReward().addAll(other.reward); + } + if (other.hasTowerRewards()) { + getMutableTowerRewards().addAll(other.towerRewards); + } + return this; + } + + @Override + public StarTowerGiveUpResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + npcInteraction = 0; + floor = 0; + potentialCnt = 0; + totalTime = 0; + change.clear(); + build.clear(); + nextPackage.clear(); + totalDamages.clear(); + reward.clear(); + towerRewards.clear(); + return this; + } + + @Override + public StarTowerGiveUpResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + build.clearQuick(); + nextPackage.clear(); + totalDamages.clear(); + reward.clearQuick(); + towerRewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerGiveUpResp)) { + return false; + } + StarTowerGiveUpResp other = (StarTowerGiveUpResp) o; + return bitField0_ == other.bitField0_ + && (!hasNpcInteraction() || npcInteraction == other.npcInteraction) + && (!hasFloor() || floor == other.floor) + && (!hasPotentialCnt() || potentialCnt == other.potentialCnt) + && (!hasTotalTime() || totalTime == other.totalTime) + && (!hasChange() || change.equals(other.change)) + && (!hasBuild() || build.equals(other.build)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasTotalDamages() || totalDamages.equals(other.totalDamages)) + && (!hasReward() || reward.equals(other.reward)) + && (!hasTowerRewards() || towerRewards.equals(other.towerRewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(npcInteraction); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(floor); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 104); + output.writeUInt32NoTag(potentialCnt); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 112); + output.writeUInt32NoTag(totalTime); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(build); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000080) != 0) { + for (int i = 0; i < totalDamages.length(); i++) { + output.writeRawByte((byte) 120); + output.writeUInt64NoTag(totalDamages.array()[i]); + } + } + if ((bitField0_ & 0x00000100) != 0) { + for (int i = 0; i < reward.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(reward.get(i)); + } + } + if ((bitField0_ & 0x00000200) != 0) { + for (int i = 0; i < towerRewards.length(); i++) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(towerRewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(npcInteraction); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(floor); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(potentialCnt); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(totalTime); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(build); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000080) != 0) { + size += (1 * totalDamages.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(totalDamages); + } + if ((bitField0_ & 0x00000100) != 0) { + size += (1 * reward.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(reward); + } + if ((bitField0_ & 0x00000200) != 0) { + size += (1 * towerRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(towerRewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerGiveUpResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 32: { + // npcInteraction + npcInteraction = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 96) { + break; + } + } + case 96: { + // floor + floor = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 104) { + break; + } + } + case 104: { + // potentialCnt + potentialCnt = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 112) { + break; + } + } + case 112: { + // totalTime + totalTime = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // build + input.readMessage(build); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // totalDamages [packed=true] + input.readPackedUInt64(totalDamages, tag); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // reward + tag = input.readRepeatedMessage(reward, tag); + bitField0_ |= 0x00000100; + if (tag != 42) { + break; + } + } + case 42: { + // towerRewards + tag = input.readRepeatedMessage(towerRewards, tag); + bitField0_ |= 0x00000200; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 120: { + // totalDamages [packed=false] + tag = input.readRepeatedUInt64(totalDamages, tag); + bitField0_ |= 0x00000080; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.npcInteraction, npcInteraction); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.floor, floor); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.potentialCnt, potentialCnt); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.totalTime, totalTime); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.build, build); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRepeatedUInt64(FieldNames.totalDamages, totalDamages); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRepeatedMessage(FieldNames.reward, reward); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRepeatedMessage(FieldNames.towerRewards, towerRewards); + } + output.endObject(); + } + + @Override + public StarTowerGiveUpResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -168972143: { + if (input.isAtField(FieldNames.npcInteraction)) { + if (!input.trySkipNullValue()) { + npcInteraction = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67974124: { + if (input.isAtField(FieldNames.floor)) { + if (!input.trySkipNullValue()) { + floor = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2059288715: { + if (input.isAtField(FieldNames.potentialCnt)) { + if (!input.trySkipNullValue()) { + potentialCnt = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1426685969: { + if (input.isAtField(FieldNames.totalTime)) { + if (!input.trySkipNullValue()) { + totalTime = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64542286: { + if (input.isAtField(FieldNames.build)) { + if (!input.trySkipNullValue()) { + input.readMessage(build); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2138865888: { + if (input.isAtField(FieldNames.totalDamages)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(totalDamages); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1850459313: { + if (input.isAtField(FieldNames.reward)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(reward); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 162549755: { + if (input.isAtField(FieldNames.towerRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(towerRewards); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerGiveUpResp clone() { + return new StarTowerGiveUpResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerGiveUpResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerGiveUpResp(), data).checkInitialized(); + } + + public static StarTowerGiveUpResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerGiveUpResp(), input).checkInitialized(); + } + + public static StarTowerGiveUpResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerGiveUpResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerGiveUpResp messages + */ + public static MessageFactory<StarTowerGiveUpResp> getFactory() { + return StarTowerGiveUpRespFactory.INSTANCE; + } + + private enum StarTowerGiveUpRespFactory implements MessageFactory<StarTowerGiveUpResp> { + INSTANCE; + + @Override + public StarTowerGiveUpResp create() { + return StarTowerGiveUpResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName npcInteraction = FieldName.forField("NpcInteraction"); + + static final FieldName floor = FieldName.forField("Floor"); + + static final FieldName potentialCnt = FieldName.forField("PotentialCnt"); + + static final FieldName totalTime = FieldName.forField("TotalTime"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName build = FieldName.forField("Build"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName totalDamages = FieldName.forField("TotalDamages"); + + static final FieldName reward = FieldName.forField("Reward"); + + static final FieldName towerRewards = FieldName.forField("TowerRewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerInfo.java b/src/generated/main/emu/nebula/proto/StarTowerInfo.java new file mode 100644 index 0000000..a6643ac --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerInfo.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class StarTowerInfo { +} diff --git a/src/generated/main/emu/nebula/proto/StarTowerInteract.java b/src/generated/main/emu/nebula/proto/StarTowerInteract.java new file mode 100644 index 0000000..45514c2 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StarTowerInteract.java @@ -0,0 +1,2181 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class StarTowerInteract { + /** + * Protobuf type {@code StarTowerInteractReq} + */ + public static final class StarTowerInteractReq extends ProtoMessage<StarTowerInteractReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional .InteractEnterReq EnterReq = 2;</code> + */ + private final PublicStarTower.InteractEnterReq enterReq = PublicStarTower.InteractEnterReq.newInstance(); + + /** + * <code>optional .InteractBattleEndReq BattleEndReq = 3;</code> + */ + private final PublicStarTower.InteractBattleEndReq battleEndReq = PublicStarTower.InteractBattleEndReq.newInstance(); + + /** + * <code>optional .InteractSelectReq SelectReq = 4;</code> + */ + private final PublicStarTower.InteractSelectReq selectReq = PublicStarTower.InteractSelectReq.newInstance(); + + /** + * <code>optional .InteractRecoveryHPReq RecoveryHPReq = 5;</code> + */ + private final PublicStarTower.InteractRecoveryHPReq recoveryHPReq = PublicStarTower.InteractRecoveryHPReq.newInstance(); + + /** + * <code>optional .InteractHawkerReq HawkerReq = 6;</code> + */ + private final PublicStarTower.InteractHawkerReq hawkerReq = PublicStarTower.InteractHawkerReq.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StarTowerInteractReq() { + } + + /** + * @return a new empty instance of {@code StarTowerInteractReq} + */ + public static StarTowerInteractReq newInstance() { + return new StarTowerInteractReq(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerInteractReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerInteractReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional .InteractEnterReq EnterReq = 2;</code> + * @return whether the enterReq field is set + */ + public boolean hasEnterReq() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .InteractEnterReq EnterReq = 2;</code> + * @return this + */ + public StarTowerInteractReq clearEnterReq() { + bitField0_ &= ~0x00000002; + enterReq.clear(); + return this; + } + + /** + * <code>optional .InteractEnterReq EnterReq = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEnterReq()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractEnterReq getEnterReq() { + return enterReq; + } + + /** + * <code>optional .InteractEnterReq EnterReq = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractEnterReq getMutableEnterReq() { + bitField0_ |= 0x00000002; + return enterReq; + } + + /** + * <code>optional .InteractEnterReq EnterReq = 2;</code> + * @param value the enterReq to set + * @return this + */ + public StarTowerInteractReq setEnterReq(final PublicStarTower.InteractEnterReq value) { + bitField0_ |= 0x00000002; + enterReq.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractBattleEndReq BattleEndReq = 3;</code> + * @return whether the battleEndReq field is set + */ + public boolean hasBattleEndReq() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .InteractBattleEndReq BattleEndReq = 3;</code> + * @return this + */ + public StarTowerInteractReq clearBattleEndReq() { + bitField0_ &= ~0x00000004; + battleEndReq.clear(); + return this; + } + + /** + * <code>optional .InteractBattleEndReq BattleEndReq = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBattleEndReq()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractBattleEndReq getBattleEndReq() { + return battleEndReq; + } + + /** + * <code>optional .InteractBattleEndReq BattleEndReq = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractBattleEndReq getMutableBattleEndReq() { + bitField0_ |= 0x00000004; + return battleEndReq; + } + + /** + * <code>optional .InteractBattleEndReq BattleEndReq = 3;</code> + * @param value the battleEndReq to set + * @return this + */ + public StarTowerInteractReq setBattleEndReq(final PublicStarTower.InteractBattleEndReq value) { + bitField0_ |= 0x00000004; + battleEndReq.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractSelectReq SelectReq = 4;</code> + * @return whether the selectReq field is set + */ + public boolean hasSelectReq() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .InteractSelectReq SelectReq = 4;</code> + * @return this + */ + public StarTowerInteractReq clearSelectReq() { + bitField0_ &= ~0x00000008; + selectReq.clear(); + return this; + } + + /** + * <code>optional .InteractSelectReq SelectReq = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectReq()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractSelectReq getSelectReq() { + return selectReq; + } + + /** + * <code>optional .InteractSelectReq SelectReq = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractSelectReq getMutableSelectReq() { + bitField0_ |= 0x00000008; + return selectReq; + } + + /** + * <code>optional .InteractSelectReq SelectReq = 4;</code> + * @param value the selectReq to set + * @return this + */ + public StarTowerInteractReq setSelectReq(final PublicStarTower.InteractSelectReq value) { + bitField0_ |= 0x00000008; + selectReq.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractRecoveryHPReq RecoveryHPReq = 5;</code> + * @return whether the recoveryHPReq field is set + */ + public boolean hasRecoveryHPReq() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional .InteractRecoveryHPReq RecoveryHPReq = 5;</code> + * @return this + */ + public StarTowerInteractReq clearRecoveryHPReq() { + bitField0_ &= ~0x00000010; + recoveryHPReq.clear(); + return this; + } + + /** + * <code>optional .InteractRecoveryHPReq RecoveryHPReq = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRecoveryHPReq()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractRecoveryHPReq getRecoveryHPReq() { + return recoveryHPReq; + } + + /** + * <code>optional .InteractRecoveryHPReq RecoveryHPReq = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractRecoveryHPReq getMutableRecoveryHPReq() { + bitField0_ |= 0x00000010; + return recoveryHPReq; + } + + /** + * <code>optional .InteractRecoveryHPReq RecoveryHPReq = 5;</code> + * @param value the recoveryHPReq to set + * @return this + */ + public StarTowerInteractReq setRecoveryHPReq( + final PublicStarTower.InteractRecoveryHPReq value) { + bitField0_ |= 0x00000010; + recoveryHPReq.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractHawkerReq HawkerReq = 6;</code> + * @return whether the hawkerReq field is set + */ + public boolean hasHawkerReq() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional .InteractHawkerReq HawkerReq = 6;</code> + * @return this + */ + public StarTowerInteractReq clearHawkerReq() { + bitField0_ &= ~0x00000020; + hawkerReq.clear(); + return this; + } + + /** + * <code>optional .InteractHawkerReq HawkerReq = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHawkerReq()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractHawkerReq getHawkerReq() { + return hawkerReq; + } + + /** + * <code>optional .InteractHawkerReq HawkerReq = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractHawkerReq getMutableHawkerReq() { + bitField0_ |= 0x00000020; + return hawkerReq; + } + + /** + * <code>optional .InteractHawkerReq HawkerReq = 6;</code> + * @param value the hawkerReq to set + * @return this + */ + public StarTowerInteractReq setHawkerReq(final PublicStarTower.InteractHawkerReq value) { + bitField0_ |= 0x00000020; + hawkerReq.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerInteractReq clearNextPackage() { + bitField0_ &= ~0x00000040; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000040; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerInteractReq addNextPackage(final byte value) { + bitField0_ |= 0x00000040; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerInteractReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerInteractReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000040; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StarTowerInteractReq copyFrom(final StarTowerInteractReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + enterReq.copyFrom(other.enterReq); + battleEndReq.copyFrom(other.battleEndReq); + selectReq.copyFrom(other.selectReq); + recoveryHPReq.copyFrom(other.recoveryHPReq); + hawkerReq.copyFrom(other.hawkerReq); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerInteractReq mergeFrom(final StarTowerInteractReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasEnterReq()) { + getMutableEnterReq().mergeFrom(other.enterReq); + } + if (other.hasBattleEndReq()) { + getMutableBattleEndReq().mergeFrom(other.battleEndReq); + } + if (other.hasSelectReq()) { + getMutableSelectReq().mergeFrom(other.selectReq); + } + if (other.hasRecoveryHPReq()) { + getMutableRecoveryHPReq().mergeFrom(other.recoveryHPReq); + } + if (other.hasHawkerReq()) { + getMutableHawkerReq().mergeFrom(other.hawkerReq); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StarTowerInteractReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + enterReq.clear(); + battleEndReq.clear(); + selectReq.clear(); + recoveryHPReq.clear(); + hawkerReq.clear(); + nextPackage.clear(); + return this; + } + + @Override + public StarTowerInteractReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + enterReq.clearQuick(); + battleEndReq.clearQuick(); + selectReq.clearQuick(); + recoveryHPReq.clearQuick(); + hawkerReq.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerInteractReq)) { + return false; + } + StarTowerInteractReq other = (StarTowerInteractReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasEnterReq() || enterReq.equals(other.enterReq)) + && (!hasBattleEndReq() || battleEndReq.equals(other.battleEndReq)) + && (!hasSelectReq() || selectReq.equals(other.selectReq)) + && (!hasRecoveryHPReq() || recoveryHPReq.equals(other.recoveryHPReq)) + && (!hasHawkerReq() || hawkerReq.equals(other.hawkerReq)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(enterReq); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(battleEndReq); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(selectReq); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(recoveryHPReq); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(hawkerReq); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(enterReq); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(battleEndReq); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectReq); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(recoveryHPReq); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(hawkerReq); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerInteractReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // enterReq + input.readMessage(enterReq); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // battleEndReq + input.readMessage(battleEndReq); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // selectReq + input.readMessage(selectReq); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // recoveryHPReq + input.readMessage(recoveryHPReq); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // hawkerReq + input.readMessage(hawkerReq); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.enterReq, enterReq); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.battleEndReq, battleEndReq); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.selectReq, selectReq); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.recoveryHPReq, recoveryHPReq); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.hawkerReq, hawkerReq); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StarTowerInteractReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2041246010: { + if (input.isAtField(FieldNames.enterReq)) { + if (!input.trySkipNullValue()) { + input.readMessage(enterReq); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1955425467: { + if (input.isAtField(FieldNames.battleEndReq)) { + if (!input.trySkipNullValue()) { + input.readMessage(battleEndReq); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 287980002: { + if (input.isAtField(FieldNames.selectReq)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectReq); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1546231839: { + if (input.isAtField(FieldNames.recoveryHPReq)) { + if (!input.trySkipNullValue()) { + input.readMessage(recoveryHPReq); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1660004132: { + if (input.isAtField(FieldNames.hawkerReq)) { + if (!input.trySkipNullValue()) { + input.readMessage(hawkerReq); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerInteractReq clone() { + return new StarTowerInteractReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerInteractReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerInteractReq(), data).checkInitialized(); + } + + public static StarTowerInteractReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerInteractReq(), input).checkInitialized(); + } + + public static StarTowerInteractReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerInteractReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerInteractReq messages + */ + public static MessageFactory<StarTowerInteractReq> getFactory() { + return StarTowerInteractReqFactory.INSTANCE; + } + + private enum StarTowerInteractReqFactory implements MessageFactory<StarTowerInteractReq> { + INSTANCE; + + @Override + public StarTowerInteractReq create() { + return StarTowerInteractReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName enterReq = FieldName.forField("EnterReq"); + + static final FieldName battleEndReq = FieldName.forField("BattleEndReq"); + + static final FieldName selectReq = FieldName.forField("SelectReq"); + + static final FieldName recoveryHPReq = FieldName.forField("RecoveryHPReq"); + + static final FieldName hawkerReq = FieldName.forField("HawkerReq"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code StarTowerInteractResp} + */ + public static final class StarTowerInteractResp extends ProtoMessage<StarTowerInteractResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional .ChangeInfo Change = 3;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional .TowerChangeData Data = 4;</code> + */ + private final PublicStarTower.TowerChangeData data = PublicStarTower.TowerChangeData.newInstance(); + + /** + * <code>optional .InteractEnterResp EnterResp = 7;</code> + */ + private final PublicStarTower.InteractEnterResp enterResp = PublicStarTower.InteractEnterResp.newInstance(); + + /** + * <code>optional .InteractBattleEndResp BattleEndResp = 8;</code> + */ + private final PublicStarTower.InteractBattleEndResp battleEndResp = PublicStarTower.InteractBattleEndResp.newInstance(); + + /** + * <code>optional .InteractSelectResp SelectResp = 9;</code> + */ + private final PublicStarTower.InteractSelectResp selectResp = PublicStarTower.InteractSelectResp.newInstance(); + + /** + * <code>optional .InteractStrengthenMachineResp StrengthenMachineResp = 10;</code> + */ + private final PublicStarTower.InteractStrengthenMachineResp strengthenMachineResp = PublicStarTower.InteractStrengthenMachineResp.newInstance(); + + /** + * <code>optional .SettleDataResp Settle = 14;</code> + */ + private final PublicStarTower.SettleDataResp settle = PublicStarTower.SettleDataResp.newInstance(); + + /** + * <code>optional .Nil NilResp = 15;</code> + */ + private final Public.Nil nilResp = Public.Nil.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + */ + private final RepeatedMessage<PublicStarTower.StarTowerRoomCase> cases = RepeatedMessage.newEmptyInstance(PublicStarTower.StarTowerRoomCase.getFactory()); + + private StarTowerInteractResp() { + } + + /** + * @return a new empty instance of {@code StarTowerInteractResp} + */ + public static StarTowerInteractResp newInstance() { + return new StarTowerInteractResp(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public StarTowerInteractResp clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public StarTowerInteractResp setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @return this + */ + public StarTowerInteractResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 3;</code> + * @param value the change to set + * @return this + */ + public StarTowerInteractResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional .TowerChangeData Data = 4;</code> + * @return whether the data field is set + */ + public boolean hasData() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .TowerChangeData Data = 4;</code> + * @return this + */ + public StarTowerInteractResp clearData() { + bitField0_ &= ~0x00000004; + data.clear(); + return this; + } + + /** + * <code>optional .TowerChangeData Data = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableData()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.TowerChangeData getData() { + return data; + } + + /** + * <code>optional .TowerChangeData Data = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.TowerChangeData getMutableData() { + bitField0_ |= 0x00000004; + return data; + } + + /** + * <code>optional .TowerChangeData Data = 4;</code> + * @param value the data to set + * @return this + */ + public StarTowerInteractResp setData(final PublicStarTower.TowerChangeData value) { + bitField0_ |= 0x00000004; + data.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractEnterResp EnterResp = 7;</code> + * @return whether the enterResp field is set + */ + public boolean hasEnterResp() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .InteractEnterResp EnterResp = 7;</code> + * @return this + */ + public StarTowerInteractResp clearEnterResp() { + bitField0_ &= ~0x00000008; + enterResp.clear(); + return this; + } + + /** + * <code>optional .InteractEnterResp EnterResp = 7;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEnterResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractEnterResp getEnterResp() { + return enterResp; + } + + /** + * <code>optional .InteractEnterResp EnterResp = 7;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractEnterResp getMutableEnterResp() { + bitField0_ |= 0x00000008; + return enterResp; + } + + /** + * <code>optional .InteractEnterResp EnterResp = 7;</code> + * @param value the enterResp to set + * @return this + */ + public StarTowerInteractResp setEnterResp(final PublicStarTower.InteractEnterResp value) { + bitField0_ |= 0x00000008; + enterResp.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractBattleEndResp BattleEndResp = 8;</code> + * @return whether the battleEndResp field is set + */ + public boolean hasBattleEndResp() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional .InteractBattleEndResp BattleEndResp = 8;</code> + * @return this + */ + public StarTowerInteractResp clearBattleEndResp() { + bitField0_ &= ~0x00000010; + battleEndResp.clear(); + return this; + } + + /** + * <code>optional .InteractBattleEndResp BattleEndResp = 8;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBattleEndResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractBattleEndResp getBattleEndResp() { + return battleEndResp; + } + + /** + * <code>optional .InteractBattleEndResp BattleEndResp = 8;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractBattleEndResp getMutableBattleEndResp() { + bitField0_ |= 0x00000010; + return battleEndResp; + } + + /** + * <code>optional .InteractBattleEndResp BattleEndResp = 8;</code> + * @param value the battleEndResp to set + * @return this + */ + public StarTowerInteractResp setBattleEndResp( + final PublicStarTower.InteractBattleEndResp value) { + bitField0_ |= 0x00000010; + battleEndResp.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractSelectResp SelectResp = 9;</code> + * @return whether the selectResp field is set + */ + public boolean hasSelectResp() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional .InteractSelectResp SelectResp = 9;</code> + * @return this + */ + public StarTowerInteractResp clearSelectResp() { + bitField0_ &= ~0x00000020; + selectResp.clear(); + return this; + } + + /** + * <code>optional .InteractSelectResp SelectResp = 9;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelectResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractSelectResp getSelectResp() { + return selectResp; + } + + /** + * <code>optional .InteractSelectResp SelectResp = 9;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractSelectResp getMutableSelectResp() { + bitField0_ |= 0x00000020; + return selectResp; + } + + /** + * <code>optional .InteractSelectResp SelectResp = 9;</code> + * @param value the selectResp to set + * @return this + */ + public StarTowerInteractResp setSelectResp(final PublicStarTower.InteractSelectResp value) { + bitField0_ |= 0x00000020; + selectResp.copyFrom(value); + return this; + } + + /** + * <code>optional .InteractStrengthenMachineResp StrengthenMachineResp = 10;</code> + * @return whether the strengthenMachineResp field is set + */ + public boolean hasStrengthenMachineResp() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional .InteractStrengthenMachineResp StrengthenMachineResp = 10;</code> + * @return this + */ + public StarTowerInteractResp clearStrengthenMachineResp() { + bitField0_ &= ~0x00000040; + strengthenMachineResp.clear(); + return this; + } + + /** + * <code>optional .InteractStrengthenMachineResp StrengthenMachineResp = 10;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStrengthenMachineResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.InteractStrengthenMachineResp getStrengthenMachineResp() { + return strengthenMachineResp; + } + + /** + * <code>optional .InteractStrengthenMachineResp StrengthenMachineResp = 10;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.InteractStrengthenMachineResp getMutableStrengthenMachineResp() { + bitField0_ |= 0x00000040; + return strengthenMachineResp; + } + + /** + * <code>optional .InteractStrengthenMachineResp StrengthenMachineResp = 10;</code> + * @param value the strengthenMachineResp to set + * @return this + */ + public StarTowerInteractResp setStrengthenMachineResp( + final PublicStarTower.InteractStrengthenMachineResp value) { + bitField0_ |= 0x00000040; + strengthenMachineResp.copyFrom(value); + return this; + } + + /** + * <code>optional .SettleDataResp Settle = 14;</code> + * @return whether the settle field is set + */ + public boolean hasSettle() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional .SettleDataResp Settle = 14;</code> + * @return this + */ + public StarTowerInteractResp clearSettle() { + bitField0_ &= ~0x00000080; + settle.clear(); + return this; + } + + /** + * <code>optional .SettleDataResp Settle = 14;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSettle()} if you want to modify it. + * + * @return internal storage object for reading + */ + public PublicStarTower.SettleDataResp getSettle() { + return settle; + } + + /** + * <code>optional .SettleDataResp Settle = 14;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public PublicStarTower.SettleDataResp getMutableSettle() { + bitField0_ |= 0x00000080; + return settle; + } + + /** + * <code>optional .SettleDataResp Settle = 14;</code> + * @param value the settle to set + * @return this + */ + public StarTowerInteractResp setSettle(final PublicStarTower.SettleDataResp value) { + bitField0_ |= 0x00000080; + settle.copyFrom(value); + return this; + } + + /** + * <code>optional .Nil NilResp = 15;</code> + * @return whether the nilResp field is set + */ + public boolean hasNilResp() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional .Nil NilResp = 15;</code> + * @return this + */ + public StarTowerInteractResp clearNilResp() { + bitField0_ &= ~0x00000100; + nilResp.clear(); + return this; + } + + /** + * <code>optional .Nil NilResp = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNilResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Nil getNilResp() { + return nilResp; + } + + /** + * <code>optional .Nil NilResp = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Nil getMutableNilResp() { + bitField0_ |= 0x00000100; + return nilResp; + } + + /** + * <code>optional .Nil NilResp = 15;</code> + * @param value the nilResp to set + * @return this + */ + public StarTowerInteractResp setNilResp(final Public.Nil value) { + bitField0_ |= 0x00000100; + nilResp.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StarTowerInteractResp clearNextPackage() { + bitField0_ &= ~0x00000200; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000200; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StarTowerInteractResp addNextPackage(final byte value) { + bitField0_ |= 0x00000200; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StarTowerInteractResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StarTowerInteractResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @return whether the cases field is set + */ + public boolean hasCases() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @return this + */ + public StarTowerInteractResp clearCases() { + bitField0_ &= ~0x00000400; + cases.clear(); + return this; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCases()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<PublicStarTower.StarTowerRoomCase> getCases() { + return cases; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<PublicStarTower.StarTowerRoomCase> getMutableCases() { + bitField0_ |= 0x00000400; + return cases; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @param value the cases to add + * @return this + */ + public StarTowerInteractResp addCases(final PublicStarTower.StarTowerRoomCase value) { + bitField0_ |= 0x00000400; + cases.add(value); + return this; + } + + /** + * <code>repeated .StarTowerRoomCase Cases = 2;</code> + * @param values the cases to add + * @return this + */ + public StarTowerInteractResp addAllCases(final PublicStarTower.StarTowerRoomCase... values) { + bitField0_ |= 0x00000400; + cases.addAll(values); + return this; + } + + @Override + public StarTowerInteractResp copyFrom(final StarTowerInteractResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + change.copyFrom(other.change); + data.copyFrom(other.data); + enterResp.copyFrom(other.enterResp); + battleEndResp.copyFrom(other.battleEndResp); + selectResp.copyFrom(other.selectResp); + strengthenMachineResp.copyFrom(other.strengthenMachineResp); + settle.copyFrom(other.settle); + nilResp.copyFrom(other.nilResp); + nextPackage.copyFrom(other.nextPackage); + cases.copyFrom(other.cases); + } + return this; + } + + @Override + public StarTowerInteractResp mergeFrom(final StarTowerInteractResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasData()) { + getMutableData().mergeFrom(other.data); + } + if (other.hasEnterResp()) { + getMutableEnterResp().mergeFrom(other.enterResp); + } + if (other.hasBattleEndResp()) { + getMutableBattleEndResp().mergeFrom(other.battleEndResp); + } + if (other.hasSelectResp()) { + getMutableSelectResp().mergeFrom(other.selectResp); + } + if (other.hasStrengthenMachineResp()) { + getMutableStrengthenMachineResp().mergeFrom(other.strengthenMachineResp); + } + if (other.hasSettle()) { + getMutableSettle().mergeFrom(other.settle); + } + if (other.hasNilResp()) { + getMutableNilResp().mergeFrom(other.nilResp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCases()) { + getMutableCases().addAll(other.cases); + } + return this; + } + + @Override + public StarTowerInteractResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + change.clear(); + data.clear(); + enterResp.clear(); + battleEndResp.clear(); + selectResp.clear(); + strengthenMachineResp.clear(); + settle.clear(); + nilResp.clear(); + nextPackage.clear(); + cases.clear(); + return this; + } + + @Override + public StarTowerInteractResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + data.clearQuick(); + enterResp.clearQuick(); + battleEndResp.clearQuick(); + selectResp.clearQuick(); + strengthenMachineResp.clearQuick(); + settle.clearQuick(); + nilResp.clearQuick(); + nextPackage.clear(); + cases.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StarTowerInteractResp)) { + return false; + } + StarTowerInteractResp other = (StarTowerInteractResp) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasChange() || change.equals(other.change)) + && (!hasData() || data.equals(other.data)) + && (!hasEnterResp() || enterResp.equals(other.enterResp)) + && (!hasBattleEndResp() || battleEndResp.equals(other.battleEndResp)) + && (!hasSelectResp() || selectResp.equals(other.selectResp)) + && (!hasStrengthenMachineResp() || strengthenMachineResp.equals(other.strengthenMachineResp)) + && (!hasSettle() || settle.equals(other.settle)) + && (!hasNilResp() || nilResp.equals(other.nilResp)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCases() || cases.equals(other.cases)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(data); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(enterResp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(battleEndResp); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 74); + output.writeMessageNoTag(selectResp); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(strengthenMachineResp); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 114); + output.writeMessageNoTag(settle); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(nilResp); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + for (int i = 0; i < cases.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(cases.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(data); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(enterResp); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(battleEndResp); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(selectResp); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(strengthenMachineResp); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(settle); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(nilResp); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + size += (1 * cases.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(cases); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StarTowerInteractResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // data + input.readMessage(data); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // enterResp + input.readMessage(enterResp); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 66) { + break; + } + } + case 66: { + // battleEndResp + input.readMessage(battleEndResp); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 74) { + break; + } + } + case 74: { + // selectResp + input.readMessage(selectResp); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // strengthenMachineResp + input.readMessage(strengthenMachineResp); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 114) { + break; + } + } + case 114: { + // settle + input.readMessage(settle); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // nilResp + input.readMessage(nilResp); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // cases + tag = input.readRepeatedMessage(cases, tag); + bitField0_ |= 0x00000400; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.data, data); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.enterResp, enterResp); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.battleEndResp, battleEndResp); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.selectResp, selectResp); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeMessage(FieldNames.strengthenMachineResp, strengthenMachineResp); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeMessage(FieldNames.settle, settle); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeMessage(FieldNames.nilResp, nilResp); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRepeatedMessage(FieldNames.cases, cases); + } + output.endObject(); + } + + @Override + public StarTowerInteractResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2122698: { + if (input.isAtField(FieldNames.data)) { + if (!input.trySkipNullValue()) { + input.readMessage(data); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1145883304: { + if (input.isAtField(FieldNames.enterResp)) { + if (!input.trySkipNullValue()) { + input.readMessage(enterResp); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 488647507: { + if (input.isAtField(FieldNames.battleEndResp)) { + if (!input.trySkipNullValue()) { + input.readMessage(battleEndResp); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 337445644: { + if (input.isAtField(FieldNames.selectResp)) { + if (!input.trySkipNullValue()) { + input.readMessage(selectResp); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -788721267: { + if (input.isAtField(FieldNames.strengthenMachineResp)) { + if (!input.trySkipNullValue()) { + input.readMessage(strengthenMachineResp); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1821901461: { + if (input.isAtField(FieldNames.settle)) { + if (!input.trySkipNullValue()) { + input.readMessage(settle); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -680812191: { + if (input.isAtField(FieldNames.nilResp)) { + if (!input.trySkipNullValue()) { + input.readMessage(nilResp); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64879395: { + if (input.isAtField(FieldNames.cases)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(cases); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StarTowerInteractResp clone() { + return new StarTowerInteractResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StarTowerInteractResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StarTowerInteractResp(), data).checkInitialized(); + } + + public static StarTowerInteractResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerInteractResp(), input).checkInitialized(); + } + + public static StarTowerInteractResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StarTowerInteractResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StarTowerInteractResp messages + */ + public static MessageFactory<StarTowerInteractResp> getFactory() { + return StarTowerInteractRespFactory.INSTANCE; + } + + private enum StarTowerInteractRespFactory implements MessageFactory<StarTowerInteractResp> { + INSTANCE; + + @Override + public StarTowerInteractResp create() { + return StarTowerInteractResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName data = FieldName.forField("Data"); + + static final FieldName enterResp = FieldName.forField("EnterResp"); + + static final FieldName battleEndResp = FieldName.forField("BattleEndResp"); + + static final FieldName selectResp = FieldName.forField("SelectResp"); + + static final FieldName strengthenMachineResp = FieldName.forField("StrengthenMachineResp"); + + static final FieldName settle = FieldName.forField("Settle"); + + static final FieldName nilResp = FieldName.forField("NilResp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cases = FieldName.forField("Cases"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StoryApply.java b/src/generated/main/emu/nebula/proto/StoryApply.java new file mode 100644 index 0000000..ddc7ba5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StoryApply.java @@ -0,0 +1,462 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class StoryApply { + /** + * Protobuf type {@code StoryApplyReq} + */ + public static final class StoryApplyReq extends ProtoMessage<StoryApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 2;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Idx = 1;</code> + */ + private int idx; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StoryApplyReq() { + } + + /** + * @return a new empty instance of {@code StoryApplyReq} + */ + public static StoryApplyReq newInstance() { + return new StoryApplyReq(); + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return this + */ + public StoryApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @param value the buildId to set + * @return this + */ + public StoryApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return whether the idx field is set + */ + public boolean hasIdx() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return this + */ + public StoryApplyReq clearIdx() { + bitField0_ &= ~0x00000002; + idx = 0; + return this; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return the idx + */ + public int getIdx() { + return idx; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @param value the idx to set + * @return this + */ + public StoryApplyReq setIdx(final int value) { + bitField0_ |= 0x00000002; + idx = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StoryApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StoryApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StoryApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StoryApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StoryApplyReq copyFrom(final StoryApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + idx = other.idx; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StoryApplyReq mergeFrom(final StoryApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasIdx()) { + setIdx(other.idx); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StoryApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + idx = 0; + nextPackage.clear(); + return this; + } + + @Override + public StoryApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StoryApplyReq)) { + return false; + } + StoryApplyReq other = (StoryApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasIdx() || idx == other.idx) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(idx); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(idx); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StoryApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // idx + idx = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.idx, idx); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StoryApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73373: { + if (input.isAtField(FieldNames.idx)) { + if (!input.trySkipNullValue()) { + idx = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StoryApplyReq clone() { + return new StoryApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StoryApplyReq parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StoryApplyReq(), data).checkInitialized(); + } + + public static StoryApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryApplyReq(), input).checkInitialized(); + } + + public static StoryApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StoryApplyReq messages + */ + public static MessageFactory<StoryApplyReq> getFactory() { + return StoryApplyReqFactory.INSTANCE; + } + + private enum StoryApplyReqFactory implements MessageFactory<StoryApplyReq> { + INSTANCE; + + @Override + public StoryApplyReq create() { + return StoryApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName idx = FieldName.forField("Idx"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StorySetInfo.java b/src/generated/main/emu/nebula/proto/StorySetInfo.java new file mode 100644 index 0000000..6fd5c85 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StorySetInfo.java @@ -0,0 +1,986 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class StorySetInfo { + /** + * Protobuf type {@code StorySetInfoResp} + */ + public static final class StorySetInfoResp extends ProtoMessage<StorySetInfoResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StorySetChapter Chapters = 1;</code> + */ + private final RepeatedMessage<StorySetChapter> chapters = RepeatedMessage.newEmptyInstance(StorySetChapter.getFactory()); + + private StorySetInfoResp() { + } + + /** + * @return a new empty instance of {@code StorySetInfoResp} + */ + public static StorySetInfoResp newInstance() { + return new StorySetInfoResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StorySetInfoResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StorySetInfoResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StorySetInfoResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StorySetInfoResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StorySetChapter Chapters = 1;</code> + * @return whether the chapters field is set + */ + public boolean hasChapters() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .StorySetChapter Chapters = 1;</code> + * @return this + */ + public StorySetInfoResp clearChapters() { + bitField0_ &= ~0x00000002; + chapters.clear(); + return this; + } + + /** + * <code>repeated .StorySetChapter Chapters = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChapters()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StorySetChapter> getChapters() { + return chapters; + } + + /** + * <code>repeated .StorySetChapter Chapters = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StorySetChapter> getMutableChapters() { + bitField0_ |= 0x00000002; + return chapters; + } + + /** + * <code>repeated .StorySetChapter Chapters = 1;</code> + * @param value the chapters to add + * @return this + */ + public StorySetInfoResp addChapters(final StorySetChapter value) { + bitField0_ |= 0x00000002; + chapters.add(value); + return this; + } + + /** + * <code>repeated .StorySetChapter Chapters = 1;</code> + * @param values the chapters to add + * @return this + */ + public StorySetInfoResp addAllChapters(final StorySetChapter... values) { + bitField0_ |= 0x00000002; + chapters.addAll(values); + return this; + } + + @Override + public StorySetInfoResp copyFrom(final StorySetInfoResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + chapters.copyFrom(other.chapters); + } + return this; + } + + @Override + public StorySetInfoResp mergeFrom(final StorySetInfoResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasChapters()) { + getMutableChapters().addAll(other.chapters); + } + return this; + } + + @Override + public StorySetInfoResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chapters.clear(); + return this; + } + + @Override + public StorySetInfoResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chapters.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StorySetInfoResp)) { + return false; + } + StorySetInfoResp other = (StorySetInfoResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasChapters() || chapters.equals(other.chapters)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < chapters.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(chapters.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * chapters.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chapters); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StorySetInfoResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // chapters + tag = input.readRepeatedMessage(chapters, tag); + bitField0_ |= 0x00000002; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.chapters, chapters); + } + output.endObject(); + } + + @Override + public StorySetInfoResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1499296230: { + if (input.isAtField(FieldNames.chapters)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chapters); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StorySetInfoResp clone() { + return new StorySetInfoResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StorySetInfoResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StorySetInfoResp(), data).checkInitialized(); + } + + public static StorySetInfoResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySetInfoResp(), input).checkInitialized(); + } + + public static StorySetInfoResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySetInfoResp(), input).checkInitialized(); + } + + /** + * @return factory for creating StorySetInfoResp messages + */ + public static MessageFactory<StorySetInfoResp> getFactory() { + return StorySetInfoRespFactory.INSTANCE; + } + + private enum StorySetInfoRespFactory implements MessageFactory<StorySetInfoResp> { + INSTANCE; + + @Override + public StorySetInfoResp create() { + return StorySetInfoResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName chapters = FieldName.forField("Chapters"); + } + } + + /** + * Protobuf type {@code StorySetChapter} + */ + public static final class StorySetChapter extends ProtoMessage<StorySetChapter> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ChapterId = 1;</code> + */ + private int chapterId; + + /** + * <code>optional uint32 SectionIndex = 2;</code> + */ + private int sectionIndex; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 RewardedIds = 3;</code> + */ + private final RepeatedInt rewardedIds = RepeatedInt.newEmptyInstance(); + + private StorySetChapter() { + } + + /** + * @return a new empty instance of {@code StorySetChapter} + */ + public static StorySetChapter newInstance() { + return new StorySetChapter(); + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @return whether the chapterId field is set + */ + public boolean hasChapterId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @return this + */ + public StorySetChapter clearChapterId() { + bitField0_ &= ~0x00000001; + chapterId = 0; + return this; + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @return the chapterId + */ + public int getChapterId() { + return chapterId; + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @param value the chapterId to set + * @return this + */ + public StorySetChapter setChapterId(final int value) { + bitField0_ |= 0x00000001; + chapterId = value; + return this; + } + + /** + * <code>optional uint32 SectionIndex = 2;</code> + * @return whether the sectionIndex field is set + */ + public boolean hasSectionIndex() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 SectionIndex = 2;</code> + * @return this + */ + public StorySetChapter clearSectionIndex() { + bitField0_ &= ~0x00000002; + sectionIndex = 0; + return this; + } + + /** + * <code>optional uint32 SectionIndex = 2;</code> + * @return the sectionIndex + */ + public int getSectionIndex() { + return sectionIndex; + } + + /** + * <code>optional uint32 SectionIndex = 2;</code> + * @param value the sectionIndex to set + * @return this + */ + public StorySetChapter setSectionIndex(final int value) { + bitField0_ |= 0x00000002; + sectionIndex = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StorySetChapter clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StorySetChapter addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StorySetChapter addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StorySetChapter setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 RewardedIds = 3;</code> + * @return whether the rewardedIds field is set + */ + public boolean hasRewardedIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 RewardedIds = 3;</code> + * @return this + */ + public StorySetChapter clearRewardedIds() { + bitField0_ &= ~0x00000008; + rewardedIds.clear(); + return this; + } + + /** + * <code>repeated uint32 RewardedIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRewardedIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getRewardedIds() { + return rewardedIds; + } + + /** + * <code>repeated uint32 RewardedIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableRewardedIds() { + bitField0_ |= 0x00000008; + return rewardedIds; + } + + /** + * <code>repeated uint32 RewardedIds = 3;</code> + * @param value the rewardedIds to add + * @return this + */ + public StorySetChapter addRewardedIds(final int value) { + bitField0_ |= 0x00000008; + rewardedIds.add(value); + return this; + } + + /** + * <code>repeated uint32 RewardedIds = 3;</code> + * @param values the rewardedIds to add + * @return this + */ + public StorySetChapter addAllRewardedIds(final int... values) { + bitField0_ |= 0x00000008; + rewardedIds.addAll(values); + return this; + } + + @Override + public StorySetChapter copyFrom(final StorySetChapter other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + chapterId = other.chapterId; + sectionIndex = other.sectionIndex; + nextPackage.copyFrom(other.nextPackage); + rewardedIds.copyFrom(other.rewardedIds); + } + return this; + } + + @Override + public StorySetChapter mergeFrom(final StorySetChapter other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChapterId()) { + setChapterId(other.chapterId); + } + if (other.hasSectionIndex()) { + setSectionIndex(other.sectionIndex); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRewardedIds()) { + getMutableRewardedIds().addAll(other.rewardedIds); + } + return this; + } + + @Override + public StorySetChapter clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + chapterId = 0; + sectionIndex = 0; + nextPackage.clear(); + rewardedIds.clear(); + return this; + } + + @Override + public StorySetChapter clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + rewardedIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StorySetChapter)) { + return false; + } + StorySetChapter other = (StorySetChapter) o; + return bitField0_ == other.bitField0_ + && (!hasChapterId() || chapterId == other.chapterId) + && (!hasSectionIndex() || sectionIndex == other.sectionIndex) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRewardedIds() || rewardedIds.equals(other.rewardedIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(chapterId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(sectionIndex); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < rewardedIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(rewardedIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(chapterId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sectionIndex); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * rewardedIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(rewardedIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StorySetChapter mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // chapterId + chapterId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // sectionIndex + sectionIndex = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // rewardedIds [packed=true] + input.readPackedUInt32(rewardedIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // rewardedIds [packed=false] + tag = input.readRepeatedUInt32(rewardedIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.chapterId, chapterId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.sectionIndex, sectionIndex); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.rewardedIds, rewardedIds); + } + output.endObject(); + } + + @Override + public StorySetChapter mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -766458328: { + if (input.isAtField(FieldNames.chapterId)) { + if (!input.trySkipNullValue()) { + chapterId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 794334477: { + if (input.isAtField(FieldNames.sectionIndex)) { + if (!input.trySkipNullValue()) { + sectionIndex = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1723508822: { + if (input.isAtField(FieldNames.rewardedIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(rewardedIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StorySetChapter clone() { + return new StorySetChapter().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StorySetChapter parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StorySetChapter(), data).checkInitialized(); + } + + public static StorySetChapter parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySetChapter(), input).checkInitialized(); + } + + public static StorySetChapter parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySetChapter(), input).checkInitialized(); + } + + /** + * @return factory for creating StorySetChapter messages + */ + public static MessageFactory<StorySetChapter> getFactory() { + return StorySetChapterFactory.INSTANCE; + } + + private enum StorySetChapterFactory implements MessageFactory<StorySetChapter> { + INSTANCE; + + @Override + public StorySetChapter create() { + return StorySetChapter.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName chapterId = FieldName.forField("ChapterId"); + + static final FieldName sectionIndex = FieldName.forField("SectionIndex"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rewardedIds = FieldName.forField("RewardedIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StorySetRewardReceive.java b/src/generated/main/emu/nebula/proto/StorySetRewardReceive.java new file mode 100644 index 0000000..e8d302a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StorySetRewardReceive.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class StorySetRewardReceive { + /** + * Protobuf type {@code StorySetRewardReceiveReq} + */ + public static final class StorySetRewardReceiveReq extends ProtoMessage<StorySetRewardReceiveReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 ChapterId = 1;</code> + */ + private int chapterId; + + /** + * <code>optional uint32 SectionId = 2;</code> + */ + private int sectionId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StorySetRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code StorySetRewardReceiveReq} + */ + public static StorySetRewardReceiveReq newInstance() { + return new StorySetRewardReceiveReq(); + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @return whether the chapterId field is set + */ + public boolean hasChapterId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @return this + */ + public StorySetRewardReceiveReq clearChapterId() { + bitField0_ &= ~0x00000001; + chapterId = 0; + return this; + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @return the chapterId + */ + public int getChapterId() { + return chapterId; + } + + /** + * <code>optional uint32 ChapterId = 1;</code> + * @param value the chapterId to set + * @return this + */ + public StorySetRewardReceiveReq setChapterId(final int value) { + bitField0_ |= 0x00000001; + chapterId = value; + return this; + } + + /** + * <code>optional uint32 SectionId = 2;</code> + * @return whether the sectionId field is set + */ + public boolean hasSectionId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 SectionId = 2;</code> + * @return this + */ + public StorySetRewardReceiveReq clearSectionId() { + bitField0_ &= ~0x00000002; + sectionId = 0; + return this; + } + + /** + * <code>optional uint32 SectionId = 2;</code> + * @return the sectionId + */ + public int getSectionId() { + return sectionId; + } + + /** + * <code>optional uint32 SectionId = 2;</code> + * @param value the sectionId to set + * @return this + */ + public StorySetRewardReceiveReq setSectionId(final int value) { + bitField0_ |= 0x00000002; + sectionId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StorySetRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StorySetRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StorySetRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StorySetRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StorySetRewardReceiveReq copyFrom(final StorySetRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + chapterId = other.chapterId; + sectionId = other.sectionId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StorySetRewardReceiveReq mergeFrom(final StorySetRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChapterId()) { + setChapterId(other.chapterId); + } + if (other.hasSectionId()) { + setSectionId(other.sectionId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StorySetRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + chapterId = 0; + sectionId = 0; + nextPackage.clear(); + return this; + } + + @Override + public StorySetRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StorySetRewardReceiveReq)) { + return false; + } + StorySetRewardReceiveReq other = (StorySetRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasChapterId() || chapterId == other.chapterId) + && (!hasSectionId() || sectionId == other.sectionId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(chapterId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(sectionId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(chapterId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(sectionId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StorySetRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // chapterId + chapterId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // sectionId + sectionId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.chapterId, chapterId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.sectionId, sectionId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StorySetRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -766458328: { + if (input.isAtField(FieldNames.chapterId)) { + if (!input.trySkipNullValue()) { + chapterId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1325236928: { + if (input.isAtField(FieldNames.sectionId)) { + if (!input.trySkipNullValue()) { + sectionId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StorySetRewardReceiveReq clone() { + return new StorySetRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StorySetRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StorySetRewardReceiveReq(), data).checkInitialized(); + } + + public static StorySetRewardReceiveReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySetRewardReceiveReq(), input).checkInitialized(); + } + + public static StorySetRewardReceiveReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySetRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StorySetRewardReceiveReq messages + */ + public static MessageFactory<StorySetRewardReceiveReq> getFactory() { + return StorySetRewardReceiveReqFactory.INSTANCE; + } + + private enum StorySetRewardReceiveReqFactory implements MessageFactory<StorySetRewardReceiveReq> { + INSTANCE; + + @Override + public StorySetRewardReceiveReq create() { + return StorySetRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName chapterId = FieldName.forField("ChapterId"); + + static final FieldName sectionId = FieldName.forField("SectionId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/StorySett.java b/src/generated/main/emu/nebula/proto/StorySett.java new file mode 100644 index 0000000..71c0242 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/StorySett.java @@ -0,0 +1,1759 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class StorySett { + /** + * Protobuf type {@code StorySettle} + */ + public static final class StorySettle extends ProtoMessage<StorySettle> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Idx = 1;</code> + */ + private int idx; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .StoryOptions Major = 2;</code> + */ + private final RepeatedMessage<StoryOptions> major = RepeatedMessage.newEmptyInstance(StoryOptions.getFactory()); + + /** + * <code>repeated .StoryOptions Personality = 3;</code> + */ + private final RepeatedMessage<StoryOptions> personality = RepeatedMessage.newEmptyInstance(StoryOptions.getFactory()); + + private StorySettle() { + } + + /** + * @return a new empty instance of {@code StorySettle} + */ + public static StorySettle newInstance() { + return new StorySettle(); + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return whether the idx field is set + */ + public boolean hasIdx() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return this + */ + public StorySettle clearIdx() { + bitField0_ &= ~0x00000001; + idx = 0; + return this; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @return the idx + */ + public int getIdx() { + return idx; + } + + /** + * <code>optional uint32 Idx = 1;</code> + * @param value the idx to set + * @return this + */ + public StorySettle setIdx(final int value) { + bitField0_ |= 0x00000001; + idx = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StorySettle clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StorySettle addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StorySettle addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StorySettle setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .StoryOptions Major = 2;</code> + * @return whether the major field is set + */ + public boolean hasMajor() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .StoryOptions Major = 2;</code> + * @return this + */ + public StorySettle clearMajor() { + bitField0_ &= ~0x00000004; + major.clear(); + return this; + } + + /** + * <code>repeated .StoryOptions Major = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMajor()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StoryOptions> getMajor() { + return major; + } + + /** + * <code>repeated .StoryOptions Major = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StoryOptions> getMutableMajor() { + bitField0_ |= 0x00000004; + return major; + } + + /** + * <code>repeated .StoryOptions Major = 2;</code> + * @param value the major to add + * @return this + */ + public StorySettle addMajor(final StoryOptions value) { + bitField0_ |= 0x00000004; + major.add(value); + return this; + } + + /** + * <code>repeated .StoryOptions Major = 2;</code> + * @param values the major to add + * @return this + */ + public StorySettle addAllMajor(final StoryOptions... values) { + bitField0_ |= 0x00000004; + major.addAll(values); + return this; + } + + /** + * <code>repeated .StoryOptions Personality = 3;</code> + * @return whether the personality field is set + */ + public boolean hasPersonality() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .StoryOptions Personality = 3;</code> + * @return this + */ + public StorySettle clearPersonality() { + bitField0_ &= ~0x00000008; + personality.clear(); + return this; + } + + /** + * <code>repeated .StoryOptions Personality = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePersonality()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StoryOptions> getPersonality() { + return personality; + } + + /** + * <code>repeated .StoryOptions Personality = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StoryOptions> getMutablePersonality() { + bitField0_ |= 0x00000008; + return personality; + } + + /** + * <code>repeated .StoryOptions Personality = 3;</code> + * @param value the personality to add + * @return this + */ + public StorySettle addPersonality(final StoryOptions value) { + bitField0_ |= 0x00000008; + personality.add(value); + return this; + } + + /** + * <code>repeated .StoryOptions Personality = 3;</code> + * @param values the personality to add + * @return this + */ + public StorySettle addAllPersonality(final StoryOptions... values) { + bitField0_ |= 0x00000008; + personality.addAll(values); + return this; + } + + @Override + public StorySettle copyFrom(final StorySettle other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + idx = other.idx; + nextPackage.copyFrom(other.nextPackage); + major.copyFrom(other.major); + personality.copyFrom(other.personality); + } + return this; + } + + @Override + public StorySettle mergeFrom(final StorySettle other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasIdx()) { + setIdx(other.idx); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasMajor()) { + getMutableMajor().addAll(other.major); + } + if (other.hasPersonality()) { + getMutablePersonality().addAll(other.personality); + } + return this; + } + + @Override + public StorySettle clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + idx = 0; + nextPackage.clear(); + major.clear(); + personality.clear(); + return this; + } + + @Override + public StorySettle clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + major.clearQuick(); + personality.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StorySettle)) { + return false; + } + StorySettle other = (StorySettle) o; + return bitField0_ == other.bitField0_ + && (!hasIdx() || idx == other.idx) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasMajor() || major.equals(other.major)) + && (!hasPersonality() || personality.equals(other.personality)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(idx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < major.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(major.get(i)); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < personality.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(personality.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(idx); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * major.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(major); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * personality.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(personality); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StorySettle mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // idx + idx = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // major + tag = input.readRepeatedMessage(major, tag); + bitField0_ |= 0x00000004; + if (tag != 26) { + break; + } + } + case 26: { + // personality + tag = input.readRepeatedMessage(personality, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.idx, idx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.major, major); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.personality, personality); + } + output.endObject(); + } + + @Override + public StorySettle mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 73373: { + if (input.isAtField(FieldNames.idx)) { + if (!input.trySkipNullValue()) { + idx = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 74106265: { + if (input.isAtField(FieldNames.major)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(major); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1243902542: { + if (input.isAtField(FieldNames.personality)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(personality); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StorySettle clone() { + return new StorySettle().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StorySettle parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StorySettle(), data).checkInitialized(); + } + + public static StorySettle parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySettle(), input).checkInitialized(); + } + + public static StorySettle parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySettle(), input).checkInitialized(); + } + + /** + * @return factory for creating StorySettle messages + */ + public static MessageFactory<StorySettle> getFactory() { + return StorySettleFactory.INSTANCE; + } + + private enum StorySettleFactory implements MessageFactory<StorySettle> { + INSTANCE; + + @Override + public StorySettle create() { + return StorySettle.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName idx = FieldName.forField("Idx"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName major = FieldName.forField("Major"); + + static final FieldName personality = FieldName.forField("Personality"); + } + } + + /** + * Protobuf type {@code StorySettleReq} + */ + public static final class StorySettleReq extends ProtoMessage<StorySettleReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .Events Events = 14;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Evidences = 15;</code> + */ + private final RepeatedInt evidences = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated .StorySettle List = 1;</code> + */ + private final RepeatedMessage<StorySettle> list = RepeatedMessage.newEmptyInstance(StorySettle.getFactory()); + + private StorySettleReq() { + } + + /** + * @return a new empty instance of {@code StorySettleReq} + */ + public static StorySettleReq newInstance() { + return new StorySettleReq(); + } + + /** + * <code>optional .Events Events = 14;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .Events Events = 14;</code> + * @return this + */ + public StorySettleReq clearEvents() { + bitField0_ &= ~0x00000001; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 14;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 14;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000001; + return events; + } + + /** + * <code>optional .Events Events = 14;</code> + * @param value the events to set + * @return this + */ + public StorySettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000001; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StorySettleReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StorySettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StorySettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StorySettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Evidences = 15;</code> + * @return whether the evidences field is set + */ + public boolean hasEvidences() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Evidences = 15;</code> + * @return this + */ + public StorySettleReq clearEvidences() { + bitField0_ &= ~0x00000004; + evidences.clear(); + return this; + } + + /** + * <code>repeated uint32 Evidences = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvidences()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getEvidences() { + return evidences; + } + + /** + * <code>repeated uint32 Evidences = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableEvidences() { + bitField0_ |= 0x00000004; + return evidences; + } + + /** + * <code>repeated uint32 Evidences = 15;</code> + * @param value the evidences to add + * @return this + */ + public StorySettleReq addEvidences(final int value) { + bitField0_ |= 0x00000004; + evidences.add(value); + return this; + } + + /** + * <code>repeated uint32 Evidences = 15;</code> + * @param values the evidences to add + * @return this + */ + public StorySettleReq addAllEvidences(final int... values) { + bitField0_ |= 0x00000004; + evidences.addAll(values); + return this; + } + + /** + * <code>repeated .StorySettle List = 1;</code> + * @return whether the list field is set + */ + public boolean hasList() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .StorySettle List = 1;</code> + * @return this + */ + public StorySettleReq clearList() { + bitField0_ &= ~0x00000008; + list.clear(); + return this; + } + + /** + * <code>repeated .StorySettle List = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableList()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<StorySettle> getList() { + return list; + } + + /** + * <code>repeated .StorySettle List = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<StorySettle> getMutableList() { + bitField0_ |= 0x00000008; + return list; + } + + /** + * <code>repeated .StorySettle List = 1;</code> + * @param value the list to add + * @return this + */ + public StorySettleReq addList(final StorySettle value) { + bitField0_ |= 0x00000008; + list.add(value); + return this; + } + + /** + * <code>repeated .StorySettle List = 1;</code> + * @param values the list to add + * @return this + */ + public StorySettleReq addAllList(final StorySettle... values) { + bitField0_ |= 0x00000008; + list.addAll(values); + return this; + } + + @Override + public StorySettleReq copyFrom(final StorySettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + evidences.copyFrom(other.evidences); + list.copyFrom(other.list); + } + return this; + } + + @Override + public StorySettleReq mergeFrom(final StorySettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEvidences()) { + getMutableEvidences().addAll(other.evidences); + } + if (other.hasList()) { + getMutableList().addAll(other.list); + } + return this; + } + + @Override + public StorySettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clear(); + nextPackage.clear(); + evidences.clear(); + list.clear(); + return this; + } + + @Override + public StorySettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + evidences.clear(); + list.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StorySettleReq)) { + return false; + } + StorySettleReq other = (StorySettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEvidences() || evidences.equals(other.evidences)) + && (!hasList() || list.equals(other.list)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 114); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < evidences.length(); i++) { + output.writeRawByte((byte) 120); + output.writeUInt32NoTag(evidences.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < list.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(list.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * evidences.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(evidences); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * list.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(list); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StorySettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 114: { + // events + input.readMessage(events); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // evidences [packed=true] + input.readPackedUInt32(evidences, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // list + tag = input.readRepeatedMessage(list, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 120: { + // evidences [packed=false] + tag = input.readRepeatedUInt32(evidences, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.evidences, evidences); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.list, list); + } + output.endObject(); + } + + @Override + public StorySettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 991055068: { + if (input.isAtField(FieldNames.evidences)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(evidences); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2368702: { + if (input.isAtField(FieldNames.list)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(list); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StorySettleReq clone() { + return new StorySettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StorySettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StorySettleReq(), data).checkInitialized(); + } + + public static StorySettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySettleReq(), input).checkInitialized(); + } + + public static StorySettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StorySettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating StorySettleReq messages + */ + public static MessageFactory<StorySettleReq> getFactory() { + return StorySettleReqFactory.INSTANCE; + } + + private enum StorySettleReqFactory implements MessageFactory<StorySettleReq> { + INSTANCE; + + @Override + public StorySettleReq create() { + return StorySettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName evidences = FieldName.forField("Evidences"); + + static final FieldName list = FieldName.forField("List"); + } + } + + /** + * Protobuf type {@code StoryOptions} + */ + public static final class StoryOptions extends ProtoMessage<StoryOptions> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Group = 1;</code> + */ + private int group; + + /** + * <code>optional uint32 Choice = 2;</code> + */ + private int choice; + + /** + * <code>optional uint32 Factor = 3;</code> + */ + private int factor; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private StoryOptions() { + } + + /** + * @return a new empty instance of {@code StoryOptions} + */ + public static StoryOptions newInstance() { + return new StoryOptions(); + } + + /** + * <code>optional uint32 Group = 1;</code> + * @return whether the group field is set + */ + public boolean hasGroup() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Group = 1;</code> + * @return this + */ + public StoryOptions clearGroup() { + bitField0_ &= ~0x00000001; + group = 0; + return this; + } + + /** + * <code>optional uint32 Group = 1;</code> + * @return the group + */ + public int getGroup() { + return group; + } + + /** + * <code>optional uint32 Group = 1;</code> + * @param value the group to set + * @return this + */ + public StoryOptions setGroup(final int value) { + bitField0_ |= 0x00000001; + group = value; + return this; + } + + /** + * <code>optional uint32 Choice = 2;</code> + * @return whether the choice field is set + */ + public boolean hasChoice() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Choice = 2;</code> + * @return this + */ + public StoryOptions clearChoice() { + bitField0_ &= ~0x00000002; + choice = 0; + return this; + } + + /** + * <code>optional uint32 Choice = 2;</code> + * @return the choice + */ + public int getChoice() { + return choice; + } + + /** + * <code>optional uint32 Choice = 2;</code> + * @param value the choice to set + * @return this + */ + public StoryOptions setChoice(final int value) { + bitField0_ |= 0x00000002; + choice = value; + return this; + } + + /** + * <code>optional uint32 Factor = 3;</code> + * @return whether the factor field is set + */ + public boolean hasFactor() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 Factor = 3;</code> + * @return this + */ + public StoryOptions clearFactor() { + bitField0_ &= ~0x00000004; + factor = 0; + return this; + } + + /** + * <code>optional uint32 Factor = 3;</code> + * @return the factor + */ + public int getFactor() { + return factor; + } + + /** + * <code>optional uint32 Factor = 3;</code> + * @param value the factor to set + * @return this + */ + public StoryOptions setFactor(final int value) { + bitField0_ |= 0x00000004; + factor = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public StoryOptions clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public StoryOptions addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public StoryOptions addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public StoryOptions setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public StoryOptions copyFrom(final StoryOptions other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + group = other.group; + choice = other.choice; + factor = other.factor; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StoryOptions mergeFrom(final StoryOptions other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGroup()) { + setGroup(other.group); + } + if (other.hasChoice()) { + setChoice(other.choice); + } + if (other.hasFactor()) { + setFactor(other.factor); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public StoryOptions clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + group = 0; + choice = 0; + factor = 0; + nextPackage.clear(); + return this; + } + + @Override + public StoryOptions clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof StoryOptions)) { + return false; + } + StoryOptions other = (StoryOptions) o; + return bitField0_ == other.bitField0_ + && (!hasGroup() || group == other.group) + && (!hasChoice() || choice == other.choice) + && (!hasFactor() || factor == other.factor) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(group); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(choice); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(factor); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(group); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(choice); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(factor); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public StoryOptions mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // group + group = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // choice + choice = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // factor + factor = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.group, group); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.choice, choice); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.factor, factor); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public StoryOptions mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 69076575: { + if (input.isAtField(FieldNames.group)) { + if (!input.trySkipNullValue()) { + group = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017610177: { + if (input.isAtField(FieldNames.choice)) { + if (!input.trySkipNullValue()) { + choice = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2096686447: { + if (input.isAtField(FieldNames.factor)) { + if (!input.trySkipNullValue()) { + factor = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public StoryOptions clone() { + return new StoryOptions().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static StoryOptions parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new StoryOptions(), data).checkInitialized(); + } + + public static StoryOptions parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryOptions(), input).checkInitialized(); + } + + public static StoryOptions parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new StoryOptions(), input).checkInitialized(); + } + + /** + * @return factory for creating StoryOptions messages + */ + public static MessageFactory<StoryOptions> getFactory() { + return StoryOptionsFactory.INSTANCE; + } + + private enum StoryOptionsFactory implements MessageFactory<StoryOptions> { + INSTANCE; + + @Override + public StoryOptions create() { + return StoryOptions.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName group = FieldName.forField("Group"); + + static final FieldName choice = FieldName.forField("Choice"); + + static final FieldName factor = FieldName.forField("Factor"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TalentBackgroundSet.java b/src/generated/main/emu/nebula/proto/TalentBackgroundSet.java new file mode 100644 index 0000000..3e87c07 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TalentBackgroundSet.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class TalentBackgroundSet { + /** + * Protobuf type {@code TalentBackgroundSetReq} + */ + public static final class TalentBackgroundSetReq extends ProtoMessage<TalentBackgroundSetReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 GroupId = 1;</code> + */ + private int groupId; + + /** + * <code>optional uint32 CharId = 2;</code> + */ + private int charId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TalentBackgroundSetReq() { + } + + /** + * @return a new empty instance of {@code TalentBackgroundSetReq} + */ + public static TalentBackgroundSetReq newInstance() { + return new TalentBackgroundSetReq(); + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @return whether the groupId field is set + */ + public boolean hasGroupId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @return this + */ + public TalentBackgroundSetReq clearGroupId() { + bitField0_ &= ~0x00000001; + groupId = 0; + return this; + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @return the groupId + */ + public int getGroupId() { + return groupId; + } + + /** + * <code>optional uint32 GroupId = 1;</code> + * @param value the groupId to set + * @return this + */ + public TalentBackgroundSetReq setGroupId(final int value) { + bitField0_ |= 0x00000001; + groupId = value; + return this; + } + + /** + * <code>optional uint32 CharId = 2;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 CharId = 2;</code> + * @return this + */ + public TalentBackgroundSetReq clearCharId() { + bitField0_ &= ~0x00000002; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 2;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 2;</code> + * @param value the charId to set + * @return this + */ + public TalentBackgroundSetReq setCharId(final int value) { + bitField0_ |= 0x00000002; + charId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TalentBackgroundSetReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TalentBackgroundSetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TalentBackgroundSetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TalentBackgroundSetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TalentBackgroundSetReq copyFrom(final TalentBackgroundSetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + groupId = other.groupId; + charId = other.charId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentBackgroundSetReq mergeFrom(final TalentBackgroundSetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasGroupId()) { + setGroupId(other.groupId); + } + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentBackgroundSetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + groupId = 0; + charId = 0; + nextPackage.clear(); + return this; + } + + @Override + public TalentBackgroundSetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TalentBackgroundSetReq)) { + return false; + } + TalentBackgroundSetReq other = (TalentBackgroundSetReq) o; + return bitField0_ == other.bitField0_ + && (!hasGroupId() || groupId == other.groupId) + && (!hasCharId() || charId == other.charId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TalentBackgroundSetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // groupId + groupId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.groupId, groupId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TalentBackgroundSetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1958081498: { + if (input.isAtField(FieldNames.groupId)) { + if (!input.trySkipNullValue()) { + groupId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TalentBackgroundSetReq clone() { + return new TalentBackgroundSetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TalentBackgroundSetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TalentBackgroundSetReq(), data).checkInitialized(); + } + + public static TalentBackgroundSetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentBackgroundSetReq(), input).checkInitialized(); + } + + public static TalentBackgroundSetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentBackgroundSetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating TalentBackgroundSetReq messages + */ + public static MessageFactory<TalentBackgroundSetReq> getFactory() { + return TalentBackgroundSetReqFactory.INSTANCE; + } + + private enum TalentBackgroundSetReqFactory implements MessageFactory<TalentBackgroundSetReq> { + INSTANCE; + + @Override + public TalentBackgroundSetReq create() { + return TalentBackgroundSetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName groupId = FieldName.forField("GroupId"); + + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TalentGroupUnlock.java b/src/generated/main/emu/nebula/proto/TalentGroupUnlock.java new file mode 100644 index 0000000..e2a4d9d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TalentGroupUnlock.java @@ -0,0 +1,525 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class TalentGroupUnlock { + /** + * Protobuf type {@code TalentGroupUnlockResp} + */ + public static final class TalentGroupUnlockResp extends ProtoMessage<TalentGroupUnlockResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Nodes = 2;</code> + */ + private final RepeatedInt nodes = RepeatedInt.newEmptyInstance(); + + private TalentGroupUnlockResp() { + } + + /** + * @return a new empty instance of {@code TalentGroupUnlockResp} + */ + public static TalentGroupUnlockResp newInstance() { + return new TalentGroupUnlockResp(); + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public TalentGroupUnlockResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public TalentGroupUnlockResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TalentGroupUnlockResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TalentGroupUnlockResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TalentGroupUnlockResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TalentGroupUnlockResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Nodes = 2;</code> + * @return whether the nodes field is set + */ + public boolean hasNodes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Nodes = 2;</code> + * @return this + */ + public TalentGroupUnlockResp clearNodes() { + bitField0_ &= ~0x00000004; + nodes.clear(); + return this; + } + + /** + * <code>repeated uint32 Nodes = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNodes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getNodes() { + return nodes; + } + + /** + * <code>repeated uint32 Nodes = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableNodes() { + bitField0_ |= 0x00000004; + return nodes; + } + + /** + * <code>repeated uint32 Nodes = 2;</code> + * @param value the nodes to add + * @return this + */ + public TalentGroupUnlockResp addNodes(final int value) { + bitField0_ |= 0x00000004; + nodes.add(value); + return this; + } + + /** + * <code>repeated uint32 Nodes = 2;</code> + * @param values the nodes to add + * @return this + */ + public TalentGroupUnlockResp addAllNodes(final int... values) { + bitField0_ |= 0x00000004; + nodes.addAll(values); + return this; + } + + @Override + public TalentGroupUnlockResp copyFrom(final TalentGroupUnlockResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + nodes.copyFrom(other.nodes); + } + return this; + } + + @Override + public TalentGroupUnlockResp mergeFrom(final TalentGroupUnlockResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNodes()) { + getMutableNodes().addAll(other.nodes); + } + return this; + } + + @Override + public TalentGroupUnlockResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + nodes.clear(); + return this; + } + + @Override + public TalentGroupUnlockResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + nodes.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TalentGroupUnlockResp)) { + return false; + } + TalentGroupUnlockResp other = (TalentGroupUnlockResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNodes() || nodes.equals(other.nodes)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < nodes.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(nodes.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * nodes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(nodes); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TalentGroupUnlockResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // nodes [packed=true] + input.readPackedUInt32(nodes, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // nodes [packed=false] + tag = input.readRepeatedUInt32(nodes, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.nodes, nodes); + } + output.endObject(); + } + + @Override + public TalentGroupUnlockResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 75440785: { + if (input.isAtField(FieldNames.nodes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(nodes); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TalentGroupUnlockResp clone() { + return new TalentGroupUnlockResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TalentGroupUnlockResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TalentGroupUnlockResp(), data).checkInitialized(); + } + + public static TalentGroupUnlockResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentGroupUnlockResp(), input).checkInitialized(); + } + + public static TalentGroupUnlockResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentGroupUnlockResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TalentGroupUnlockResp messages + */ + public static MessageFactory<TalentGroupUnlockResp> getFactory() { + return TalentGroupUnlockRespFactory.INSTANCE; + } + + private enum TalentGroupUnlockRespFactory implements MessageFactory<TalentGroupUnlockResp> { + INSTANCE; + + @Override + public TalentGroupUnlockResp create() { + return TalentGroupUnlockResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nodes = FieldName.forField("Nodes"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TalentNodeReset.java b/src/generated/main/emu/nebula/proto/TalentNodeReset.java new file mode 100644 index 0000000..21a0970 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TalentNodeReset.java @@ -0,0 +1,484 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class TalentNodeReset { + /** + * Protobuf type {@code TalentNodeResetResp} + */ + public static final class TalentNodeResetResp extends ProtoMessage<TalentNodeResetResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool ResetKeyNode = 1;</code> + */ + private boolean resetKeyNode; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TalentNodeResetResp() { + } + + /** + * @return a new empty instance of {@code TalentNodeResetResp} + */ + public static TalentNodeResetResp newInstance() { + return new TalentNodeResetResp(); + } + + /** + * <code>optional bool ResetKeyNode = 1;</code> + * @return whether the resetKeyNode field is set + */ + public boolean hasResetKeyNode() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool ResetKeyNode = 1;</code> + * @return this + */ + public TalentNodeResetResp clearResetKeyNode() { + bitField0_ &= ~0x00000001; + resetKeyNode = false; + return this; + } + + /** + * <code>optional bool ResetKeyNode = 1;</code> + * @return the resetKeyNode + */ + public boolean getResetKeyNode() { + return resetKeyNode; + } + + /** + * <code>optional bool ResetKeyNode = 1;</code> + * @param value the resetKeyNode to set + * @return this + */ + public TalentNodeResetResp setResetKeyNode(final boolean value) { + bitField0_ |= 0x00000001; + resetKeyNode = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public TalentNodeResetResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public TalentNodeResetResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TalentNodeResetResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TalentNodeResetResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TalentNodeResetResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TalentNodeResetResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TalentNodeResetResp copyFrom(final TalentNodeResetResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + resetKeyNode = other.resetKeyNode; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentNodeResetResp mergeFrom(final TalentNodeResetResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasResetKeyNode()) { + setResetKeyNode(other.resetKeyNode); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentNodeResetResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + resetKeyNode = false; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public TalentNodeResetResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TalentNodeResetResp)) { + return false; + } + TalentNodeResetResp other = (TalentNodeResetResp) o; + return bitField0_ == other.bitField0_ + && (!hasResetKeyNode() || resetKeyNode == other.resetKeyNode) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(resetKeyNode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TalentNodeResetResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // resetKeyNode + resetKeyNode = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.resetKeyNode, resetKeyNode); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TalentNodeResetResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1245544238: { + if (input.isAtField(FieldNames.resetKeyNode)) { + if (!input.trySkipNullValue()) { + resetKeyNode = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TalentNodeResetResp clone() { + return new TalentNodeResetResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TalentNodeResetResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TalentNodeResetResp(), data).checkInitialized(); + } + + public static TalentNodeResetResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentNodeResetResp(), input).checkInitialized(); + } + + public static TalentNodeResetResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentNodeResetResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TalentNodeResetResp messages + */ + public static MessageFactory<TalentNodeResetResp> getFactory() { + return TalentNodeResetRespFactory.INSTANCE; + } + + private enum TalentNodeResetRespFactory implements MessageFactory<TalentNodeResetResp> { + INSTANCE; + + @Override + public TalentNodeResetResp create() { + return TalentNodeResetResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName resetKeyNode = FieldName.forField("ResetKeyNode"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TalentReset.java b/src/generated/main/emu/nebula/proto/TalentReset.java new file mode 100644 index 0000000..6dc7af7 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TalentReset.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class TalentReset { + /** + * Protobuf type {@code TalentResetReq} + */ + public static final class TalentResetReq extends ProtoMessage<TalentResetReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CharId = 1;</code> + */ + private int charId; + + /** + * <code>optional uint32 GroupId = 2;</code> + */ + private int groupId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TalentResetReq() { + } + + /** + * @return a new empty instance of {@code TalentResetReq} + */ + public static TalentResetReq newInstance() { + return new TalentResetReq(); + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return whether the charId field is set + */ + public boolean hasCharId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return this + */ + public TalentResetReq clearCharId() { + bitField0_ &= ~0x00000001; + charId = 0; + return this; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @return the charId + */ + public int getCharId() { + return charId; + } + + /** + * <code>optional uint32 CharId = 1;</code> + * @param value the charId to set + * @return this + */ + public TalentResetReq setCharId(final int value) { + bitField0_ |= 0x00000001; + charId = value; + return this; + } + + /** + * <code>optional uint32 GroupId = 2;</code> + * @return whether the groupId field is set + */ + public boolean hasGroupId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 GroupId = 2;</code> + * @return this + */ + public TalentResetReq clearGroupId() { + bitField0_ &= ~0x00000002; + groupId = 0; + return this; + } + + /** + * <code>optional uint32 GroupId = 2;</code> + * @return the groupId + */ + public int getGroupId() { + return groupId; + } + + /** + * <code>optional uint32 GroupId = 2;</code> + * @param value the groupId to set + * @return this + */ + public TalentResetReq setGroupId(final int value) { + bitField0_ |= 0x00000002; + groupId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TalentResetReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TalentResetReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TalentResetReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TalentResetReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TalentResetReq copyFrom(final TalentResetReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + charId = other.charId; + groupId = other.groupId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentResetReq mergeFrom(final TalentResetReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCharId()) { + setCharId(other.charId); + } + if (other.hasGroupId()) { + setGroupId(other.groupId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentResetReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + charId = 0; + groupId = 0; + nextPackage.clear(); + return this; + } + + @Override + public TalentResetReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TalentResetReq)) { + return false; + } + TalentResetReq other = (TalentResetReq) o; + return bitField0_ == other.bitField0_ + && (!hasCharId() || charId == other.charId) + && (!hasGroupId() || groupId == other.groupId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(charId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TalentResetReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // charId + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // groupId + groupId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.charId, charId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.groupId, groupId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TalentResetReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017200945: { + if (input.isAtField(FieldNames.charId)) { + if (!input.trySkipNullValue()) { + charId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1958081498: { + if (input.isAtField(FieldNames.groupId)) { + if (!input.trySkipNullValue()) { + groupId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TalentResetReq clone() { + return new TalentResetReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TalentResetReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TalentResetReq(), data).checkInitialized(); + } + + public static TalentResetReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentResetReq(), input).checkInitialized(); + } + + public static TalentResetReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentResetReq(), input).checkInitialized(); + } + + /** + * @return factory for creating TalentResetReq messages + */ + public static MessageFactory<TalentResetReq> getFactory() { + return TalentResetReqFactory.INSTANCE; + } + + private enum TalentResetReqFactory implements MessageFactory<TalentResetReq> { + INSTANCE; + + @Override + public TalentResetReq create() { + return TalentResetReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName charId = FieldName.forField("CharId"); + + static final FieldName groupId = FieldName.forField("GroupId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TalentUnlock.java b/src/generated/main/emu/nebula/proto/TalentUnlock.java new file mode 100644 index 0000000..55ea396 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TalentUnlock.java @@ -0,0 +1,484 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class TalentUnlock { + /** + * Protobuf type {@code TalentUnlockResp} + */ + public static final class TalentUnlockResp extends ProtoMessage<TalentUnlockResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 TalentId = 2;</code> + */ + private int talentId; + + /** + * <code>optional .ChangeInfo Change = 1;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TalentUnlockResp() { + } + + /** + * @return a new empty instance of {@code TalentUnlockResp} + */ + public static TalentUnlockResp newInstance() { + return new TalentUnlockResp(); + } + + /** + * <code>optional uint32 TalentId = 2;</code> + * @return whether the talentId field is set + */ + public boolean hasTalentId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 TalentId = 2;</code> + * @return this + */ + public TalentUnlockResp clearTalentId() { + bitField0_ &= ~0x00000001; + talentId = 0; + return this; + } + + /** + * <code>optional uint32 TalentId = 2;</code> + * @return the talentId + */ + public int getTalentId() { + return talentId; + } + + /** + * <code>optional uint32 TalentId = 2;</code> + * @param value the talentId to set + * @return this + */ + public TalentUnlockResp setTalentId(final int value) { + bitField0_ |= 0x00000001; + talentId = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @return this + */ + public TalentUnlockResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 1;</code> + * @param value the change to set + * @return this + */ + public TalentUnlockResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TalentUnlockResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TalentUnlockResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TalentUnlockResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TalentUnlockResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TalentUnlockResp copyFrom(final TalentUnlockResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + talentId = other.talentId; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentUnlockResp mergeFrom(final TalentUnlockResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTalentId()) { + setTalentId(other.talentId); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TalentUnlockResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + talentId = 0; + change.clear(); + nextPackage.clear(); + return this; + } + + @Override + public TalentUnlockResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TalentUnlockResp)) { + return false; + } + TalentUnlockResp other = (TalentUnlockResp) o; + return bitField0_ == other.bitField0_ + && (!hasTalentId() || talentId == other.talentId) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(talentId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(talentId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TalentUnlockResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // talentId + talentId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.talentId, talentId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TalentUnlockResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -550661305: { + if (input.isAtField(FieldNames.talentId)) { + if (!input.trySkipNullValue()) { + talentId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TalentUnlockResp clone() { + return new TalentUnlockResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TalentUnlockResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TalentUnlockResp(), data).checkInitialized(); + } + + public static TalentUnlockResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentUnlockResp(), input).checkInitialized(); + } + + public static TalentUnlockResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TalentUnlockResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TalentUnlockResp messages + */ + public static MessageFactory<TalentUnlockResp> getFactory() { + return TalentUnlockRespFactory.INSTANCE; + } + + private enum TalentUnlockRespFactory implements MessageFactory<TalentUnlockResp> { + INSTANCE; + + @Override + public TalentUnlockResp create() { + return TalentUnlockResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName talentId = FieldName.forField("TalentId"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TowerBookFateCardDetail.java b/src/generated/main/emu/nebula/proto/TowerBookFateCardDetail.java new file mode 100644 index 0000000..35aa9e9 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TowerBookFateCardDetail.java @@ -0,0 +1,545 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class TowerBookFateCardDetail { + /** + * Protobuf type {@code TowerBookFateCardDetailResp} + */ + public static final class TowerBookFateCardDetailResp extends ProtoMessage<TowerBookFateCardDetailResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Cards = 1;</code> + */ + private final RepeatedInt cards = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 Quests = 2;</code> + */ + private final RepeatedInt quests = RepeatedInt.newEmptyInstance(); + + private TowerBookFateCardDetailResp() { + } + + /** + * @return a new empty instance of {@code TowerBookFateCardDetailResp} + */ + public static TowerBookFateCardDetailResp newInstance() { + return new TowerBookFateCardDetailResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerBookFateCardDetailResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerBookFateCardDetailResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerBookFateCardDetailResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerBookFateCardDetailResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Cards = 1;</code> + * @return whether the cards field is set + */ + public boolean hasCards() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 Cards = 1;</code> + * @return this + */ + public TowerBookFateCardDetailResp clearCards() { + bitField0_ &= ~0x00000002; + cards.clear(); + return this; + } + + /** + * <code>repeated uint32 Cards = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getCards() { + return cards; + } + + /** + * <code>repeated uint32 Cards = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableCards() { + bitField0_ |= 0x00000002; + return cards; + } + + /** + * <code>repeated uint32 Cards = 1;</code> + * @param value the cards to add + * @return this + */ + public TowerBookFateCardDetailResp addCards(final int value) { + bitField0_ |= 0x00000002; + cards.add(value); + return this; + } + + /** + * <code>repeated uint32 Cards = 1;</code> + * @param values the cards to add + * @return this + */ + public TowerBookFateCardDetailResp addAllCards(final int... values) { + bitField0_ |= 0x00000002; + cards.addAll(values); + return this; + } + + /** + * <code>repeated uint32 Quests = 2;</code> + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Quests = 2;</code> + * @return this + */ + public TowerBookFateCardDetailResp clearQuests() { + bitField0_ &= ~0x00000004; + quests.clear(); + return this; + } + + /** + * <code>repeated uint32 Quests = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getQuests() { + return quests; + } + + /** + * <code>repeated uint32 Quests = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableQuests() { + bitField0_ |= 0x00000004; + return quests; + } + + /** + * <code>repeated uint32 Quests = 2;</code> + * @param value the quests to add + * @return this + */ + public TowerBookFateCardDetailResp addQuests(final int value) { + bitField0_ |= 0x00000004; + quests.add(value); + return this; + } + + /** + * <code>repeated uint32 Quests = 2;</code> + * @param values the quests to add + * @return this + */ + public TowerBookFateCardDetailResp addAllQuests(final int... values) { + bitField0_ |= 0x00000004; + quests.addAll(values); + return this; + } + + @Override + public TowerBookFateCardDetailResp copyFrom(final TowerBookFateCardDetailResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + cards.copyFrom(other.cards); + quests.copyFrom(other.quests); + } + return this; + } + + @Override + public TowerBookFateCardDetailResp mergeFrom(final TowerBookFateCardDetailResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasCards()) { + getMutableCards().addAll(other.cards); + } + if (other.hasQuests()) { + getMutableQuests().addAll(other.quests); + } + return this; + } + + @Override + public TowerBookFateCardDetailResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cards.clear(); + quests.clear(); + return this; + } + + @Override + public TowerBookFateCardDetailResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + cards.clear(); + quests.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerBookFateCardDetailResp)) { + return false; + } + TowerBookFateCardDetailResp other = (TowerBookFateCardDetailResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasCards() || cards.equals(other.cards)) + && (!hasQuests() || quests.equals(other.quests)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < cards.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(cards.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < quests.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(quests.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * cards.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(cards); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * quests.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(quests); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerBookFateCardDetailResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // cards [packed=true] + input.readPackedUInt32(cards, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // quests [packed=true] + input.readPackedUInt32(quests, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // cards [packed=false] + tag = input.readRepeatedUInt32(cards, tag); + bitField0_ |= 0x00000002; + break; + } + case 16: { + // quests [packed=false] + tag = input.readRepeatedUInt32(quests, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.cards, cards); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.quests, quests); + } + output.endObject(); + } + + @Override + public TowerBookFateCardDetailResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 64878403: { + if (input.isAtField(FieldNames.cards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(cards); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(quests); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerBookFateCardDetailResp clone() { + return new TowerBookFateCardDetailResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerBookFateCardDetailResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerBookFateCardDetailResp(), data).checkInitialized(); + } + + public static TowerBookFateCardDetailResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardDetailResp(), input).checkInitialized(); + } + + public static TowerBookFateCardDetailResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardDetailResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerBookFateCardDetailResp messages + */ + public static MessageFactory<TowerBookFateCardDetailResp> getFactory() { + return TowerBookFateCardDetailRespFactory.INSTANCE; + } + + private enum TowerBookFateCardDetailRespFactory implements MessageFactory<TowerBookFateCardDetailResp> { + INSTANCE; + + @Override + public TowerBookFateCardDetailResp create() { + return TowerBookFateCardDetailResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName cards = FieldName.forField("Cards"); + + static final FieldName quests = FieldName.forField("Quests"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TowerBookFateCardRewardReceive.java b/src/generated/main/emu/nebula/proto/TowerBookFateCardRewardReceive.java new file mode 100644 index 0000000..a9e2cf5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TowerBookFateCardRewardReceive.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class TowerBookFateCardRewardReceive { + /** + * Protobuf type {@code TowerBookFateCardRewardReq} + */ + public static final class TowerBookFateCardRewardReq extends ProtoMessage<TowerBookFateCardRewardReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 CardBundleId = 1;</code> + */ + private int cardBundleId; + + /** + * <code>optional uint32 QuestId = 2;</code> + */ + private int questId; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TowerBookFateCardRewardReq() { + } + + /** + * @return a new empty instance of {@code TowerBookFateCardRewardReq} + */ + public static TowerBookFateCardRewardReq newInstance() { + return new TowerBookFateCardRewardReq(); + } + + /** + * <code>optional uint32 CardBundleId = 1;</code> + * @return whether the cardBundleId field is set + */ + public boolean hasCardBundleId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 CardBundleId = 1;</code> + * @return this + */ + public TowerBookFateCardRewardReq clearCardBundleId() { + bitField0_ &= ~0x00000001; + cardBundleId = 0; + return this; + } + + /** + * <code>optional uint32 CardBundleId = 1;</code> + * @return the cardBundleId + */ + public int getCardBundleId() { + return cardBundleId; + } + + /** + * <code>optional uint32 CardBundleId = 1;</code> + * @param value the cardBundleId to set + * @return this + */ + public TowerBookFateCardRewardReq setCardBundleId(final int value) { + bitField0_ |= 0x00000001; + cardBundleId = value; + return this; + } + + /** + * <code>optional uint32 QuestId = 2;</code> + * @return whether the questId field is set + */ + public boolean hasQuestId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 QuestId = 2;</code> + * @return this + */ + public TowerBookFateCardRewardReq clearQuestId() { + bitField0_ &= ~0x00000002; + questId = 0; + return this; + } + + /** + * <code>optional uint32 QuestId = 2;</code> + * @return the questId + */ + public int getQuestId() { + return questId; + } + + /** + * <code>optional uint32 QuestId = 2;</code> + * @param value the questId to set + * @return this + */ + public TowerBookFateCardRewardReq setQuestId(final int value) { + bitField0_ |= 0x00000002; + questId = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerBookFateCardRewardReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerBookFateCardRewardReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerBookFateCardRewardReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerBookFateCardRewardReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TowerBookFateCardRewardReq copyFrom(final TowerBookFateCardRewardReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + cardBundleId = other.cardBundleId; + questId = other.questId; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerBookFateCardRewardReq mergeFrom(final TowerBookFateCardRewardReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasCardBundleId()) { + setCardBundleId(other.cardBundleId); + } + if (other.hasQuestId()) { + setQuestId(other.questId); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TowerBookFateCardRewardReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + cardBundleId = 0; + questId = 0; + nextPackage.clear(); + return this; + } + + @Override + public TowerBookFateCardRewardReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerBookFateCardRewardReq)) { + return false; + } + TowerBookFateCardRewardReq other = (TowerBookFateCardRewardReq) o; + return bitField0_ == other.bitField0_ + && (!hasCardBundleId() || cardBundleId == other.cardBundleId) + && (!hasQuestId() || questId == other.questId) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(cardBundleId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(cardBundleId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerBookFateCardRewardReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // cardBundleId + cardBundleId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // questId + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.cardBundleId, cardBundleId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.questId, questId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TowerBookFateCardRewardReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -666549107: { + if (input.isAtField(FieldNames.cardBundleId)) { + if (!input.trySkipNullValue()) { + cardBundleId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1975187075: { + if (input.isAtField(FieldNames.questId)) { + if (!input.trySkipNullValue()) { + questId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerBookFateCardRewardReq clone() { + return new TowerBookFateCardRewardReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerBookFateCardRewardReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerBookFateCardRewardReq(), data).checkInitialized(); + } + + public static TowerBookFateCardRewardReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardRewardReq(), input).checkInitialized(); + } + + public static TowerBookFateCardRewardReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerBookFateCardRewardReq(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerBookFateCardRewardReq messages + */ + public static MessageFactory<TowerBookFateCardRewardReq> getFactory() { + return TowerBookFateCardRewardReqFactory.INSTANCE; + } + + private enum TowerBookFateCardRewardReqFactory implements MessageFactory<TowerBookFateCardRewardReq> { + INSTANCE; + + @Override + public TowerBookFateCardRewardReq create() { + return TowerBookFateCardRewardReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName cardBundleId = FieldName.forField("CardBundleId"); + + static final FieldName questId = FieldName.forField("QuestId"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TowerGrowthDetail.java b/src/generated/main/emu/nebula/proto/TowerGrowthDetail.java new file mode 100644 index 0000000..8152261 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TowerGrowthDetail.java @@ -0,0 +1,424 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class TowerGrowthDetail { + /** + * Protobuf type {@code TowerGrowthDetailResp} + */ + public static final class TowerGrowthDetailResp extends ProtoMessage<TowerGrowthDetailResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Detail = 1;</code> + */ + private final RepeatedInt detail = RepeatedInt.newEmptyInstance(); + + private TowerGrowthDetailResp() { + } + + /** + * @return a new empty instance of {@code TowerGrowthDetailResp} + */ + public static TowerGrowthDetailResp newInstance() { + return new TowerGrowthDetailResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerGrowthDetailResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerGrowthDetailResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerGrowthDetailResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerGrowthDetailResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Detail = 1;</code> + * @return whether the detail field is set + */ + public boolean hasDetail() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated uint32 Detail = 1;</code> + * @return this + */ + public TowerGrowthDetailResp clearDetail() { + bitField0_ &= ~0x00000002; + detail.clear(); + return this; + } + + /** + * <code>repeated uint32 Detail = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDetail()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getDetail() { + return detail; + } + + /** + * <code>repeated uint32 Detail = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableDetail() { + bitField0_ |= 0x00000002; + return detail; + } + + /** + * <code>repeated uint32 Detail = 1;</code> + * @param value the detail to add + * @return this + */ + public TowerGrowthDetailResp addDetail(final int value) { + bitField0_ |= 0x00000002; + detail.add(value); + return this; + } + + /** + * <code>repeated uint32 Detail = 1;</code> + * @param values the detail to add + * @return this + */ + public TowerGrowthDetailResp addAllDetail(final int... values) { + bitField0_ |= 0x00000002; + detail.addAll(values); + return this; + } + + @Override + public TowerGrowthDetailResp copyFrom(final TowerGrowthDetailResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + detail.copyFrom(other.detail); + } + return this; + } + + @Override + public TowerGrowthDetailResp mergeFrom(final TowerGrowthDetailResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasDetail()) { + getMutableDetail().addAll(other.detail); + } + return this; + } + + @Override + public TowerGrowthDetailResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + detail.clear(); + return this; + } + + @Override + public TowerGrowthDetailResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + detail.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerGrowthDetailResp)) { + return false; + } + TowerGrowthDetailResp other = (TowerGrowthDetailResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasDetail() || detail.equals(other.detail)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < detail.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(detail.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * detail.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(detail); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerGrowthDetailResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // detail [packed=true] + input.readPackedUInt32(detail, tag); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // detail [packed=false] + tag = input.readRepeatedUInt32(detail, tag); + bitField0_ |= 0x00000002; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedUInt32(FieldNames.detail, detail); + } + output.endObject(); + } + + @Override + public TowerGrowthDetailResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2043610225: { + if (input.isAtField(FieldNames.detail)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(detail); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerGrowthDetailResp clone() { + return new TowerGrowthDetailResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerGrowthDetailResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerGrowthDetailResp(), data).checkInitialized(); + } + + public static TowerGrowthDetailResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerGrowthDetailResp(), input).checkInitialized(); + } + + public static TowerGrowthDetailResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TowerGrowthDetailResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerGrowthDetailResp messages + */ + public static MessageFactory<TowerGrowthDetailResp> getFactory() { + return TowerGrowthDetailRespFactory.INSTANCE; + } + + private enum TowerGrowthDetailRespFactory implements MessageFactory<TowerGrowthDetailResp> { + INSTANCE; + + @Override + public TowerGrowthDetailResp create() { + return TowerGrowthDetailResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName detail = FieldName.forField("Detail"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TowerGrowthGroupNodeUnlock.java b/src/generated/main/emu/nebula/proto/TowerGrowthGroupNodeUnlock.java new file mode 100644 index 0000000..206e9bc --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TowerGrowthGroupNodeUnlock.java @@ -0,0 +1,527 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class TowerGrowthGroupNodeUnlock { + /** + * Protobuf type {@code TowerGrowthGroupNodeUnlockResp} + */ + public static final class TowerGrowthGroupNodeUnlockResp extends ProtoMessage<TowerGrowthGroupNodeUnlockResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo ChangeInfo = 2;</code> + */ + private final Public.ChangeInfo changeInfo = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 Nodes = 1;</code> + */ + private final RepeatedInt nodes = RepeatedInt.newEmptyInstance(); + + private TowerGrowthGroupNodeUnlockResp() { + } + + /** + * @return a new empty instance of {@code TowerGrowthGroupNodeUnlockResp} + */ + public static TowerGrowthGroupNodeUnlockResp newInstance() { + return new TowerGrowthGroupNodeUnlockResp(); + } + + /** + * <code>optional .ChangeInfo ChangeInfo = 2;</code> + * @return whether the changeInfo field is set + */ + public boolean hasChangeInfo() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo ChangeInfo = 2;</code> + * @return this + */ + public TowerGrowthGroupNodeUnlockResp clearChangeInfo() { + bitField0_ &= ~0x00000001; + changeInfo.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo ChangeInfo = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChangeInfo()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChangeInfo() { + return changeInfo; + } + + /** + * <code>optional .ChangeInfo ChangeInfo = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChangeInfo() { + bitField0_ |= 0x00000001; + return changeInfo; + } + + /** + * <code>optional .ChangeInfo ChangeInfo = 2;</code> + * @param value the changeInfo to set + * @return this + */ + public TowerGrowthGroupNodeUnlockResp setChangeInfo(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + changeInfo.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TowerGrowthGroupNodeUnlockResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TowerGrowthGroupNodeUnlockResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TowerGrowthGroupNodeUnlockResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TowerGrowthGroupNodeUnlockResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 Nodes = 1;</code> + * @return whether the nodes field is set + */ + public boolean hasNodes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 Nodes = 1;</code> + * @return this + */ + public TowerGrowthGroupNodeUnlockResp clearNodes() { + bitField0_ &= ~0x00000004; + nodes.clear(); + return this; + } + + /** + * <code>repeated uint32 Nodes = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNodes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getNodes() { + return nodes; + } + + /** + * <code>repeated uint32 Nodes = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableNodes() { + bitField0_ |= 0x00000004; + return nodes; + } + + /** + * <code>repeated uint32 Nodes = 1;</code> + * @param value the nodes to add + * @return this + */ + public TowerGrowthGroupNodeUnlockResp addNodes(final int value) { + bitField0_ |= 0x00000004; + nodes.add(value); + return this; + } + + /** + * <code>repeated uint32 Nodes = 1;</code> + * @param values the nodes to add + * @return this + */ + public TowerGrowthGroupNodeUnlockResp addAllNodes(final int... values) { + bitField0_ |= 0x00000004; + nodes.addAll(values); + return this; + } + + @Override + public TowerGrowthGroupNodeUnlockResp copyFrom(final TowerGrowthGroupNodeUnlockResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + changeInfo.copyFrom(other.changeInfo); + nextPackage.copyFrom(other.nextPackage); + nodes.copyFrom(other.nodes); + } + return this; + } + + @Override + public TowerGrowthGroupNodeUnlockResp mergeFrom(final TowerGrowthGroupNodeUnlockResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChangeInfo()) { + getMutableChangeInfo().mergeFrom(other.changeInfo); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNodes()) { + getMutableNodes().addAll(other.nodes); + } + return this; + } + + @Override + public TowerGrowthGroupNodeUnlockResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clear(); + nextPackage.clear(); + nodes.clear(); + return this; + } + + @Override + public TowerGrowthGroupNodeUnlockResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + changeInfo.clearQuick(); + nextPackage.clear(); + nodes.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TowerGrowthGroupNodeUnlockResp)) { + return false; + } + TowerGrowthGroupNodeUnlockResp other = (TowerGrowthGroupNodeUnlockResp) o; + return bitField0_ == other.bitField0_ + && (!hasChangeInfo() || changeInfo.equals(other.changeInfo)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNodes() || nodes.equals(other.nodes)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < nodes.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(nodes.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * nodes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(nodes); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TowerGrowthGroupNodeUnlockResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // changeInfo + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // nodes [packed=true] + input.readPackedUInt32(nodes, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // nodes [packed=false] + tag = input.readRepeatedUInt32(nodes, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.changeInfo, changeInfo); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.nodes, nodes); + } + output.endObject(); + } + + @Override + public TowerGrowthGroupNodeUnlockResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -138776418: { + if (input.isAtField(FieldNames.changeInfo)) { + if (!input.trySkipNullValue()) { + input.readMessage(changeInfo); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 75440785: { + if (input.isAtField(FieldNames.nodes)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(nodes); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TowerGrowthGroupNodeUnlockResp clone() { + return new TowerGrowthGroupNodeUnlockResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TowerGrowthGroupNodeUnlockResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TowerGrowthGroupNodeUnlockResp(), data).checkInitialized(); + } + + public static TowerGrowthGroupNodeUnlockResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TowerGrowthGroupNodeUnlockResp(), input).checkInitialized(); + } + + public static TowerGrowthGroupNodeUnlockResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TowerGrowthGroupNodeUnlockResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TowerGrowthGroupNodeUnlockResp messages + */ + public static MessageFactory<TowerGrowthGroupNodeUnlockResp> getFactory() { + return TowerGrowthGroupNodeUnlockRespFactory.INSTANCE; + } + + private enum TowerGrowthGroupNodeUnlockRespFactory implements MessageFactory<TowerGrowthGroupNodeUnlockResp> { + INSTANCE; + + @Override + public TowerGrowthGroupNodeUnlockResp create() { + return TowerGrowthGroupNodeUnlockResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName changeInfo = FieldName.forField("ChangeInfo"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nodes = FieldName.forField("Nodes"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TowerGrowthNodeUnlock.java b/src/generated/main/emu/nebula/proto/TowerGrowthNodeUnlock.java new file mode 100644 index 0000000..75fd9d5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TowerGrowthNodeUnlock.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class TowerGrowthNodeUnlock { +} diff --git a/src/generated/main/emu/nebula/proto/TravelerDuelInfoOuterClass.java b/src/generated/main/emu/nebula/proto/TravelerDuelInfoOuterClass.java new file mode 100644 index 0000000..d874e72 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TravelerDuelInfoOuterClass.java @@ -0,0 +1,859 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class TravelerDuelInfoOuterClass { + /** + * Protobuf type {@code TravelerDuelInfo} + */ + public static final class TravelerDuelInfo extends ProtoMessage<TravelerDuelInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 DuelLevel = 1;</code> + */ + private int duelLevel; + + /** + * <code>optional uint32 DuelExp = 2;</code> + */ + private int duelExp; + + /** + * <code>optional uint32 WeeklyAwardTimes = 3;</code> + */ + private int weeklyAwardTimes; + + /** + * <code>optional .TravelerDuelChallengeInfo Challenge = 5;</code> + */ + private final Public.TravelerDuelChallengeInfo challenge = Public.TravelerDuelChallengeInfo.newInstance(); + + /** + * <code>optional .Quests Quests = 6;</code> + */ + private final Public.Quests quests = Public.Quests.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .TravelerDuelBossLevel Levels = 4;</code> + */ + private final RepeatedMessage<Public.TravelerDuelBossLevel> levels = RepeatedMessage.newEmptyInstance(Public.TravelerDuelBossLevel.getFactory()); + + private TravelerDuelInfo() { + } + + /** + * @return a new empty instance of {@code TravelerDuelInfo} + */ + public static TravelerDuelInfo newInstance() { + return new TravelerDuelInfo(); + } + + /** + * <code>optional uint32 DuelLevel = 1;</code> + * @return whether the duelLevel field is set + */ + public boolean hasDuelLevel() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 DuelLevel = 1;</code> + * @return this + */ + public TravelerDuelInfo clearDuelLevel() { + bitField0_ &= ~0x00000001; + duelLevel = 0; + return this; + } + + /** + * <code>optional uint32 DuelLevel = 1;</code> + * @return the duelLevel + */ + public int getDuelLevel() { + return duelLevel; + } + + /** + * <code>optional uint32 DuelLevel = 1;</code> + * @param value the duelLevel to set + * @return this + */ + public TravelerDuelInfo setDuelLevel(final int value) { + bitField0_ |= 0x00000001; + duelLevel = value; + return this; + } + + /** + * <code>optional uint32 DuelExp = 2;</code> + * @return whether the duelExp field is set + */ + public boolean hasDuelExp() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 DuelExp = 2;</code> + * @return this + */ + public TravelerDuelInfo clearDuelExp() { + bitField0_ &= ~0x00000002; + duelExp = 0; + return this; + } + + /** + * <code>optional uint32 DuelExp = 2;</code> + * @return the duelExp + */ + public int getDuelExp() { + return duelExp; + } + + /** + * <code>optional uint32 DuelExp = 2;</code> + * @param value the duelExp to set + * @return this + */ + public TravelerDuelInfo setDuelExp(final int value) { + bitField0_ |= 0x00000002; + duelExp = value; + return this; + } + + /** + * <code>optional uint32 WeeklyAwardTimes = 3;</code> + * @return whether the weeklyAwardTimes field is set + */ + public boolean hasWeeklyAwardTimes() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 WeeklyAwardTimes = 3;</code> + * @return this + */ + public TravelerDuelInfo clearWeeklyAwardTimes() { + bitField0_ &= ~0x00000004; + weeklyAwardTimes = 0; + return this; + } + + /** + * <code>optional uint32 WeeklyAwardTimes = 3;</code> + * @return the weeklyAwardTimes + */ + public int getWeeklyAwardTimes() { + return weeklyAwardTimes; + } + + /** + * <code>optional uint32 WeeklyAwardTimes = 3;</code> + * @param value the weeklyAwardTimes to set + * @return this + */ + public TravelerDuelInfo setWeeklyAwardTimes(final int value) { + bitField0_ |= 0x00000004; + weeklyAwardTimes = value; + return this; + } + + /** + * <code>optional .TravelerDuelChallengeInfo Challenge = 5;</code> + * @return whether the challenge field is set + */ + public boolean hasChallenge() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional .TravelerDuelChallengeInfo Challenge = 5;</code> + * @return this + */ + public TravelerDuelInfo clearChallenge() { + bitField0_ &= ~0x00000008; + challenge.clear(); + return this; + } + + /** + * <code>optional .TravelerDuelChallengeInfo Challenge = 5;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChallenge()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.TravelerDuelChallengeInfo getChallenge() { + return challenge; + } + + /** + * <code>optional .TravelerDuelChallengeInfo Challenge = 5;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.TravelerDuelChallengeInfo getMutableChallenge() { + bitField0_ |= 0x00000008; + return challenge; + } + + /** + * <code>optional .TravelerDuelChallengeInfo Challenge = 5;</code> + * @param value the challenge to set + * @return this + */ + public TravelerDuelInfo setChallenge(final Public.TravelerDuelChallengeInfo value) { + bitField0_ |= 0x00000008; + challenge.copyFrom(value); + return this; + } + + /** + * <code>optional .Quests Quests = 6;</code> + * @return whether the quests field is set + */ + public boolean hasQuests() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional .Quests Quests = 6;</code> + * @return this + */ + public TravelerDuelInfo clearQuests() { + bitField0_ &= ~0x00000010; + quests.clear(); + return this; + } + + /** + * <code>optional .Quests Quests = 6;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuests()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Quests getQuests() { + return quests; + } + + /** + * <code>optional .Quests Quests = 6;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Quests getMutableQuests() { + bitField0_ |= 0x00000010; + return quests; + } + + /** + * <code>optional .Quests Quests = 6;</code> + * @param value the quests to set + * @return this + */ + public TravelerDuelInfo setQuests(final Public.Quests value) { + bitField0_ |= 0x00000010; + quests.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelInfo clearNextPackage() { + bitField0_ &= ~0x00000020; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000020; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000020; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000020; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .TravelerDuelBossLevel Levels = 4;</code> + * @return whether the levels field is set + */ + public boolean hasLevels() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>repeated .TravelerDuelBossLevel Levels = 4;</code> + * @return this + */ + public TravelerDuelInfo clearLevels() { + bitField0_ &= ~0x00000040; + levels.clear(); + return this; + } + + /** + * <code>repeated .TravelerDuelBossLevel Levels = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableLevels()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.TravelerDuelBossLevel> getLevels() { + return levels; + } + + /** + * <code>repeated .TravelerDuelBossLevel Levels = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.TravelerDuelBossLevel> getMutableLevels() { + bitField0_ |= 0x00000040; + return levels; + } + + /** + * <code>repeated .TravelerDuelBossLevel Levels = 4;</code> + * @param value the levels to add + * @return this + */ + public TravelerDuelInfo addLevels(final Public.TravelerDuelBossLevel value) { + bitField0_ |= 0x00000040; + levels.add(value); + return this; + } + + /** + * <code>repeated .TravelerDuelBossLevel Levels = 4;</code> + * @param values the levels to add + * @return this + */ + public TravelerDuelInfo addAllLevels(final Public.TravelerDuelBossLevel... values) { + bitField0_ |= 0x00000040; + levels.addAll(values); + return this; + } + + @Override + public TravelerDuelInfo copyFrom(final TravelerDuelInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + duelLevel = other.duelLevel; + duelExp = other.duelExp; + weeklyAwardTimes = other.weeklyAwardTimes; + challenge.copyFrom(other.challenge); + quests.copyFrom(other.quests); + nextPackage.copyFrom(other.nextPackage); + levels.copyFrom(other.levels); + } + return this; + } + + @Override + public TravelerDuelInfo mergeFrom(final TravelerDuelInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDuelLevel()) { + setDuelLevel(other.duelLevel); + } + if (other.hasDuelExp()) { + setDuelExp(other.duelExp); + } + if (other.hasWeeklyAwardTimes()) { + setWeeklyAwardTimes(other.weeklyAwardTimes); + } + if (other.hasChallenge()) { + getMutableChallenge().mergeFrom(other.challenge); + } + if (other.hasQuests()) { + getMutableQuests().mergeFrom(other.quests); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasLevels()) { + getMutableLevels().addAll(other.levels); + } + return this; + } + + @Override + public TravelerDuelInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + duelLevel = 0; + duelExp = 0; + weeklyAwardTimes = 0; + challenge.clear(); + quests.clear(); + nextPackage.clear(); + levels.clear(); + return this; + } + + @Override + public TravelerDuelInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + challenge.clearQuick(); + quests.clearQuick(); + nextPackage.clear(); + levels.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelInfo)) { + return false; + } + TravelerDuelInfo other = (TravelerDuelInfo) o; + return bitField0_ == other.bitField0_ + && (!hasDuelLevel() || duelLevel == other.duelLevel) + && (!hasDuelExp() || duelExp == other.duelExp) + && (!hasWeeklyAwardTimes() || weeklyAwardTimes == other.weeklyAwardTimes) + && (!hasChallenge() || challenge.equals(other.challenge)) + && (!hasQuests() || quests.equals(other.quests)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasLevels() || levels.equals(other.levels)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(duelLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(duelExp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(weeklyAwardTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(challenge); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(quests); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + for (int i = 0; i < levels.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(levels.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(duelLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(duelExp); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(weeklyAwardTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(challenge); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(quests); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + size += (1 * levels.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(levels); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // duelLevel + duelLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // duelExp + duelExp = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // weeklyAwardTimes + weeklyAwardTimes = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // challenge + input.readMessage(challenge); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // quests + input.readMessage(quests); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // levels + tag = input.readRepeatedMessage(levels, tag); + bitField0_ |= 0x00000040; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.duelLevel, duelLevel); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.duelExp, duelExp); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.weeklyAwardTimes, weeklyAwardTimes); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.challenge, challenge); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.quests, quests); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRepeatedMessage(FieldNames.levels, levels); + } + output.endObject(); + } + + @Override + public TravelerDuelInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2006347084: { + if (input.isAtField(FieldNames.duelLevel)) { + if (!input.trySkipNullValue()) { + duelLevel = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -628085275: { + if (input.isAtField(FieldNames.duelExp)) { + if (!input.trySkipNullValue()) { + duelExp = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 355811946: { + if (input.isAtField(FieldNames.weeklyAwardTimes)) { + if (!input.trySkipNullValue()) { + weeklyAwardTimes = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -888366013: { + if (input.isAtField(FieldNames.challenge)) { + if (!input.trySkipNullValue()) { + input.readMessage(challenge); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1864830991: { + if (input.isAtField(FieldNames.quests)) { + if (!input.trySkipNullValue()) { + input.readMessage(quests); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2022260337: { + if (input.isAtField(FieldNames.levels)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(levels); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelInfo clone() { + return new TravelerDuelInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelInfo(), data).checkInitialized(); + } + + public static TravelerDuelInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelInfo(), input).checkInitialized(); + } + + public static TravelerDuelInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelInfo messages + */ + public static MessageFactory<TravelerDuelInfo> getFactory() { + return TravelerDuelInfoFactory.INSTANCE; + } + + private enum TravelerDuelInfoFactory implements MessageFactory<TravelerDuelInfo> { + INSTANCE; + + @Override + public TravelerDuelInfo create() { + return TravelerDuelInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName duelLevel = FieldName.forField("DuelLevel"); + + static final FieldName duelExp = FieldName.forField("DuelExp"); + + static final FieldName weeklyAwardTimes = FieldName.forField("WeeklyAwardTimes"); + + static final FieldName challenge = FieldName.forField("Challenge"); + + static final FieldName quests = FieldName.forField("Quests"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName levels = FieldName.forField("Levels"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TravelerDuelLevelApply.java b/src/generated/main/emu/nebula/proto/TravelerDuelLevelApply.java new file mode 100644 index 0000000..e631d16 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TravelerDuelLevelApply.java @@ -0,0 +1,584 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class TravelerDuelLevelApply { + /** + * Protobuf type {@code TravelerDuelLevelApplyReq} + */ + public static final class TravelerDuelLevelApplyReq extends ProtoMessage<TravelerDuelLevelApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 2;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 AffixIds = 3;</code> + */ + private final RepeatedInt affixIds = RepeatedInt.newEmptyInstance(); + + private TravelerDuelLevelApplyReq() { + } + + /** + * @return a new empty instance of {@code TravelerDuelLevelApplyReq} + */ + public static TravelerDuelLevelApplyReq newInstance() { + return new TravelerDuelLevelApplyReq(); + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return this + */ + public TravelerDuelLevelApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @param value the buildId to set + * @return this + */ + public TravelerDuelLevelApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public TravelerDuelLevelApplyReq clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public TravelerDuelLevelApplyReq setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelLevelApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelLevelApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelLevelApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelLevelApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 AffixIds = 3;</code> + * @return whether the affixIds field is set + */ + public boolean hasAffixIds() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 AffixIds = 3;</code> + * @return this + */ + public TravelerDuelLevelApplyReq clearAffixIds() { + bitField0_ &= ~0x00000008; + affixIds.clear(); + return this; + } + + /** + * <code>repeated uint32 AffixIds = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAffixIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getAffixIds() { + return affixIds; + } + + /** + * <code>repeated uint32 AffixIds = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableAffixIds() { + bitField0_ |= 0x00000008; + return affixIds; + } + + /** + * <code>repeated uint32 AffixIds = 3;</code> + * @param value the affixIds to add + * @return this + */ + public TravelerDuelLevelApplyReq addAffixIds(final int value) { + bitField0_ |= 0x00000008; + affixIds.add(value); + return this; + } + + /** + * <code>repeated uint32 AffixIds = 3;</code> + * @param values the affixIds to add + * @return this + */ + public TravelerDuelLevelApplyReq addAllAffixIds(final int... values) { + bitField0_ |= 0x00000008; + affixIds.addAll(values); + return this; + } + + @Override + public TravelerDuelLevelApplyReq copyFrom(final TravelerDuelLevelApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + affixIds.copyFrom(other.affixIds); + } + return this; + } + + @Override + public TravelerDuelLevelApplyReq mergeFrom(final TravelerDuelLevelApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAffixIds()) { + getMutableAffixIds().addAll(other.affixIds); + } + return this; + } + + @Override + public TravelerDuelLevelApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + nextPackage.clear(); + affixIds.clear(); + return this; + } + + @Override + public TravelerDuelLevelApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + affixIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelLevelApplyReq)) { + return false; + } + TravelerDuelLevelApplyReq other = (TravelerDuelLevelApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAffixIds() || affixIds.equals(other.affixIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < affixIds.length(); i++) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(affixIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * affixIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(affixIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelLevelApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // affixIds [packed=true] + input.readPackedUInt32(affixIds, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 24: { + // affixIds [packed=false] + tag = input.readRepeatedUInt32(affixIds, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.affixIds, affixIds); + } + output.endObject(); + } + + @Override + public TravelerDuelLevelApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 670408424: { + if (input.isAtField(FieldNames.affixIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(affixIds); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelLevelApplyReq clone() { + return new TravelerDuelLevelApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelLevelApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelApplyReq(), data).checkInitialized(); + } + + public static TravelerDuelLevelApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelApplyReq(), input).checkInitialized(); + } + + public static TravelerDuelLevelApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelLevelApplyReq messages + */ + public static MessageFactory<TravelerDuelLevelApplyReq> getFactory() { + return TravelerDuelLevelApplyReqFactory.INSTANCE; + } + + private enum TravelerDuelLevelApplyReqFactory implements MessageFactory<TravelerDuelLevelApplyReq> { + INSTANCE; + + @Override + public TravelerDuelLevelApplyReq create() { + return TravelerDuelLevelApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName affixIds = FieldName.forField("AffixIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TravelerDuelLevelSettle.java b/src/generated/main/emu/nebula/proto/TravelerDuelLevelSettle.java new file mode 100644 index 0000000..6d20765 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TravelerDuelLevelSettle.java @@ -0,0 +1,2127 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class TravelerDuelLevelSettle { + /** + * Protobuf type {@code TravelerDuelLevelSettleReq} + */ + public static final class TravelerDuelLevelSettleReq extends ProtoMessage<TravelerDuelLevelSettleReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Star = 1;</code> + */ + private int star; + + /** + * <code>optional uint32 Time = 2;</code> + */ + private int time; + + /** + * <code>optional .Events Events = 15;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TravelerDuelLevelSettleReq() { + } + + /** + * @return a new empty instance of {@code TravelerDuelLevelSettleReq} + */ + public static TravelerDuelLevelSettleReq newInstance() { + return new TravelerDuelLevelSettleReq(); + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return whether the star field is set + */ + public boolean hasStar() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return this + */ + public TravelerDuelLevelSettleReq clearStar() { + bitField0_ &= ~0x00000001; + star = 0; + return this; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @return the star + */ + public int getStar() { + return star; + } + + /** + * <code>optional uint32 Star = 1;</code> + * @param value the star to set + * @return this + */ + public TravelerDuelLevelSettleReq setStar(final int value) { + bitField0_ |= 0x00000001; + star = value; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return this + */ + public TravelerDuelLevelSettleReq clearTime() { + bitField0_ &= ~0x00000002; + time = 0; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return the time + */ + public int getTime() { + return time; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @param value the time to set + * @return this + */ + public TravelerDuelLevelSettleReq setTime(final int value) { + bitField0_ |= 0x00000002; + time = value; + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .Events Events = 15;</code> + * @return this + */ + public TravelerDuelLevelSettleReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * <code>optional .Events Events = 15;</code> + * @param value the events to set + * @return this + */ + public TravelerDuelLevelSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelLevelSettleReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelLevelSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelLevelSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelLevelSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TravelerDuelLevelSettleReq copyFrom(final TravelerDuelLevelSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + star = other.star; + time = other.time; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelLevelSettleReq mergeFrom(final TravelerDuelLevelSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStar()) { + setStar(other.star); + } + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelLevelSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + star = 0; + time = 0; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public TravelerDuelLevelSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelLevelSettleReq)) { + return false; + } + TravelerDuelLevelSettleReq other = (TravelerDuelLevelSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasStar() || star == other.star) + && (!hasTime() || time == other.time) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(star); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelLevelSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // star + star = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 122) { + break; + } + } + case 122: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.star, star); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TravelerDuelLevelSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2587250: { + if (input.isAtField(FieldNames.star)) { + if (!input.trySkipNullValue()) { + star = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelLevelSettleReq clone() { + return new TravelerDuelLevelSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelLevelSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelSettleReq(), data).checkInitialized(); + } + + public static TravelerDuelLevelSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelSettleReq(), input).checkInitialized(); + } + + public static TravelerDuelLevelSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelLevelSettleReq messages + */ + public static MessageFactory<TravelerDuelLevelSettleReq> getFactory() { + return TravelerDuelLevelSettleReqFactory.INSTANCE; + } + + private enum TravelerDuelLevelSettleReqFactory implements MessageFactory<TravelerDuelLevelSettleReq> { + INSTANCE; + + @Override + public TravelerDuelLevelSettleReq create() { + return TravelerDuelLevelSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName star = FieldName.forField("Star"); + + static final FieldName time = FieldName.forField("Time"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TravelerDuelLevelSettleResp} + */ + public static final class TravelerDuelLevelSettleResp extends ProtoMessage<TravelerDuelLevelSettleResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int32 DuelExpChange = 7;</code> + */ + private int duelExpChange; + + /** + * <code>optional uint32 DuelLevel = 5;</code> + */ + private int duelLevel; + + /** + * <code>optional uint32 DuelExp = 6;</code> + */ + private int duelExp; + + /** + * <code>optional uint32 BaseScore = 9;</code> + */ + private int baseScore; + + /** + * <code>optional uint32 TimeScore = 10;</code> + */ + private int timeScore; + + /** + * <code>optional uint32 FinalScore = 11;</code> + */ + private int finalScore; + + /** + * <code>optional uint32 MaxScore = 12;</code> + */ + private int maxScore; + + /** + * <code>optional uint32 UploadRemainTimes = 13;</code> + */ + private int uploadRemainTimes; + + /** + * <code>optional bool First = 1;</code> + */ + private boolean first; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + */ + private final RepeatedMessage<Public.ItemTpl> awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + */ + private final RepeatedMessage<Public.ItemTpl> firstItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .AffinityInfo Affinities = 8;</code> + */ + private final RepeatedMessage<Public.AffinityInfo> affinities = RepeatedMessage.newEmptyInstance(Public.AffinityInfo.getFactory()); + + /** + * <code>repeated .ItemTpl SurpriseItems = 14;</code> + */ + private final RepeatedMessage<Public.ItemTpl> surpriseItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private TravelerDuelLevelSettleResp() { + } + + /** + * @return a new empty instance of {@code TravelerDuelLevelSettleResp} + */ + public static TravelerDuelLevelSettleResp newInstance() { + return new TravelerDuelLevelSettleResp(); + } + + /** + * <code>optional int32 DuelExpChange = 7;</code> + * @return whether the duelExpChange field is set + */ + public boolean hasDuelExpChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int32 DuelExpChange = 7;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearDuelExpChange() { + bitField0_ &= ~0x00000001; + duelExpChange = 0; + return this; + } + + /** + * <code>optional int32 DuelExpChange = 7;</code> + * @return the duelExpChange + */ + public int getDuelExpChange() { + return duelExpChange; + } + + /** + * <code>optional int32 DuelExpChange = 7;</code> + * @param value the duelExpChange to set + * @return this + */ + public TravelerDuelLevelSettleResp setDuelExpChange(final int value) { + bitField0_ |= 0x00000001; + duelExpChange = value; + return this; + } + + /** + * <code>optional uint32 DuelLevel = 5;</code> + * @return whether the duelLevel field is set + */ + public boolean hasDuelLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 DuelLevel = 5;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearDuelLevel() { + bitField0_ &= ~0x00000002; + duelLevel = 0; + return this; + } + + /** + * <code>optional uint32 DuelLevel = 5;</code> + * @return the duelLevel + */ + public int getDuelLevel() { + return duelLevel; + } + + /** + * <code>optional uint32 DuelLevel = 5;</code> + * @param value the duelLevel to set + * @return this + */ + public TravelerDuelLevelSettleResp setDuelLevel(final int value) { + bitField0_ |= 0x00000002; + duelLevel = value; + return this; + } + + /** + * <code>optional uint32 DuelExp = 6;</code> + * @return whether the duelExp field is set + */ + public boolean hasDuelExp() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 DuelExp = 6;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearDuelExp() { + bitField0_ &= ~0x00000004; + duelExp = 0; + return this; + } + + /** + * <code>optional uint32 DuelExp = 6;</code> + * @return the duelExp + */ + public int getDuelExp() { + return duelExp; + } + + /** + * <code>optional uint32 DuelExp = 6;</code> + * @param value the duelExp to set + * @return this + */ + public TravelerDuelLevelSettleResp setDuelExp(final int value) { + bitField0_ |= 0x00000004; + duelExp = value; + return this; + } + + /** + * <code>optional uint32 BaseScore = 9;</code> + * @return whether the baseScore field is set + */ + public boolean hasBaseScore() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 BaseScore = 9;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearBaseScore() { + bitField0_ &= ~0x00000008; + baseScore = 0; + return this; + } + + /** + * <code>optional uint32 BaseScore = 9;</code> + * @return the baseScore + */ + public int getBaseScore() { + return baseScore; + } + + /** + * <code>optional uint32 BaseScore = 9;</code> + * @param value the baseScore to set + * @return this + */ + public TravelerDuelLevelSettleResp setBaseScore(final int value) { + bitField0_ |= 0x00000008; + baseScore = value; + return this; + } + + /** + * <code>optional uint32 TimeScore = 10;</code> + * @return whether the timeScore field is set + */ + public boolean hasTimeScore() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 TimeScore = 10;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearTimeScore() { + bitField0_ &= ~0x00000010; + timeScore = 0; + return this; + } + + /** + * <code>optional uint32 TimeScore = 10;</code> + * @return the timeScore + */ + public int getTimeScore() { + return timeScore; + } + + /** + * <code>optional uint32 TimeScore = 10;</code> + * @param value the timeScore to set + * @return this + */ + public TravelerDuelLevelSettleResp setTimeScore(final int value) { + bitField0_ |= 0x00000010; + timeScore = value; + return this; + } + + /** + * <code>optional uint32 FinalScore = 11;</code> + * @return whether the finalScore field is set + */ + public boolean hasFinalScore() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 FinalScore = 11;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearFinalScore() { + bitField0_ &= ~0x00000020; + finalScore = 0; + return this; + } + + /** + * <code>optional uint32 FinalScore = 11;</code> + * @return the finalScore + */ + public int getFinalScore() { + return finalScore; + } + + /** + * <code>optional uint32 FinalScore = 11;</code> + * @param value the finalScore to set + * @return this + */ + public TravelerDuelLevelSettleResp setFinalScore(final int value) { + bitField0_ |= 0x00000020; + finalScore = value; + return this; + } + + /** + * <code>optional uint32 MaxScore = 12;</code> + * @return whether the maxScore field is set + */ + public boolean hasMaxScore() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 MaxScore = 12;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearMaxScore() { + bitField0_ &= ~0x00000040; + maxScore = 0; + return this; + } + + /** + * <code>optional uint32 MaxScore = 12;</code> + * @return the maxScore + */ + public int getMaxScore() { + return maxScore; + } + + /** + * <code>optional uint32 MaxScore = 12;</code> + * @param value the maxScore to set + * @return this + */ + public TravelerDuelLevelSettleResp setMaxScore(final int value) { + bitField0_ |= 0x00000040; + maxScore = value; + return this; + } + + /** + * <code>optional uint32 UploadRemainTimes = 13;</code> + * @return whether the uploadRemainTimes field is set + */ + public boolean hasUploadRemainTimes() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional uint32 UploadRemainTimes = 13;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearUploadRemainTimes() { + bitField0_ &= ~0x00000080; + uploadRemainTimes = 0; + return this; + } + + /** + * <code>optional uint32 UploadRemainTimes = 13;</code> + * @return the uploadRemainTimes + */ + public int getUploadRemainTimes() { + return uploadRemainTimes; + } + + /** + * <code>optional uint32 UploadRemainTimes = 13;</code> + * @param value the uploadRemainTimes to set + * @return this + */ + public TravelerDuelLevelSettleResp setUploadRemainTimes(final int value) { + bitField0_ |= 0x00000080; + uploadRemainTimes = value; + return this; + } + + /** + * <code>optional bool First = 1;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional bool First = 1;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearFirst() { + bitField0_ &= ~0x00000100; + first = false; + return this; + } + + /** + * <code>optional bool First = 1;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 1;</code> + * @param value the first to set + * @return this + */ + public TravelerDuelLevelSettleResp setFirst(final boolean value) { + bitField0_ |= 0x00000100; + first = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearChange() { + bitField0_ &= ~0x00000200; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000200; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public TravelerDuelLevelSettleResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000200; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearNextPackage() { + bitField0_ &= ~0x00000400; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000400; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelLevelSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000400; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelLevelSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000400; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelLevelSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000400; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearAwardItems() { + bitField0_ &= ~0x00000800; + awardItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getAwardItems() { + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableAwardItems() { + bitField0_ |= 0x00000800; + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @param value the awardItems to add + * @return this + */ + public TravelerDuelLevelSettleResp addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000800; + awardItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @param values the awardItems to add + * @return this + */ + public TravelerDuelLevelSettleResp addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000800; + awardItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @return whether the firstItems field is set + */ + public boolean hasFirstItems() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearFirstItems() { + bitField0_ &= ~0x00001000; + firstItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFirstItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getFirstItems() { + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableFirstItems() { + bitField0_ |= 0x00001000; + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @param value the firstItems to add + * @return this + */ + public TravelerDuelLevelSettleResp addFirstItems(final Public.ItemTpl value) { + bitField0_ |= 0x00001000; + firstItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @param values the firstItems to add + * @return this + */ + public TravelerDuelLevelSettleResp addAllFirstItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00001000; + firstItems.addAll(values); + return this; + } + + /** + * <code>repeated .AffinityInfo Affinities = 8;</code> + * @return whether the affinities field is set + */ + public boolean hasAffinities() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * <code>repeated .AffinityInfo Affinities = 8;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearAffinities() { + bitField0_ &= ~0x00002000; + affinities.clear(); + return this; + } + + /** + * <code>repeated .AffinityInfo Affinities = 8;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAffinities()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.AffinityInfo> getAffinities() { + return affinities; + } + + /** + * <code>repeated .AffinityInfo Affinities = 8;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.AffinityInfo> getMutableAffinities() { + bitField0_ |= 0x00002000; + return affinities; + } + + /** + * <code>repeated .AffinityInfo Affinities = 8;</code> + * @param value the affinities to add + * @return this + */ + public TravelerDuelLevelSettleResp addAffinities(final Public.AffinityInfo value) { + bitField0_ |= 0x00002000; + affinities.add(value); + return this; + } + + /** + * <code>repeated .AffinityInfo Affinities = 8;</code> + * @param values the affinities to add + * @return this + */ + public TravelerDuelLevelSettleResp addAllAffinities(final Public.AffinityInfo... values) { + bitField0_ |= 0x00002000; + affinities.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 14;</code> + * @return whether the surpriseItems field is set + */ + public boolean hasSurpriseItems() { + return (bitField0_ & 0x00004000) != 0; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 14;</code> + * @return this + */ + public TravelerDuelLevelSettleResp clearSurpriseItems() { + bitField0_ &= ~0x00004000; + surpriseItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 14;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSurpriseItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getSurpriseItems() { + return surpriseItems; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 14;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableSurpriseItems() { + bitField0_ |= 0x00004000; + return surpriseItems; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 14;</code> + * @param value the surpriseItems to add + * @return this + */ + public TravelerDuelLevelSettleResp addSurpriseItems(final Public.ItemTpl value) { + bitField0_ |= 0x00004000; + surpriseItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl SurpriseItems = 14;</code> + * @param values the surpriseItems to add + * @return this + */ + public TravelerDuelLevelSettleResp addAllSurpriseItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00004000; + surpriseItems.addAll(values); + return this; + } + + @Override + public TravelerDuelLevelSettleResp copyFrom(final TravelerDuelLevelSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + duelExpChange = other.duelExpChange; + duelLevel = other.duelLevel; + duelExp = other.duelExp; + baseScore = other.baseScore; + timeScore = other.timeScore; + finalScore = other.finalScore; + maxScore = other.maxScore; + uploadRemainTimes = other.uploadRemainTimes; + first = other.first; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + firstItems.copyFrom(other.firstItems); + affinities.copyFrom(other.affinities); + surpriseItems.copyFrom(other.surpriseItems); + } + return this; + } + + @Override + public TravelerDuelLevelSettleResp mergeFrom(final TravelerDuelLevelSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDuelExpChange()) { + setDuelExpChange(other.duelExpChange); + } + if (other.hasDuelLevel()) { + setDuelLevel(other.duelLevel); + } + if (other.hasDuelExp()) { + setDuelExp(other.duelExp); + } + if (other.hasBaseScore()) { + setBaseScore(other.baseScore); + } + if (other.hasTimeScore()) { + setTimeScore(other.timeScore); + } + if (other.hasFinalScore()) { + setFinalScore(other.finalScore); + } + if (other.hasMaxScore()) { + setMaxScore(other.maxScore); + } + if (other.hasUploadRemainTimes()) { + setUploadRemainTimes(other.uploadRemainTimes); + } + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + if (other.hasFirstItems()) { + getMutableFirstItems().addAll(other.firstItems); + } + if (other.hasAffinities()) { + getMutableAffinities().addAll(other.affinities); + } + if (other.hasSurpriseItems()) { + getMutableSurpriseItems().addAll(other.surpriseItems); + } + return this; + } + + @Override + public TravelerDuelLevelSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + duelExpChange = 0; + duelLevel = 0; + duelExp = 0; + baseScore = 0; + timeScore = 0; + finalScore = 0; + maxScore = 0; + uploadRemainTimes = 0; + first = false; + change.clear(); + nextPackage.clear(); + awardItems.clear(); + firstItems.clear(); + affinities.clear(); + surpriseItems.clear(); + return this; + } + + @Override + public TravelerDuelLevelSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + awardItems.clearQuick(); + firstItems.clearQuick(); + affinities.clearQuick(); + surpriseItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelLevelSettleResp)) { + return false; + } + TravelerDuelLevelSettleResp other = (TravelerDuelLevelSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasDuelExpChange() || duelExpChange == other.duelExpChange) + && (!hasDuelLevel() || duelLevel == other.duelLevel) + && (!hasDuelExp() || duelExp == other.duelExp) + && (!hasBaseScore() || baseScore == other.baseScore) + && (!hasTimeScore() || timeScore == other.timeScore) + && (!hasFinalScore() || finalScore == other.finalScore) + && (!hasMaxScore() || maxScore == other.maxScore) + && (!hasUploadRemainTimes() || uploadRemainTimes == other.uploadRemainTimes) + && (!hasFirst() || first == other.first) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)) + && (!hasFirstItems() || firstItems.equals(other.firstItems)) + && (!hasAffinities() || affinities.equals(other.affinities)) + && (!hasSurpriseItems() || surpriseItems.equals(other.surpriseItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 56); + output.writeInt32NoTag(duelExpChange); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(duelLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(duelExp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(baseScore); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(timeScore); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 88); + output.writeUInt32NoTag(finalScore); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 96); + output.writeUInt32NoTag(maxScore); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 104); + output.writeUInt32NoTag(uploadRemainTimes); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000800) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(awardItems.get(i)); + } + } + if ((bitField0_ & 0x00001000) != 0) { + for (int i = 0; i < firstItems.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(firstItems.get(i)); + } + } + if ((bitField0_ & 0x00002000) != 0) { + for (int i = 0; i < affinities.length(); i++) { + output.writeRawByte((byte) 66); + output.writeMessageNoTag(affinities.get(i)); + } + } + if ((bitField0_ & 0x00004000) != 0) { + for (int i = 0; i < surpriseItems.length(); i++) { + output.writeRawByte((byte) 114); + output.writeMessageNoTag(surpriseItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(duelExpChange); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(duelLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(duelExp); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(baseScore); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(timeScore); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(finalScore); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(maxScore); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(uploadRemainTimes); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000800) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + if ((bitField0_ & 0x00001000) != 0) { + size += (1 * firstItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(firstItems); + } + if ((bitField0_ & 0x00002000) != 0) { + size += (1 * affinities.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(affinities); + } + if ((bitField0_ & 0x00004000) != 0) { + size += (1 * surpriseItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(surpriseItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelLevelSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 56: { + // duelExpChange + duelExpChange = input.readInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // duelLevel + duelLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // duelExp + duelExp = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // baseScore + baseScore = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 80) { + break; + } + } + case 80: { + // timeScore + timeScore = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 88) { + break; + } + } + case 88: { + // finalScore + finalScore = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 96) { + break; + } + } + case 96: { + // maxScore + maxScore = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 104) { + break; + } + } + case 104: { + // uploadRemainTimes + uploadRemainTimes = input.readUInt32(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // first + first = input.readBool(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000800; + if (tag != 34) { + break; + } + } + case 34: { + // firstItems + tag = input.readRepeatedMessage(firstItems, tag); + bitField0_ |= 0x00001000; + if (tag != 66) { + break; + } + } + case 66: { + // affinities + tag = input.readRepeatedMessage(affinities, tag); + bitField0_ |= 0x00002000; + if (tag != 114) { + break; + } + } + case 114: { + // surpriseItems + tag = input.readRepeatedMessage(surpriseItems, tag); + bitField0_ |= 0x00004000; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt32(FieldNames.duelExpChange, duelExpChange); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.duelLevel, duelLevel); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.duelExp, duelExp); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.baseScore, baseScore); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.timeScore, timeScore); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.finalScore, finalScore); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.maxScore, maxScore); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeUInt32(FieldNames.uploadRemainTimes, uploadRemainTimes); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRepeatedMessage(FieldNames.firstItems, firstItems); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRepeatedMessage(FieldNames.affinities, affinities); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeRepeatedMessage(FieldNames.surpriseItems, surpriseItems); + } + output.endObject(); + } + + @Override + public TravelerDuelLevelSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -248943115: { + if (input.isAtField(FieldNames.duelExpChange)) { + if (!input.trySkipNullValue()) { + duelExpChange = input.readInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2006347084: { + if (input.isAtField(FieldNames.duelLevel)) { + if (!input.trySkipNullValue()) { + duelLevel = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -628085275: { + if (input.isAtField(FieldNames.duelExp)) { + if (!input.trySkipNullValue()) { + duelExp = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 175964705: { + if (input.isAtField(FieldNames.baseScore)) { + if (!input.trySkipNullValue()) { + baseScore = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2029048741: { + if (input.isAtField(FieldNames.timeScore)) { + if (!input.trySkipNullValue()) { + timeScore = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 120578780: { + if (input.isAtField(FieldNames.finalScore)) { + if (!input.trySkipNullValue()) { + finalScore = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 461163438: { + if (input.isAtField(FieldNames.maxScore)) { + if (!input.trySkipNullValue()) { + maxScore = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1281247399: { + if (input.isAtField(FieldNames.uploadRemainTimes)) { + if (!input.trySkipNullValue()) { + uploadRemainTimes = input.readUInt32(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1812344592: { + if (input.isAtField(FieldNames.firstItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(firstItems); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -238867482: { + if (input.isAtField(FieldNames.affinities)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(affinities); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 477801015: { + if (input.isAtField(FieldNames.surpriseItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(surpriseItems); + bitField0_ |= 0x00004000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelLevelSettleResp clone() { + return new TravelerDuelLevelSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelLevelSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelSettleResp(), data).checkInitialized(); + } + + public static TravelerDuelLevelSettleResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelSettleResp(), input).checkInitialized(); + } + + public static TravelerDuelLevelSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelLevelSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelLevelSettleResp messages + */ + public static MessageFactory<TravelerDuelLevelSettleResp> getFactory() { + return TravelerDuelLevelSettleRespFactory.INSTANCE; + } + + private enum TravelerDuelLevelSettleRespFactory implements MessageFactory<TravelerDuelLevelSettleResp> { + INSTANCE; + + @Override + public TravelerDuelLevelSettleResp create() { + return TravelerDuelLevelSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName duelExpChange = FieldName.forField("DuelExpChange"); + + static final FieldName duelLevel = FieldName.forField("DuelLevel"); + + static final FieldName duelExp = FieldName.forField("DuelExp"); + + static final FieldName baseScore = FieldName.forField("BaseScore"); + + static final FieldName timeScore = FieldName.forField("TimeScore"); + + static final FieldName finalScore = FieldName.forField("FinalScore"); + + static final FieldName maxScore = FieldName.forField("MaxScore"); + + static final FieldName uploadRemainTimes = FieldName.forField("UploadRemainTimes"); + + static final FieldName first = FieldName.forField("First"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + + static final FieldName firstItems = FieldName.forField("FirstItems"); + + static final FieldName affinities = FieldName.forField("Affinities"); + + static final FieldName surpriseItems = FieldName.forField("SurpriseItems"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TravelerDuelQuestRewardReceive.java b/src/generated/main/emu/nebula/proto/TravelerDuelQuestRewardReceive.java new file mode 100644 index 0000000..0a1d83c --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TravelerDuelQuestRewardReceive.java @@ -0,0 +1,1008 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class TravelerDuelQuestRewardReceive { + /** + * Protobuf type {@code TravelerDuelQuestRewardReceiveReq} + */ + public static final class TravelerDuelQuestRewardReceiveReq extends ProtoMessage<TravelerDuelQuestRewardReceiveReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional .QuestType Type = 2;</code> + */ + private int type; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TravelerDuelQuestRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code TravelerDuelQuestRewardReceiveReq} + */ + public static TravelerDuelQuestRewardReceiveReq newInstance() { + return new TravelerDuelQuestRewardReceiveReq(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public TravelerDuelQuestRewardReceiveReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public TravelerDuelQuestRewardReceiveReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional .QuestType Type = 2;</code> + * @return whether the type field is set + */ + public boolean hasType() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .QuestType Type = 2;</code> + * @return this + */ + public TravelerDuelQuestRewardReceiveReq clearType() { + bitField0_ &= ~0x00000002; + type = 0; + return this; + } + + /** + * <code>optional .QuestType Type = 2;</code> + * @return the type + */ + public Public.QuestType getType() { + return Public.QuestType.forNumber(type); + } + + /** + * Gets the value of the internal enum store. The result is + * equivalent to {@link TravelerDuelQuestRewardReceiveReq#getType()}.getNumber(). + * + * @return numeric wire representation + */ + public int getTypeValue() { + return type; + } + + /** + * Sets the value of the internal enum store. This does not + * do any validity checks, so be sure to use appropriate value + * constants from {@link Public.QuestType}. Setting an invalid value + * can cause {@link TravelerDuelQuestRewardReceiveReq#getType()} to return null + * + * @param value the numeric wire value to set + * @return this + */ + public TravelerDuelQuestRewardReceiveReq setTypeValue(final int value) { + bitField0_ |= 0x00000002; + type = value; + return this; + } + + /** + * <code>optional .QuestType Type = 2;</code> + * @param value the type to set + * @return this + */ + public TravelerDuelQuestRewardReceiveReq setType(final Public.QuestType value) { + bitField0_ |= 0x00000002; + type = value.getNumber(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelQuestRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelQuestRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelQuestRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelQuestRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveReq copyFrom( + final TravelerDuelQuestRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + type = other.type; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveReq mergeFrom( + final TravelerDuelQuestRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasType()) { + setTypeValue(other.type); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + type = 0; + nextPackage.clear(); + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelQuestRewardReceiveReq)) { + return false; + } + TravelerDuelQuestRewardReceiveReq other = (TravelerDuelQuestRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasType() || type == other.type) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeEnumNoTag(type); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeEnumSizeNoTag(type); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelQuestRewardReceiveReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // type + final int value = input.readInt32(); + if (Public.QuestType.forNumber(value) != null) { + type = value; + bitField0_ |= 0x00000002; + } + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeEnum(FieldNames.type, type, Public.QuestType.converter()); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TravelerDuelQuestRewardReceiveReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2622298: { + if (input.isAtField(FieldNames.type)) { + if (!input.trySkipNullValue()) { + final Public.QuestType value = input.readEnum(Public.QuestType.converter()); + if (value != null) { + type = value.getNumber(); + bitField0_ |= 0x00000002; + } else { + input.skipUnknownEnumValue(); + } + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveReq clone() { + return new TravelerDuelQuestRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelQuestRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelQuestRewardReceiveReq(), data).checkInitialized(); + } + + public static TravelerDuelQuestRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TravelerDuelQuestRewardReceiveReq(), input).checkInitialized(); + } + + public static TravelerDuelQuestRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TravelerDuelQuestRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelQuestRewardReceiveReq messages + */ + public static MessageFactory<TravelerDuelQuestRewardReceiveReq> getFactory() { + return TravelerDuelQuestRewardReceiveReqFactory.INSTANCE; + } + + private enum TravelerDuelQuestRewardReceiveReqFactory implements MessageFactory<TravelerDuelQuestRewardReceiveReq> { + INSTANCE; + + @Override + public TravelerDuelQuestRewardReceiveReq create() { + return TravelerDuelQuestRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName type = FieldName.forField("Type"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TravelerDuelQuestRewardReceiveResp} + */ + public static final class TravelerDuelQuestRewardReceiveResp extends ProtoMessage<TravelerDuelQuestRewardReceiveResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl QuestRewards = 1;</code> + */ + private final RepeatedMessage<Public.ItemTpl> questRewards = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private TravelerDuelQuestRewardReceiveResp() { + } + + /** + * @return a new empty instance of {@code TravelerDuelQuestRewardReceiveResp} + */ + public static TravelerDuelQuestRewardReceiveResp newInstance() { + return new TravelerDuelQuestRewardReceiveResp(); + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public TravelerDuelQuestRewardReceiveResp clearChange() { + bitField0_ &= ~0x00000001; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000001; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public TravelerDuelQuestRewardReceiveResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000001; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelQuestRewardReceiveResp clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelQuestRewardReceiveResp addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelQuestRewardReceiveResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelQuestRewardReceiveResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl QuestRewards = 1;</code> + * @return whether the questRewards field is set + */ + public boolean hasQuestRewards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .ItemTpl QuestRewards = 1;</code> + * @return this + */ + public TravelerDuelQuestRewardReceiveResp clearQuestRewards() { + bitField0_ &= ~0x00000004; + questRewards.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl QuestRewards = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuestRewards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getQuestRewards() { + return questRewards; + } + + /** + * <code>repeated .ItemTpl QuestRewards = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableQuestRewards() { + bitField0_ |= 0x00000004; + return questRewards; + } + + /** + * <code>repeated .ItemTpl QuestRewards = 1;</code> + * @param value the questRewards to add + * @return this + */ + public TravelerDuelQuestRewardReceiveResp addQuestRewards(final Public.ItemTpl value) { + bitField0_ |= 0x00000004; + questRewards.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl QuestRewards = 1;</code> + * @param values the questRewards to add + * @return this + */ + public TravelerDuelQuestRewardReceiveResp addAllQuestRewards(final Public.ItemTpl... values) { + bitField0_ |= 0x00000004; + questRewards.addAll(values); + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveResp copyFrom( + final TravelerDuelQuestRewardReceiveResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + questRewards.copyFrom(other.questRewards); + } + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveResp mergeFrom( + final TravelerDuelQuestRewardReceiveResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasQuestRewards()) { + getMutableQuestRewards().addAll(other.questRewards); + } + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clear(); + nextPackage.clear(); + questRewards.clear(); + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + questRewards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelQuestRewardReceiveResp)) { + return false; + } + TravelerDuelQuestRewardReceiveResp other = (TravelerDuelQuestRewardReceiveResp) o; + return bitField0_ == other.bitField0_ + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasQuestRewards() || questRewards.equals(other.questRewards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < questRewards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(questRewards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * questRewards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(questRewards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelQuestRewardReceiveResp mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // questRewards + tag = input.readRepeatedMessage(questRewards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.questRewards, questRewards); + } + output.endObject(); + } + + @Override + public TravelerDuelQuestRewardReceiveResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 776865794: { + if (input.isAtField(FieldNames.questRewards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(questRewards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelQuestRewardReceiveResp clone() { + return new TravelerDuelQuestRewardReceiveResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelQuestRewardReceiveResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelQuestRewardReceiveResp(), data).checkInitialized(); + } + + public static TravelerDuelQuestRewardReceiveResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TravelerDuelQuestRewardReceiveResp(), input).checkInitialized(); + } + + public static TravelerDuelQuestRewardReceiveResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new TravelerDuelQuestRewardReceiveResp(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelQuestRewardReceiveResp messages + */ + public static MessageFactory<TravelerDuelQuestRewardReceiveResp> getFactory() { + return TravelerDuelQuestRewardReceiveRespFactory.INSTANCE; + } + + private enum TravelerDuelQuestRewardReceiveRespFactory implements MessageFactory<TravelerDuelQuestRewardReceiveResp> { + INSTANCE; + + @Override + public TravelerDuelQuestRewardReceiveResp create() { + return TravelerDuelQuestRewardReceiveResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName questRewards = FieldName.forField("QuestRewards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TravelerDuelRank.java b/src/generated/main/emu/nebula/proto/TravelerDuelRank.java new file mode 100644 index 0000000..5abf609 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TravelerDuelRank.java @@ -0,0 +1,2390 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class TravelerDuelRank { + /** + * Protobuf type {@code TravelerDuelRankInfo} + */ + public static final class TravelerDuelRankInfo extends ProtoMessage<TravelerDuelRankInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + */ + private long lastRefreshTime; + + /** + * <code>optional uint32 UploadRemainTimes = 4;</code> + */ + private int uploadRemainTimes; + + /** + * <code>optional .TravelerDuelRankData Self = 2;</code> + */ + private final TravelerDuelRankData self = TravelerDuelRankData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .TravelerDuelRankData Rank = 3;</code> + */ + private final RepeatedMessage<TravelerDuelRankData> rank = RepeatedMessage.newEmptyInstance(TravelerDuelRankData.getFactory()); + + private TravelerDuelRankInfo() { + } + + /** + * @return a new empty instance of {@code TravelerDuelRankInfo} + */ + public static TravelerDuelRankInfo newInstance() { + return new TravelerDuelRankInfo(); + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @return whether the lastRefreshTime field is set + */ + public boolean hasLastRefreshTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @return this + */ + public TravelerDuelRankInfo clearLastRefreshTime() { + bitField0_ &= ~0x00000001; + lastRefreshTime = 0L; + return this; + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @return the lastRefreshTime + */ + public long getLastRefreshTime() { + return lastRefreshTime; + } + + /** + * <code>optional int64 LastRefreshTime = 1;</code> + * @param value the lastRefreshTime to set + * @return this + */ + public TravelerDuelRankInfo setLastRefreshTime(final long value) { + bitField0_ |= 0x00000001; + lastRefreshTime = value; + return this; + } + + /** + * <code>optional uint32 UploadRemainTimes = 4;</code> + * @return whether the uploadRemainTimes field is set + */ + public boolean hasUploadRemainTimes() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 UploadRemainTimes = 4;</code> + * @return this + */ + public TravelerDuelRankInfo clearUploadRemainTimes() { + bitField0_ &= ~0x00000002; + uploadRemainTimes = 0; + return this; + } + + /** + * <code>optional uint32 UploadRemainTimes = 4;</code> + * @return the uploadRemainTimes + */ + public int getUploadRemainTimes() { + return uploadRemainTimes; + } + + /** + * <code>optional uint32 UploadRemainTimes = 4;</code> + * @param value the uploadRemainTimes to set + * @return this + */ + public TravelerDuelRankInfo setUploadRemainTimes(final int value) { + bitField0_ |= 0x00000002; + uploadRemainTimes = value; + return this; + } + + /** + * <code>optional .TravelerDuelRankData Self = 2;</code> + * @return whether the self field is set + */ + public boolean hasSelf() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .TravelerDuelRankData Self = 2;</code> + * @return this + */ + public TravelerDuelRankInfo clearSelf() { + bitField0_ &= ~0x00000004; + self.clear(); + return this; + } + + /** + * <code>optional .TravelerDuelRankData Self = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelf()} if you want to modify it. + * + * @return internal storage object for reading + */ + public TravelerDuelRankData getSelf() { + return self; + } + + /** + * <code>optional .TravelerDuelRankData Self = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public TravelerDuelRankData getMutableSelf() { + bitField0_ |= 0x00000004; + return self; + } + + /** + * <code>optional .TravelerDuelRankData Self = 2;</code> + * @param value the self to set + * @return this + */ + public TravelerDuelRankInfo setSelf(final TravelerDuelRankData value) { + bitField0_ |= 0x00000004; + self.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelRankInfo clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelRankInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelRankInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelRankInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .TravelerDuelRankData Rank = 3;</code> + * @return whether the rank field is set + */ + public boolean hasRank() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .TravelerDuelRankData Rank = 3;</code> + * @return this + */ + public TravelerDuelRankInfo clearRank() { + bitField0_ &= ~0x00000010; + rank.clear(); + return this; + } + + /** + * <code>repeated .TravelerDuelRankData Rank = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRank()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<TravelerDuelRankData> getRank() { + return rank; + } + + /** + * <code>repeated .TravelerDuelRankData Rank = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<TravelerDuelRankData> getMutableRank() { + bitField0_ |= 0x00000010; + return rank; + } + + /** + * <code>repeated .TravelerDuelRankData Rank = 3;</code> + * @param value the rank to add + * @return this + */ + public TravelerDuelRankInfo addRank(final TravelerDuelRankData value) { + bitField0_ |= 0x00000010; + rank.add(value); + return this; + } + + /** + * <code>repeated .TravelerDuelRankData Rank = 3;</code> + * @param values the rank to add + * @return this + */ + public TravelerDuelRankInfo addAllRank(final TravelerDuelRankData... values) { + bitField0_ |= 0x00000010; + rank.addAll(values); + return this; + } + + @Override + public TravelerDuelRankInfo copyFrom(final TravelerDuelRankInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + lastRefreshTime = other.lastRefreshTime; + uploadRemainTimes = other.uploadRemainTimes; + self.copyFrom(other.self); + nextPackage.copyFrom(other.nextPackage); + rank.copyFrom(other.rank); + } + return this; + } + + @Override + public TravelerDuelRankInfo mergeFrom(final TravelerDuelRankInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLastRefreshTime()) { + setLastRefreshTime(other.lastRefreshTime); + } + if (other.hasUploadRemainTimes()) { + setUploadRemainTimes(other.uploadRemainTimes); + } + if (other.hasSelf()) { + getMutableSelf().mergeFrom(other.self); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasRank()) { + getMutableRank().addAll(other.rank); + } + return this; + } + + @Override + public TravelerDuelRankInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + lastRefreshTime = 0L; + uploadRemainTimes = 0; + self.clear(); + nextPackage.clear(); + rank.clear(); + return this; + } + + @Override + public TravelerDuelRankInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + self.clearQuick(); + nextPackage.clear(); + rank.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelRankInfo)) { + return false; + } + TravelerDuelRankInfo other = (TravelerDuelRankInfo) o; + return bitField0_ == other.bitField0_ + && (!hasLastRefreshTime() || lastRefreshTime == other.lastRefreshTime) + && (!hasUploadRemainTimes() || uploadRemainTimes == other.uploadRemainTimes) + && (!hasSelf() || self.equals(other.self)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasRank() || rank.equals(other.rank)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeInt64NoTag(lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(uploadRemainTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(self); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < rank.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(rank.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(uploadRemainTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(self); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * rank.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(rank); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelRankInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // lastRefreshTime + lastRefreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // uploadRemainTimes + uploadRemainTimes = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // self + input.readMessage(self); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // rank + tag = input.readRepeatedMessage(rank, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.lastRefreshTime, lastRefreshTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.uploadRemainTimes, uploadRemainTimes); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.self, self); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.rank, rank); + } + output.endObject(); + } + + @Override + public TravelerDuelRankInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -197072974: { + if (input.isAtField(FieldNames.lastRefreshTime)) { + if (!input.trySkipNullValue()) { + lastRefreshTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1281247399: { + if (input.isAtField(FieldNames.uploadRemainTimes)) { + if (!input.trySkipNullValue()) { + uploadRemainTimes = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2573164: { + if (input.isAtField(FieldNames.self)) { + if (!input.trySkipNullValue()) { + input.readMessage(self); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2539596: { + if (input.isAtField(FieldNames.rank)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(rank); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelRankInfo clone() { + return new TravelerDuelRankInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelRankInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelRankInfo(), data).checkInitialized(); + } + + public static TravelerDuelRankInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelRankInfo(), input).checkInitialized(); + } + + public static TravelerDuelRankInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelRankInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelRankInfo messages + */ + public static MessageFactory<TravelerDuelRankInfo> getFactory() { + return TravelerDuelRankInfoFactory.INSTANCE; + } + + private enum TravelerDuelRankInfoFactory implements MessageFactory<TravelerDuelRankInfo> { + INSTANCE; + + @Override + public TravelerDuelRankInfo create() { + return TravelerDuelRankInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName lastRefreshTime = FieldName.forField("LastRefreshTime"); + + static final FieldName uploadRemainTimes = FieldName.forField("UploadRemainTimes"); + + static final FieldName self = FieldName.forField("Self"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName rank = FieldName.forField("Rank"); + } + } + + /** + * Protobuf type {@code TravelerDuelRankChar} + */ + public static final class TravelerDuelRankChar extends ProtoMessage<TravelerDuelRankChar> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional uint32 Level = 2;</code> + */ + private int level; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TravelerDuelRankChar() { + } + + /** + * @return a new empty instance of {@code TravelerDuelRankChar} + */ + public static TravelerDuelRankChar newInstance() { + return new TravelerDuelRankChar(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public TravelerDuelRankChar clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public TravelerDuelRankChar setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return whether the level field is set + */ + public boolean hasLevel() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return this + */ + public TravelerDuelRankChar clearLevel() { + bitField0_ &= ~0x00000002; + level = 0; + return this; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * <code>optional uint32 Level = 2;</code> + * @param value the level to set + * @return this + */ + public TravelerDuelRankChar setLevel(final int value) { + bitField0_ |= 0x00000002; + level = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelRankChar clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelRankChar addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelRankChar addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelRankChar setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TravelerDuelRankChar copyFrom(final TravelerDuelRankChar other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + level = other.level; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelRankChar mergeFrom(final TravelerDuelRankChar other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasLevel()) { + setLevel(other.level); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelRankChar clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + level = 0; + nextPackage.clear(); + return this; + } + + @Override + public TravelerDuelRankChar clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelRankChar)) { + return false; + } + TravelerDuelRankChar other = (TravelerDuelRankChar) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasLevel() || level == other.level) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(level); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelRankChar mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // level + level = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.level, level); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TravelerDuelRankChar mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 73313124: { + if (input.isAtField(FieldNames.level)) { + if (!input.trySkipNullValue()) { + level = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelRankChar clone() { + return new TravelerDuelRankChar().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelRankChar parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelRankChar(), data).checkInitialized(); + } + + public static TravelerDuelRankChar parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelRankChar(), input).checkInitialized(); + } + + public static TravelerDuelRankChar parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelRankChar(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelRankChar messages + */ + public static MessageFactory<TravelerDuelRankChar> getFactory() { + return TravelerDuelRankCharFactory.INSTANCE; + } + + private enum TravelerDuelRankCharFactory implements MessageFactory<TravelerDuelRankChar> { + INSTANCE; + + @Override + public TravelerDuelRankChar create() { + return TravelerDuelRankChar.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName level = FieldName.forField("Level"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TravelerDuelRankData} + */ + public static final class TravelerDuelRankData extends ProtoMessage<TravelerDuelRankData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 Id = 1;</code> + */ + private long id; + + /** + * <code>optional uint32 WorldClass = 3;</code> + */ + private int worldClass; + + /** + * <code>optional uint32 HeadIcon = 4;</code> + */ + private int headIcon; + + /** + * <code>optional uint32 Score = 5;</code> + */ + private int score; + + /** + * <code>optional uint32 Rank = 6;</code> + */ + private int rank; + + /** + * <code>optional uint32 BuildScore = 7;</code> + */ + private int buildScore; + + /** + * <code>optional uint32 TitlePrefix = 8;</code> + */ + private int titlePrefix; + + /** + * <code>optional uint32 TitleSuffix = 9;</code> + */ + private int titleSuffix; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string NickName = 2;</code> + */ + private final Utf8String nickName = Utf8String.newEmptyInstance(); + + /** + * <code>repeated .TravelerDuelRankChar Chars = 10;</code> + */ + private final RepeatedMessage<TravelerDuelRankChar> chars = RepeatedMessage.newEmptyInstance(TravelerDuelRankChar.getFactory()); + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + */ + private final RepeatedMessage<Public.HonorInfo> honors = RepeatedMessage.newEmptyInstance(Public.HonorInfo.getFactory()); + + private TravelerDuelRankData() { + } + + /** + * @return a new empty instance of {@code TravelerDuelRankData} + */ + public static TravelerDuelRankData newInstance() { + return new TravelerDuelRankData(); + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return this + */ + public TravelerDuelRankData clearId() { + bitField0_ &= ~0x00000001; + id = 0L; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return the id + */ + public long getId() { + return id; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @param value the id to set + * @return this + */ + public TravelerDuelRankData setId(final long value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @return whether the worldClass field is set + */ + public boolean hasWorldClass() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @return this + */ + public TravelerDuelRankData clearWorldClass() { + bitField0_ &= ~0x00000002; + worldClass = 0; + return this; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @return the worldClass + */ + public int getWorldClass() { + return worldClass; + } + + /** + * <code>optional uint32 WorldClass = 3;</code> + * @param value the worldClass to set + * @return this + */ + public TravelerDuelRankData setWorldClass(final int value) { + bitField0_ |= 0x00000002; + worldClass = value; + return this; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return whether the headIcon field is set + */ + public boolean hasHeadIcon() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return this + */ + public TravelerDuelRankData clearHeadIcon() { + bitField0_ &= ~0x00000004; + headIcon = 0; + return this; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @return the headIcon + */ + public int getHeadIcon() { + return headIcon; + } + + /** + * <code>optional uint32 HeadIcon = 4;</code> + * @param value the headIcon to set + * @return this + */ + public TravelerDuelRankData setHeadIcon(final int value) { + bitField0_ |= 0x00000004; + headIcon = value; + return this; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return this + */ + public TravelerDuelRankData clearScore() { + bitField0_ &= ~0x00000008; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 5;</code> + * @param value the score to set + * @return this + */ + public TravelerDuelRankData setScore(final int value) { + bitField0_ |= 0x00000008; + score = value; + return this; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @return whether the rank field is set + */ + public boolean hasRank() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @return this + */ + public TravelerDuelRankData clearRank() { + bitField0_ &= ~0x00000010; + rank = 0; + return this; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @return the rank + */ + public int getRank() { + return rank; + } + + /** + * <code>optional uint32 Rank = 6;</code> + * @param value the rank to set + * @return this + */ + public TravelerDuelRankData setRank(final int value) { + bitField0_ |= 0x00000010; + rank = value; + return this; + } + + /** + * <code>optional uint32 BuildScore = 7;</code> + * @return whether the buildScore field is set + */ + public boolean hasBuildScore() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 BuildScore = 7;</code> + * @return this + */ + public TravelerDuelRankData clearBuildScore() { + bitField0_ &= ~0x00000020; + buildScore = 0; + return this; + } + + /** + * <code>optional uint32 BuildScore = 7;</code> + * @return the buildScore + */ + public int getBuildScore() { + return buildScore; + } + + /** + * <code>optional uint32 BuildScore = 7;</code> + * @param value the buildScore to set + * @return this + */ + public TravelerDuelRankData setBuildScore(final int value) { + bitField0_ |= 0x00000020; + buildScore = value; + return this; + } + + /** + * <code>optional uint32 TitlePrefix = 8;</code> + * @return whether the titlePrefix field is set + */ + public boolean hasTitlePrefix() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 TitlePrefix = 8;</code> + * @return this + */ + public TravelerDuelRankData clearTitlePrefix() { + bitField0_ &= ~0x00000040; + titlePrefix = 0; + return this; + } + + /** + * <code>optional uint32 TitlePrefix = 8;</code> + * @return the titlePrefix + */ + public int getTitlePrefix() { + return titlePrefix; + } + + /** + * <code>optional uint32 TitlePrefix = 8;</code> + * @param value the titlePrefix to set + * @return this + */ + public TravelerDuelRankData setTitlePrefix(final int value) { + bitField0_ |= 0x00000040; + titlePrefix = value; + return this; + } + + /** + * <code>optional uint32 TitleSuffix = 9;</code> + * @return whether the titleSuffix field is set + */ + public boolean hasTitleSuffix() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional uint32 TitleSuffix = 9;</code> + * @return this + */ + public TravelerDuelRankData clearTitleSuffix() { + bitField0_ &= ~0x00000080; + titleSuffix = 0; + return this; + } + + /** + * <code>optional uint32 TitleSuffix = 9;</code> + * @return the titleSuffix + */ + public int getTitleSuffix() { + return titleSuffix; + } + + /** + * <code>optional uint32 TitleSuffix = 9;</code> + * @param value the titleSuffix to set + * @return this + */ + public TravelerDuelRankData setTitleSuffix(final int value) { + bitField0_ |= 0x00000080; + titleSuffix = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelRankData clearNextPackage() { + bitField0_ &= ~0x00000100; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000100; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelRankData addNextPackage(final byte value) { + bitField0_ |= 0x00000100; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelRankData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelRankData setNextPackage(final byte... values) { + bitField0_ |= 0x00000100; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @return whether the nickName field is set + */ + public boolean hasNickName() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional string NickName = 2;</code> + * @return this + */ + public TravelerDuelRankData clearNickName() { + bitField0_ &= ~0x00000200; + nickName.clear(); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @return the nickName + */ + public String getNickName() { + return nickName.getString(); + } + + /** + * <code>optional string NickName = 2;</code> + * @return internal {@code Utf8String} representation of nickName for reading + */ + public Utf8String getNickNameBytes() { + return this.nickName; + } + + /** + * <code>optional string NickName = 2;</code> + * @return internal {@code Utf8String} representation of nickName for modifications + */ + public Utf8String getMutableNickNameBytes() { + bitField0_ |= 0x00000200; + return this.nickName; + } + + /** + * <code>optional string NickName = 2;</code> + * @param value the nickName to set + * @return this + */ + public TravelerDuelRankData setNickName(final CharSequence value) { + bitField0_ |= 0x00000200; + nickName.copyFrom(value); + return this; + } + + /** + * <code>optional string NickName = 2;</code> + * @param value the nickName to set + * @return this + */ + public TravelerDuelRankData setNickName(final Utf8String value) { + bitField0_ |= 0x00000200; + nickName.copyFrom(value); + return this; + } + + /** + * <code>repeated .TravelerDuelRankChar Chars = 10;</code> + * @return whether the chars field is set + */ + public boolean hasChars() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>repeated .TravelerDuelRankChar Chars = 10;</code> + * @return this + */ + public TravelerDuelRankData clearChars() { + bitField0_ &= ~0x00000400; + chars.clear(); + return this; + } + + /** + * <code>repeated .TravelerDuelRankChar Chars = 10;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChars()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<TravelerDuelRankChar> getChars() { + return chars; + } + + /** + * <code>repeated .TravelerDuelRankChar Chars = 10;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<TravelerDuelRankChar> getMutableChars() { + bitField0_ |= 0x00000400; + return chars; + } + + /** + * <code>repeated .TravelerDuelRankChar Chars = 10;</code> + * @param value the chars to add + * @return this + */ + public TravelerDuelRankData addChars(final TravelerDuelRankChar value) { + bitField0_ |= 0x00000400; + chars.add(value); + return this; + } + + /** + * <code>repeated .TravelerDuelRankChar Chars = 10;</code> + * @param values the chars to add + * @return this + */ + public TravelerDuelRankData addAllChars(final TravelerDuelRankChar... values) { + bitField0_ |= 0x00000400; + chars.addAll(values); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @return whether the honors field is set + */ + public boolean hasHonors() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @return this + */ + public TravelerDuelRankData clearHonors() { + bitField0_ &= ~0x00000800; + honors.clear(); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableHonors()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.HonorInfo> getHonors() { + return honors; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.HonorInfo> getMutableHonors() { + bitField0_ |= 0x00000800; + return honors; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @param value the honors to add + * @return this + */ + public TravelerDuelRankData addHonors(final Public.HonorInfo value) { + bitField0_ |= 0x00000800; + honors.add(value); + return this; + } + + /** + * <code>repeated .HonorInfo Honors = 15;</code> + * @param values the honors to add + * @return this + */ + public TravelerDuelRankData addAllHonors(final Public.HonorInfo... values) { + bitField0_ |= 0x00000800; + honors.addAll(values); + return this; + } + + @Override + public TravelerDuelRankData copyFrom(final TravelerDuelRankData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + worldClass = other.worldClass; + headIcon = other.headIcon; + score = other.score; + rank = other.rank; + buildScore = other.buildScore; + titlePrefix = other.titlePrefix; + titleSuffix = other.titleSuffix; + nextPackage.copyFrom(other.nextPackage); + nickName.copyFrom(other.nickName); + chars.copyFrom(other.chars); + honors.copyFrom(other.honors); + } + return this; + } + + @Override + public TravelerDuelRankData mergeFrom(final TravelerDuelRankData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasWorldClass()) { + setWorldClass(other.worldClass); + } + if (other.hasHeadIcon()) { + setHeadIcon(other.headIcon); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasRank()) { + setRank(other.rank); + } + if (other.hasBuildScore()) { + setBuildScore(other.buildScore); + } + if (other.hasTitlePrefix()) { + setTitlePrefix(other.titlePrefix); + } + if (other.hasTitleSuffix()) { + setTitleSuffix(other.titleSuffix); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasNickName()) { + getMutableNickNameBytes().copyFrom(other.nickName); + } + if (other.hasChars()) { + getMutableChars().addAll(other.chars); + } + if (other.hasHonors()) { + getMutableHonors().addAll(other.honors); + } + return this; + } + + @Override + public TravelerDuelRankData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0L; + worldClass = 0; + headIcon = 0; + score = 0; + rank = 0; + buildScore = 0; + titlePrefix = 0; + titleSuffix = 0; + nextPackage.clear(); + nickName.clear(); + chars.clear(); + honors.clear(); + return this; + } + + @Override + public TravelerDuelRankData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + nickName.clear(); + chars.clearQuick(); + honors.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelRankData)) { + return false; + } + TravelerDuelRankData other = (TravelerDuelRankData) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasWorldClass() || worldClass == other.worldClass) + && (!hasHeadIcon() || headIcon == other.headIcon) + && (!hasScore() || score == other.score) + && (!hasRank() || rank == other.rank) + && (!hasBuildScore() || buildScore == other.buildScore) + && (!hasTitlePrefix() || titlePrefix == other.titlePrefix) + && (!hasTitleSuffix() || titleSuffix == other.titleSuffix) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasNickName() || nickName.equals(other.nickName)) + && (!hasChars() || chars.equals(other.chars)) + && (!hasHonors() || honors.equals(other.honors)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt32NoTag(rank); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 56); + output.writeUInt32NoTag(buildScore); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(titlePrefix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(titleSuffix); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 18); + output.writeStringNoTag(nickName); + } + if ((bitField0_ & 0x00000400) != 0) { + for (int i = 0; i < chars.length(); i++) { + output.writeRawByte((byte) 82); + output.writeMessageNoTag(chars.get(i)); + } + } + if ((bitField0_ & 0x00000800) != 0) { + for (int i = 0; i < honors.length(); i++) { + output.writeRawByte((byte) 122); + output.writeMessageNoTag(honors.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(rank); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(buildScore); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titlePrefix); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(titleSuffix); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(nickName); + } + if ((bitField0_ & 0x00000400) != 0) { + size += (1 * chars.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chars); + } + if ((bitField0_ & 0x00000800) != 0) { + size += (1 * honors.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(honors); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelRankData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // worldClass + worldClass = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // headIcon + headIcon = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // rank + rank = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 56) { + break; + } + } + case 56: { + // buildScore + buildScore = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // titlePrefix + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // titleSuffix + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // nickName + input.readString(nickName); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 82) { + break; + } + } + case 82: { + // chars + tag = input.readRepeatedMessage(chars, tag); + bitField0_ |= 0x00000400; + if (tag != 122) { + break; + } + } + case 122: { + // honors + tag = input.readRepeatedMessage(honors, tag); + bitField0_ |= 0x00000800; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.worldClass, worldClass); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.headIcon, headIcon); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.rank, rank); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.buildScore, buildScore); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.titlePrefix, titlePrefix); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeUInt32(FieldNames.titleSuffix, titleSuffix); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeString(FieldNames.nickName, nickName); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRepeatedMessage(FieldNames.chars, chars); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRepeatedMessage(FieldNames.honors, honors); + } + output.endObject(); + } + + @Override + public TravelerDuelRankData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1869617882: { + if (input.isAtField(FieldNames.worldClass)) { + if (!input.trySkipNullValue()) { + worldClass = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1051463015: { + if (input.isAtField(FieldNames.headIcon)) { + if (!input.trySkipNullValue()) { + headIcon = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2539596: { + if (input.isAtField(FieldNames.rank)) { + if (!input.trySkipNullValue()) { + rank = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1511471332: { + if (input.isAtField(FieldNames.buildScore)) { + if (!input.trySkipNullValue()) { + buildScore = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2096776938: { + if (input.isAtField(FieldNames.titlePrefix)) { + if (!input.trySkipNullValue()) { + titlePrefix = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2109502551: { + if (input.isAtField(FieldNames.titleSuffix)) { + if (!input.trySkipNullValue()) { + titleSuffix = input.readUInt32(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 134381742: { + if (input.isAtField(FieldNames.nickName)) { + if (!input.trySkipNullValue()) { + input.readString(nickName); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 65071037: { + if (input.isAtField(FieldNames.chars)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chars); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2127770263: { + if (input.isAtField(FieldNames.honors)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(honors); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelRankData clone() { + return new TravelerDuelRankData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelRankData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelRankData(), data).checkInitialized(); + } + + public static TravelerDuelRankData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelRankData(), input).checkInitialized(); + } + + public static TravelerDuelRankData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelRankData(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelRankData messages + */ + public static MessageFactory<TravelerDuelRankData> getFactory() { + return TravelerDuelRankDataFactory.INSTANCE; + } + + private enum TravelerDuelRankDataFactory implements MessageFactory<TravelerDuelRankData> { + INSTANCE; + + @Override + public TravelerDuelRankData create() { + return TravelerDuelRankData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName worldClass = FieldName.forField("WorldClass"); + + static final FieldName headIcon = FieldName.forField("HeadIcon"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName rank = FieldName.forField("Rank"); + + static final FieldName buildScore = FieldName.forField("BuildScore"); + + static final FieldName titlePrefix = FieldName.forField("TitlePrefix"); + + static final FieldName titleSuffix = FieldName.forField("TitleSuffix"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName nickName = FieldName.forField("NickName"); + + static final FieldName chars = FieldName.forField("Chars"); + + static final FieldName honors = FieldName.forField("Honors"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TravelerDuelRankUpload.java b/src/generated/main/emu/nebula/proto/TravelerDuelRankUpload.java new file mode 100644 index 0000000..c5caff1 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TravelerDuelRankUpload.java @@ -0,0 +1,4499 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; +import us.hebi.quickbuf.Utf8String; + +public final class TravelerDuelRankUpload { + /** + * Protobuf type {@code TravelerDuelBattleSamples} + */ + public static final class TravelerDuelBattleSamples extends ProtoMessage<TravelerDuelBattleSamples> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 Checksum = 2;</code> + */ + private long checksum; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .TravelerDuelBattleSample Sample = 1;</code> + */ + private final RepeatedMessage<TravelerDuelBattleSample> sample = RepeatedMessage.newEmptyInstance(TravelerDuelBattleSample.getFactory()); + + private TravelerDuelBattleSamples() { + } + + /** + * @return a new empty instance of {@code TravelerDuelBattleSamples} + */ + public static TravelerDuelBattleSamples newInstance() { + return new TravelerDuelBattleSamples(); + } + + /** + * <code>optional uint64 Checksum = 2;</code> + * @return whether the checksum field is set + */ + public boolean hasChecksum() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 Checksum = 2;</code> + * @return this + */ + public TravelerDuelBattleSamples clearChecksum() { + bitField0_ &= ~0x00000001; + checksum = 0L; + return this; + } + + /** + * <code>optional uint64 Checksum = 2;</code> + * @return the checksum + */ + public long getChecksum() { + return checksum; + } + + /** + * <code>optional uint64 Checksum = 2;</code> + * @param value the checksum to set + * @return this + */ + public TravelerDuelBattleSamples setChecksum(final long value) { + bitField0_ |= 0x00000001; + checksum = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelBattleSamples clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelBattleSamples addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelBattleSamples addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelBattleSamples setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .TravelerDuelBattleSample Sample = 1;</code> + * @return whether the sample field is set + */ + public boolean hasSample() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .TravelerDuelBattleSample Sample = 1;</code> + * @return this + */ + public TravelerDuelBattleSamples clearSample() { + bitField0_ &= ~0x00000004; + sample.clear(); + return this; + } + + /** + * <code>repeated .TravelerDuelBattleSample Sample = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSample()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<TravelerDuelBattleSample> getSample() { + return sample; + } + + /** + * <code>repeated .TravelerDuelBattleSample Sample = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<TravelerDuelBattleSample> getMutableSample() { + bitField0_ |= 0x00000004; + return sample; + } + + /** + * <code>repeated .TravelerDuelBattleSample Sample = 1;</code> + * @param value the sample to add + * @return this + */ + public TravelerDuelBattleSamples addSample(final TravelerDuelBattleSample value) { + bitField0_ |= 0x00000004; + sample.add(value); + return this; + } + + /** + * <code>repeated .TravelerDuelBattleSample Sample = 1;</code> + * @param values the sample to add + * @return this + */ + public TravelerDuelBattleSamples addAllSample(final TravelerDuelBattleSample... values) { + bitField0_ |= 0x00000004; + sample.addAll(values); + return this; + } + + @Override + public TravelerDuelBattleSamples copyFrom(final TravelerDuelBattleSamples other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + checksum = other.checksum; + nextPackage.copyFrom(other.nextPackage); + sample.copyFrom(other.sample); + } + return this; + } + + @Override + public TravelerDuelBattleSamples mergeFrom(final TravelerDuelBattleSamples other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasChecksum()) { + setChecksum(other.checksum); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasSample()) { + getMutableSample().addAll(other.sample); + } + return this; + } + + @Override + public TravelerDuelBattleSamples clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + checksum = 0L; + nextPackage.clear(); + sample.clear(); + return this; + } + + @Override + public TravelerDuelBattleSamples clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + sample.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelBattleSamples)) { + return false; + } + TravelerDuelBattleSamples other = (TravelerDuelBattleSamples) o; + return bitField0_ == other.bitField0_ + && (!hasChecksum() || checksum == other.checksum) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasSample() || sample.equals(other.sample)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(checksum); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < sample.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(sample.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(checksum); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * sample.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(sample); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelBattleSamples mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // checksum + checksum = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // sample + tag = input.readRepeatedMessage(sample, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.checksum, checksum); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.sample, sample); + } + output.endObject(); + } + + @Override + public TravelerDuelBattleSamples mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1601552483: { + if (input.isAtField(FieldNames.checksum)) { + if (!input.trySkipNullValue()) { + checksum = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1825807926: { + if (input.isAtField(FieldNames.sample)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(sample); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelBattleSamples clone() { + return new TravelerDuelBattleSamples().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelBattleSamples parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleSamples(), data).checkInitialized(); + } + + public static TravelerDuelBattleSamples parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleSamples(), input).checkInitialized(); + } + + public static TravelerDuelBattleSamples parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleSamples(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelBattleSamples messages + */ + public static MessageFactory<TravelerDuelBattleSamples> getFactory() { + return TravelerDuelBattleSamplesFactory.INSTANCE; + } + + private enum TravelerDuelBattleSamplesFactory implements MessageFactory<TravelerDuelBattleSamples> { + INSTANCE; + + @Override + public TravelerDuelBattleSamples create() { + return TravelerDuelBattleSamples.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName checksum = FieldName.forField("Checksum"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName sample = FieldName.forField("Sample"); + } + } + + /** + * Protobuf type {@code TravelerDuelBattleData} + */ + public static final class TravelerDuelBattleData extends ProtoMessage<TravelerDuelBattleData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .TravelerDuelMetaInfo Meta = 1;</code> + */ + private final TravelerDuelMetaInfo meta = TravelerDuelMetaInfo.newInstance(); + + /** + * <code>optional .TravelerDuelBattleSamples Samples = 2;</code> + */ + private final TravelerDuelBattleSamples samples = TravelerDuelBattleSamples.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TravelerDuelBattleData() { + } + + /** + * @return a new empty instance of {@code TravelerDuelBattleData} + */ + public static TravelerDuelBattleData newInstance() { + return new TravelerDuelBattleData(); + } + + /** + * <code>optional .TravelerDuelMetaInfo Meta = 1;</code> + * @return whether the meta field is set + */ + public boolean hasMeta() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .TravelerDuelMetaInfo Meta = 1;</code> + * @return this + */ + public TravelerDuelBattleData clearMeta() { + bitField0_ &= ~0x00000001; + meta.clear(); + return this; + } + + /** + * <code>optional .TravelerDuelMetaInfo Meta = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableMeta()} if you want to modify it. + * + * @return internal storage object for reading + */ + public TravelerDuelMetaInfo getMeta() { + return meta; + } + + /** + * <code>optional .TravelerDuelMetaInfo Meta = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public TravelerDuelMetaInfo getMutableMeta() { + bitField0_ |= 0x00000001; + return meta; + } + + /** + * <code>optional .TravelerDuelMetaInfo Meta = 1;</code> + * @param value the meta to set + * @return this + */ + public TravelerDuelBattleData setMeta(final TravelerDuelMetaInfo value) { + bitField0_ |= 0x00000001; + meta.copyFrom(value); + return this; + } + + /** + * <code>optional .TravelerDuelBattleSamples Samples = 2;</code> + * @return whether the samples field is set + */ + public boolean hasSamples() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .TravelerDuelBattleSamples Samples = 2;</code> + * @return this + */ + public TravelerDuelBattleData clearSamples() { + bitField0_ &= ~0x00000002; + samples.clear(); + return this; + } + + /** + * <code>optional .TravelerDuelBattleSamples Samples = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSamples()} if you want to modify it. + * + * @return internal storage object for reading + */ + public TravelerDuelBattleSamples getSamples() { + return samples; + } + + /** + * <code>optional .TravelerDuelBattleSamples Samples = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public TravelerDuelBattleSamples getMutableSamples() { + bitField0_ |= 0x00000002; + return samples; + } + + /** + * <code>optional .TravelerDuelBattleSamples Samples = 2;</code> + * @param value the samples to set + * @return this + */ + public TravelerDuelBattleData setSamples(final TravelerDuelBattleSamples value) { + bitField0_ |= 0x00000002; + samples.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelBattleData clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelBattleData addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelBattleData addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelBattleData setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TravelerDuelBattleData copyFrom(final TravelerDuelBattleData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + meta.copyFrom(other.meta); + samples.copyFrom(other.samples); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelBattleData mergeFrom(final TravelerDuelBattleData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasMeta()) { + getMutableMeta().mergeFrom(other.meta); + } + if (other.hasSamples()) { + getMutableSamples().mergeFrom(other.samples); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelBattleData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + meta.clear(); + samples.clear(); + nextPackage.clear(); + return this; + } + + @Override + public TravelerDuelBattleData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + meta.clearQuick(); + samples.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelBattleData)) { + return false; + } + TravelerDuelBattleData other = (TravelerDuelBattleData) o; + return bitField0_ == other.bitField0_ + && (!hasMeta() || meta.equals(other.meta)) + && (!hasSamples() || samples.equals(other.samples)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(meta); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(samples); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(meta); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(samples); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelBattleData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // meta + input.readMessage(meta); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // samples + input.readMessage(samples); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.meta, meta); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.samples, samples); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TravelerDuelBattleData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2394661: { + if (input.isAtField(FieldNames.meta)) { + if (!input.trySkipNullValue()) { + input.readMessage(meta); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -765470743: { + if (input.isAtField(FieldNames.samples)) { + if (!input.trySkipNullValue()) { + input.readMessage(samples); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelBattleData clone() { + return new TravelerDuelBattleData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelBattleData parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleData(), data).checkInitialized(); + } + + public static TravelerDuelBattleData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleData(), input).checkInitialized(); + } + + public static TravelerDuelBattleData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleData(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelBattleData messages + */ + public static MessageFactory<TravelerDuelBattleData> getFactory() { + return TravelerDuelBattleDataFactory.INSTANCE; + } + + private enum TravelerDuelBattleDataFactory implements MessageFactory<TravelerDuelBattleData> { + INSTANCE; + + @Override + public TravelerDuelBattleData create() { + return TravelerDuelBattleData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName meta = FieldName.forField("Meta"); + + static final FieldName samples = FieldName.forField("Samples"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code TravelerDuelMetaInfo} + */ + public static final class TravelerDuelMetaInfo extends ProtoMessage<TravelerDuelMetaInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 Time = 10;</code> + */ + private long time; + + /** + * <code>optional uint64 Id = 1;</code> + */ + private long id; + + /** + * <code>optional uint64 PlayerId = 6;</code> + */ + private long playerId; + + /** + * <code>optional uint32 Version = 2;</code> + */ + private int version; + + /** + * <code>optional uint32 MissionId = 4;</code> + */ + private int missionId; + + /** + * <code>optional uint32 Season = 5;</code> + */ + private int season; + + /** + * <code>optional uint32 Duration = 8;</code> + */ + private int duration; + + /** + * <code>optional uint32 Rank = 9;</code> + */ + private int rank; + + /** + * <code>optional uint32 Score = 11;</code> + */ + private int score; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string Zone = 3;</code> + */ + private final Utf8String zone = Utf8String.newEmptyInstance(); + + /** + * <code>optional string Nickname = 7;</code> + */ + private final Utf8String nickname = Utf8String.newEmptyInstance(); + + private TravelerDuelMetaInfo() { + } + + /** + * @return a new empty instance of {@code TravelerDuelMetaInfo} + */ + public static TravelerDuelMetaInfo newInstance() { + return new TravelerDuelMetaInfo(); + } + + /** + * <code>optional int64 Time = 10;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 Time = 10;</code> + * @return this + */ + public TravelerDuelMetaInfo clearTime() { + bitField0_ &= ~0x00000001; + time = 0L; + return this; + } + + /** + * <code>optional int64 Time = 10;</code> + * @return the time + */ + public long getTime() { + return time; + } + + /** + * <code>optional int64 Time = 10;</code> + * @param value the time to set + * @return this + */ + public TravelerDuelMetaInfo setTime(final long value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return this + */ + public TravelerDuelMetaInfo clearId() { + bitField0_ &= ~0x00000002; + id = 0L; + return this; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @return the id + */ + public long getId() { + return id; + } + + /** + * <code>optional uint64 Id = 1;</code> + * @param value the id to set + * @return this + */ + public TravelerDuelMetaInfo setId(final long value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional uint64 PlayerId = 6;</code> + * @return whether the playerId field is set + */ + public boolean hasPlayerId() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint64 PlayerId = 6;</code> + * @return this + */ + public TravelerDuelMetaInfo clearPlayerId() { + bitField0_ &= ~0x00000004; + playerId = 0L; + return this; + } + + /** + * <code>optional uint64 PlayerId = 6;</code> + * @return the playerId + */ + public long getPlayerId() { + return playerId; + } + + /** + * <code>optional uint64 PlayerId = 6;</code> + * @param value the playerId to set + * @return this + */ + public TravelerDuelMetaInfo setPlayerId(final long value) { + bitField0_ |= 0x00000004; + playerId = value; + return this; + } + + /** + * <code>optional uint32 Version = 2;</code> + * @return whether the version field is set + */ + public boolean hasVersion() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional uint32 Version = 2;</code> + * @return this + */ + public TravelerDuelMetaInfo clearVersion() { + bitField0_ &= ~0x00000008; + version = 0; + return this; + } + + /** + * <code>optional uint32 Version = 2;</code> + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * <code>optional uint32 Version = 2;</code> + * @param value the version to set + * @return this + */ + public TravelerDuelMetaInfo setVersion(final int value) { + bitField0_ |= 0x00000008; + version = value; + return this; + } + + /** + * <code>optional uint32 MissionId = 4;</code> + * @return whether the missionId field is set + */ + public boolean hasMissionId() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional uint32 MissionId = 4;</code> + * @return this + */ + public TravelerDuelMetaInfo clearMissionId() { + bitField0_ &= ~0x00000010; + missionId = 0; + return this; + } + + /** + * <code>optional uint32 MissionId = 4;</code> + * @return the missionId + */ + public int getMissionId() { + return missionId; + } + + /** + * <code>optional uint32 MissionId = 4;</code> + * @param value the missionId to set + * @return this + */ + public TravelerDuelMetaInfo setMissionId(final int value) { + bitField0_ |= 0x00000010; + missionId = value; + return this; + } + + /** + * <code>optional uint32 Season = 5;</code> + * @return whether the season field is set + */ + public boolean hasSeason() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional uint32 Season = 5;</code> + * @return this + */ + public TravelerDuelMetaInfo clearSeason() { + bitField0_ &= ~0x00000020; + season = 0; + return this; + } + + /** + * <code>optional uint32 Season = 5;</code> + * @return the season + */ + public int getSeason() { + return season; + } + + /** + * <code>optional uint32 Season = 5;</code> + * @param value the season to set + * @return this + */ + public TravelerDuelMetaInfo setSeason(final int value) { + bitField0_ |= 0x00000020; + season = value; + return this; + } + + /** + * <code>optional uint32 Duration = 8;</code> + * @return whether the duration field is set + */ + public boolean hasDuration() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional uint32 Duration = 8;</code> + * @return this + */ + public TravelerDuelMetaInfo clearDuration() { + bitField0_ &= ~0x00000040; + duration = 0; + return this; + } + + /** + * <code>optional uint32 Duration = 8;</code> + * @return the duration + */ + public int getDuration() { + return duration; + } + + /** + * <code>optional uint32 Duration = 8;</code> + * @param value the duration to set + * @return this + */ + public TravelerDuelMetaInfo setDuration(final int value) { + bitField0_ |= 0x00000040; + duration = value; + return this; + } + + /** + * <code>optional uint32 Rank = 9;</code> + * @return whether the rank field is set + */ + public boolean hasRank() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional uint32 Rank = 9;</code> + * @return this + */ + public TravelerDuelMetaInfo clearRank() { + bitField0_ &= ~0x00000080; + rank = 0; + return this; + } + + /** + * <code>optional uint32 Rank = 9;</code> + * @return the rank + */ + public int getRank() { + return rank; + } + + /** + * <code>optional uint32 Rank = 9;</code> + * @param value the rank to set + * @return this + */ + public TravelerDuelMetaInfo setRank(final int value) { + bitField0_ |= 0x00000080; + rank = value; + return this; + } + + /** + * <code>optional uint32 Score = 11;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional uint32 Score = 11;</code> + * @return this + */ + public TravelerDuelMetaInfo clearScore() { + bitField0_ &= ~0x00000100; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 11;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 11;</code> + * @param value the score to set + * @return this + */ + public TravelerDuelMetaInfo setScore(final int value) { + bitField0_ |= 0x00000100; + score = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelMetaInfo clearNextPackage() { + bitField0_ &= ~0x00000200; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000200; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelMetaInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000200; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelMetaInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelMetaInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000200; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string Zone = 3;</code> + * @return whether the zone field is set + */ + public boolean hasZone() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>optional string Zone = 3;</code> + * @return this + */ + public TravelerDuelMetaInfo clearZone() { + bitField0_ &= ~0x00000400; + zone.clear(); + return this; + } + + /** + * <code>optional string Zone = 3;</code> + * @return the zone + */ + public String getZone() { + return zone.getString(); + } + + /** + * <code>optional string Zone = 3;</code> + * @return internal {@code Utf8String} representation of zone for reading + */ + public Utf8String getZoneBytes() { + return this.zone; + } + + /** + * <code>optional string Zone = 3;</code> + * @return internal {@code Utf8String} representation of zone for modifications + */ + public Utf8String getMutableZoneBytes() { + bitField0_ |= 0x00000400; + return this.zone; + } + + /** + * <code>optional string Zone = 3;</code> + * @param value the zone to set + * @return this + */ + public TravelerDuelMetaInfo setZone(final CharSequence value) { + bitField0_ |= 0x00000400; + zone.copyFrom(value); + return this; + } + + /** + * <code>optional string Zone = 3;</code> + * @param value the zone to set + * @return this + */ + public TravelerDuelMetaInfo setZone(final Utf8String value) { + bitField0_ |= 0x00000400; + zone.copyFrom(value); + return this; + } + + /** + * <code>optional string Nickname = 7;</code> + * @return whether the nickname field is set + */ + public boolean hasNickname() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>optional string Nickname = 7;</code> + * @return this + */ + public TravelerDuelMetaInfo clearNickname() { + bitField0_ &= ~0x00000800; + nickname.clear(); + return this; + } + + /** + * <code>optional string Nickname = 7;</code> + * @return the nickname + */ + public String getNickname() { + return nickname.getString(); + } + + /** + * <code>optional string Nickname = 7;</code> + * @return internal {@code Utf8String} representation of nickname for reading + */ + public Utf8String getNicknameBytes() { + return this.nickname; + } + + /** + * <code>optional string Nickname = 7;</code> + * @return internal {@code Utf8String} representation of nickname for modifications + */ + public Utf8String getMutableNicknameBytes() { + bitField0_ |= 0x00000800; + return this.nickname; + } + + /** + * <code>optional string Nickname = 7;</code> + * @param value the nickname to set + * @return this + */ + public TravelerDuelMetaInfo setNickname(final CharSequence value) { + bitField0_ |= 0x00000800; + nickname.copyFrom(value); + return this; + } + + /** + * <code>optional string Nickname = 7;</code> + * @param value the nickname to set + * @return this + */ + public TravelerDuelMetaInfo setNickname(final Utf8String value) { + bitField0_ |= 0x00000800; + nickname.copyFrom(value); + return this; + } + + @Override + public TravelerDuelMetaInfo copyFrom(final TravelerDuelMetaInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + id = other.id; + playerId = other.playerId; + version = other.version; + missionId = other.missionId; + season = other.season; + duration = other.duration; + rank = other.rank; + score = other.score; + nextPackage.copyFrom(other.nextPackage); + zone.copyFrom(other.zone); + nickname.copyFrom(other.nickname); + } + return this; + } + + @Override + public TravelerDuelMetaInfo mergeFrom(final TravelerDuelMetaInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasPlayerId()) { + setPlayerId(other.playerId); + } + if (other.hasVersion()) { + setVersion(other.version); + } + if (other.hasMissionId()) { + setMissionId(other.missionId); + } + if (other.hasSeason()) { + setSeason(other.season); + } + if (other.hasDuration()) { + setDuration(other.duration); + } + if (other.hasRank()) { + setRank(other.rank); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasZone()) { + getMutableZoneBytes().copyFrom(other.zone); + } + if (other.hasNickname()) { + getMutableNicknameBytes().copyFrom(other.nickname); + } + return this; + } + + @Override + public TravelerDuelMetaInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0L; + id = 0L; + playerId = 0L; + version = 0; + missionId = 0; + season = 0; + duration = 0; + rank = 0; + score = 0; + nextPackage.clear(); + zone.clear(); + nickname.clear(); + return this; + } + + @Override + public TravelerDuelMetaInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + zone.clear(); + nickname.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelMetaInfo)) { + return false; + } + TravelerDuelMetaInfo other = (TravelerDuelMetaInfo) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || time == other.time) + && (!hasId() || id == other.id) + && (!hasPlayerId() || playerId == other.playerId) + && (!hasVersion() || version == other.version) + && (!hasMissionId() || missionId == other.missionId) + && (!hasSeason() || season == other.season) + && (!hasDuration() || duration == other.duration) + && (!hasRank() || rank == other.rank) + && (!hasScore() || score == other.score) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasZone() || zone.equals(other.zone)) + && (!hasNickname() || nickname.equals(other.nickname)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 80); + output.writeInt64NoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt64NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 48); + output.writeUInt64NoTag(playerId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(version); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(missionId); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 40); + output.writeUInt32NoTag(season); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 64); + output.writeUInt32NoTag(duration); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(rank); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 88); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 26); + output.writeStringNoTag(zone); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawByte((byte) 58); + output.writeStringNoTag(nickname); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(playerId); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(version); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(missionId); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(season); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(duration); + } + if ((bitField0_ & 0x00000080) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(rank); + } + if ((bitField0_ & 0x00000100) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000200) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(zone); + } + if ((bitField0_ & 0x00000800) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(nickname); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelMetaInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 80: { + // time + time = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt64(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // playerId + playerId = input.readUInt64(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // version + version = input.readUInt32(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // missionId + missionId = input.readUInt32(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 40) { + break; + } + } + case 40: { + // season + season = input.readUInt32(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 64) { + break; + } + } + case 64: { + // duration + duration = input.readUInt32(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // rank + rank = input.readUInt32(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 88) { + break; + } + } + case 88: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // zone + input.readString(zone); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // nickname + input.readString(nickname); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt64(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt64(FieldNames.playerId, playerId); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeUInt32(FieldNames.version, version); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeUInt32(FieldNames.missionId, missionId); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeUInt32(FieldNames.season, season); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeUInt32(FieldNames.duration, duration); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeUInt32(FieldNames.rank, rank); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeString(FieldNames.zone, zone); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeString(FieldNames.nickname, nickname); + } + output.endObject(); + } + + @Override + public TravelerDuelMetaInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt64(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1943917564: { + if (input.isAtField(FieldNames.playerId)) { + if (!input.trySkipNullValue()) { + playerId = input.readUInt64(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016261304: { + if (input.isAtField(FieldNames.version)) { + if (!input.trySkipNullValue()) { + version = input.readUInt32(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1047103577: { + if (input.isAtField(FieldNames.missionId)) { + if (!input.trySkipNullValue()) { + missionId = input.readUInt32(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1822468349: { + if (input.isAtField(FieldNames.season)) { + if (!input.trySkipNullValue()) { + season = input.readUInt32(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1927368268: { + if (input.isAtField(FieldNames.duration)) { + if (!input.trySkipNullValue()) { + duration = input.readUInt32(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2539596: { + if (input.isAtField(FieldNames.rank)) { + if (!input.trySkipNullValue()) { + rank = input.readUInt32(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2791372: { + if (input.isAtField(FieldNames.zone)) { + if (!input.trySkipNullValue()) { + input.readString(zone); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 135335054: { + if (input.isAtField(FieldNames.nickname)) { + if (!input.trySkipNullValue()) { + input.readString(nickname); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelMetaInfo clone() { + return new TravelerDuelMetaInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelMetaInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelMetaInfo(), data).checkInitialized(); + } + + public static TravelerDuelMetaInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelMetaInfo(), input).checkInitialized(); + } + + public static TravelerDuelMetaInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelMetaInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelMetaInfo messages + */ + public static MessageFactory<TravelerDuelMetaInfo> getFactory() { + return TravelerDuelMetaInfoFactory.INSTANCE; + } + + private enum TravelerDuelMetaInfoFactory implements MessageFactory<TravelerDuelMetaInfo> { + INSTANCE; + + @Override + public TravelerDuelMetaInfo create() { + return TravelerDuelMetaInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("Time"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName playerId = FieldName.forField("PlayerId"); + + static final FieldName version = FieldName.forField("Version"); + + static final FieldName missionId = FieldName.forField("MissionId"); + + static final FieldName season = FieldName.forField("Season"); + + static final FieldName duration = FieldName.forField("Duration"); + + static final FieldName rank = FieldName.forField("Rank"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName zone = FieldName.forField("Zone"); + + static final FieldName nickname = FieldName.forField("Nickname"); + } + } + + /** + * Protobuf type {@code TravelerDuelBattleSample} + */ + public static final class TravelerDuelBattleSample extends ProtoMessage<TravelerDuelBattleSample> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional float FromPerkIntensityRatio = 2;</code> + */ + private float fromPerkIntensityRatio; + + /** + * <code>optional float FromSlotDmgRatio = 3;</code> + */ + private float fromSlotDmgRatio; + + /** + * <code>optional float FromEE = 4;</code> + */ + private float fromEE; + + /** + * <code>optional float FromGenDmgRatio = 5;</code> + */ + private float fromGenDmgRatio; + + /** + * <code>optional float FromCritRatio = 7;</code> + */ + private float fromCritRatio; + + /** + * <code>optional float FromFinalDmgRatio = 8;</code> + */ + private float fromFinalDmgRatio; + + /** + * <code>optional float ToErAmend = 10;</code> + */ + private float toErAmend; + + /** + * <code>optional float ToDefAmend = 11;</code> + */ + private float toDefAmend; + + /** + * <code>optional float ToRcdSlotDmgRatio = 12;</code> + */ + private float toRcdSlotDmgRatio; + + /** + * <code>optional float ToEERCD = 13;</code> + */ + private float toEERCD; + + /** + * <code>optional float ToGenDmgRcdRatio = 14;</code> + */ + private float toGenDmgRcdRatio; + + /** + * <code>optional float ToDmgPlusRcd = 15;</code> + */ + private float toDmgPlusRcd; + + /** + * <code>optional float CritRate = 17;</code> + */ + private float critRate; + + /** + * <code>optional int32 FromSrcAtk = 1;</code> + */ + private int fromSrcAtk; + + /** + * <code>optional int32 FromDmgPlus = 6;</code> + */ + private int fromDmgPlus; + + /** + * <code>optional int32 FromFinalDmgPlus = 9;</code> + */ + private int fromFinalDmgPlus; + + /** + * <code>optional int32 Dmg = 16;</code> + */ + private int dmg; + + /** + * <code>optional int32 Hp = 18;</code> + */ + private int hp; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private TravelerDuelBattleSample() { + } + + /** + * @return a new empty instance of {@code TravelerDuelBattleSample} + */ + public static TravelerDuelBattleSample newInstance() { + return new TravelerDuelBattleSample(); + } + + /** + * <code>optional float FromPerkIntensityRatio = 2;</code> + * @return whether the fromPerkIntensityRatio field is set + */ + public boolean hasFromPerkIntensityRatio() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional float FromPerkIntensityRatio = 2;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromPerkIntensityRatio() { + bitField0_ &= ~0x00000001; + fromPerkIntensityRatio = 0F; + return this; + } + + /** + * <code>optional float FromPerkIntensityRatio = 2;</code> + * @return the fromPerkIntensityRatio + */ + public float getFromPerkIntensityRatio() { + return fromPerkIntensityRatio; + } + + /** + * <code>optional float FromPerkIntensityRatio = 2;</code> + * @param value the fromPerkIntensityRatio to set + * @return this + */ + public TravelerDuelBattleSample setFromPerkIntensityRatio(final float value) { + bitField0_ |= 0x00000001; + fromPerkIntensityRatio = value; + return this; + } + + /** + * <code>optional float FromSlotDmgRatio = 3;</code> + * @return whether the fromSlotDmgRatio field is set + */ + public boolean hasFromSlotDmgRatio() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional float FromSlotDmgRatio = 3;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromSlotDmgRatio() { + bitField0_ &= ~0x00000002; + fromSlotDmgRatio = 0F; + return this; + } + + /** + * <code>optional float FromSlotDmgRatio = 3;</code> + * @return the fromSlotDmgRatio + */ + public float getFromSlotDmgRatio() { + return fromSlotDmgRatio; + } + + /** + * <code>optional float FromSlotDmgRatio = 3;</code> + * @param value the fromSlotDmgRatio to set + * @return this + */ + public TravelerDuelBattleSample setFromSlotDmgRatio(final float value) { + bitField0_ |= 0x00000002; + fromSlotDmgRatio = value; + return this; + } + + /** + * <code>optional float FromEE = 4;</code> + * @return whether the fromEE field is set + */ + public boolean hasFromEE() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional float FromEE = 4;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromEE() { + bitField0_ &= ~0x00000004; + fromEE = 0F; + return this; + } + + /** + * <code>optional float FromEE = 4;</code> + * @return the fromEE + */ + public float getFromEE() { + return fromEE; + } + + /** + * <code>optional float FromEE = 4;</code> + * @param value the fromEE to set + * @return this + */ + public TravelerDuelBattleSample setFromEE(final float value) { + bitField0_ |= 0x00000004; + fromEE = value; + return this; + } + + /** + * <code>optional float FromGenDmgRatio = 5;</code> + * @return whether the fromGenDmgRatio field is set + */ + public boolean hasFromGenDmgRatio() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional float FromGenDmgRatio = 5;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromGenDmgRatio() { + bitField0_ &= ~0x00000008; + fromGenDmgRatio = 0F; + return this; + } + + /** + * <code>optional float FromGenDmgRatio = 5;</code> + * @return the fromGenDmgRatio + */ + public float getFromGenDmgRatio() { + return fromGenDmgRatio; + } + + /** + * <code>optional float FromGenDmgRatio = 5;</code> + * @param value the fromGenDmgRatio to set + * @return this + */ + public TravelerDuelBattleSample setFromGenDmgRatio(final float value) { + bitField0_ |= 0x00000008; + fromGenDmgRatio = value; + return this; + } + + /** + * <code>optional float FromCritRatio = 7;</code> + * @return whether the fromCritRatio field is set + */ + public boolean hasFromCritRatio() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional float FromCritRatio = 7;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromCritRatio() { + bitField0_ &= ~0x00000010; + fromCritRatio = 0F; + return this; + } + + /** + * <code>optional float FromCritRatio = 7;</code> + * @return the fromCritRatio + */ + public float getFromCritRatio() { + return fromCritRatio; + } + + /** + * <code>optional float FromCritRatio = 7;</code> + * @param value the fromCritRatio to set + * @return this + */ + public TravelerDuelBattleSample setFromCritRatio(final float value) { + bitField0_ |= 0x00000010; + fromCritRatio = value; + return this; + } + + /** + * <code>optional float FromFinalDmgRatio = 8;</code> + * @return whether the fromFinalDmgRatio field is set + */ + public boolean hasFromFinalDmgRatio() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * <code>optional float FromFinalDmgRatio = 8;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromFinalDmgRatio() { + bitField0_ &= ~0x00000020; + fromFinalDmgRatio = 0F; + return this; + } + + /** + * <code>optional float FromFinalDmgRatio = 8;</code> + * @return the fromFinalDmgRatio + */ + public float getFromFinalDmgRatio() { + return fromFinalDmgRatio; + } + + /** + * <code>optional float FromFinalDmgRatio = 8;</code> + * @param value the fromFinalDmgRatio to set + * @return this + */ + public TravelerDuelBattleSample setFromFinalDmgRatio(final float value) { + bitField0_ |= 0x00000020; + fromFinalDmgRatio = value; + return this; + } + + /** + * <code>optional float ToErAmend = 10;</code> + * @return whether the toErAmend field is set + */ + public boolean hasToErAmend() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * <code>optional float ToErAmend = 10;</code> + * @return this + */ + public TravelerDuelBattleSample clearToErAmend() { + bitField0_ &= ~0x00000040; + toErAmend = 0F; + return this; + } + + /** + * <code>optional float ToErAmend = 10;</code> + * @return the toErAmend + */ + public float getToErAmend() { + return toErAmend; + } + + /** + * <code>optional float ToErAmend = 10;</code> + * @param value the toErAmend to set + * @return this + */ + public TravelerDuelBattleSample setToErAmend(final float value) { + bitField0_ |= 0x00000040; + toErAmend = value; + return this; + } + + /** + * <code>optional float ToDefAmend = 11;</code> + * @return whether the toDefAmend field is set + */ + public boolean hasToDefAmend() { + return (bitField0_ & 0x00000080) != 0; + } + + /** + * <code>optional float ToDefAmend = 11;</code> + * @return this + */ + public TravelerDuelBattleSample clearToDefAmend() { + bitField0_ &= ~0x00000080; + toDefAmend = 0F; + return this; + } + + /** + * <code>optional float ToDefAmend = 11;</code> + * @return the toDefAmend + */ + public float getToDefAmend() { + return toDefAmend; + } + + /** + * <code>optional float ToDefAmend = 11;</code> + * @param value the toDefAmend to set + * @return this + */ + public TravelerDuelBattleSample setToDefAmend(final float value) { + bitField0_ |= 0x00000080; + toDefAmend = value; + return this; + } + + /** + * <code>optional float ToRcdSlotDmgRatio = 12;</code> + * @return whether the toRcdSlotDmgRatio field is set + */ + public boolean hasToRcdSlotDmgRatio() { + return (bitField0_ & 0x00000100) != 0; + } + + /** + * <code>optional float ToRcdSlotDmgRatio = 12;</code> + * @return this + */ + public TravelerDuelBattleSample clearToRcdSlotDmgRatio() { + bitField0_ &= ~0x00000100; + toRcdSlotDmgRatio = 0F; + return this; + } + + /** + * <code>optional float ToRcdSlotDmgRatio = 12;</code> + * @return the toRcdSlotDmgRatio + */ + public float getToRcdSlotDmgRatio() { + return toRcdSlotDmgRatio; + } + + /** + * <code>optional float ToRcdSlotDmgRatio = 12;</code> + * @param value the toRcdSlotDmgRatio to set + * @return this + */ + public TravelerDuelBattleSample setToRcdSlotDmgRatio(final float value) { + bitField0_ |= 0x00000100; + toRcdSlotDmgRatio = value; + return this; + } + + /** + * <code>optional float ToEERCD = 13;</code> + * @return whether the toEERCD field is set + */ + public boolean hasToEERCD() { + return (bitField0_ & 0x00000200) != 0; + } + + /** + * <code>optional float ToEERCD = 13;</code> + * @return this + */ + public TravelerDuelBattleSample clearToEERCD() { + bitField0_ &= ~0x00000200; + toEERCD = 0F; + return this; + } + + /** + * <code>optional float ToEERCD = 13;</code> + * @return the toEERCD + */ + public float getToEERCD() { + return toEERCD; + } + + /** + * <code>optional float ToEERCD = 13;</code> + * @param value the toEERCD to set + * @return this + */ + public TravelerDuelBattleSample setToEERCD(final float value) { + bitField0_ |= 0x00000200; + toEERCD = value; + return this; + } + + /** + * <code>optional float ToGenDmgRcdRatio = 14;</code> + * @return whether the toGenDmgRcdRatio field is set + */ + public boolean hasToGenDmgRcdRatio() { + return (bitField0_ & 0x00000400) != 0; + } + + /** + * <code>optional float ToGenDmgRcdRatio = 14;</code> + * @return this + */ + public TravelerDuelBattleSample clearToGenDmgRcdRatio() { + bitField0_ &= ~0x00000400; + toGenDmgRcdRatio = 0F; + return this; + } + + /** + * <code>optional float ToGenDmgRcdRatio = 14;</code> + * @return the toGenDmgRcdRatio + */ + public float getToGenDmgRcdRatio() { + return toGenDmgRcdRatio; + } + + /** + * <code>optional float ToGenDmgRcdRatio = 14;</code> + * @param value the toGenDmgRcdRatio to set + * @return this + */ + public TravelerDuelBattleSample setToGenDmgRcdRatio(final float value) { + bitField0_ |= 0x00000400; + toGenDmgRcdRatio = value; + return this; + } + + /** + * <code>optional float ToDmgPlusRcd = 15;</code> + * @return whether the toDmgPlusRcd field is set + */ + public boolean hasToDmgPlusRcd() { + return (bitField0_ & 0x00000800) != 0; + } + + /** + * <code>optional float ToDmgPlusRcd = 15;</code> + * @return this + */ + public TravelerDuelBattleSample clearToDmgPlusRcd() { + bitField0_ &= ~0x00000800; + toDmgPlusRcd = 0F; + return this; + } + + /** + * <code>optional float ToDmgPlusRcd = 15;</code> + * @return the toDmgPlusRcd + */ + public float getToDmgPlusRcd() { + return toDmgPlusRcd; + } + + /** + * <code>optional float ToDmgPlusRcd = 15;</code> + * @param value the toDmgPlusRcd to set + * @return this + */ + public TravelerDuelBattleSample setToDmgPlusRcd(final float value) { + bitField0_ |= 0x00000800; + toDmgPlusRcd = value; + return this; + } + + /** + * <code>optional float CritRate = 17;</code> + * @return whether the critRate field is set + */ + public boolean hasCritRate() { + return (bitField0_ & 0x00001000) != 0; + } + + /** + * <code>optional float CritRate = 17;</code> + * @return this + */ + public TravelerDuelBattleSample clearCritRate() { + bitField0_ &= ~0x00001000; + critRate = 0F; + return this; + } + + /** + * <code>optional float CritRate = 17;</code> + * @return the critRate + */ + public float getCritRate() { + return critRate; + } + + /** + * <code>optional float CritRate = 17;</code> + * @param value the critRate to set + * @return this + */ + public TravelerDuelBattleSample setCritRate(final float value) { + bitField0_ |= 0x00001000; + critRate = value; + return this; + } + + /** + * <code>optional int32 FromSrcAtk = 1;</code> + * @return whether the fromSrcAtk field is set + */ + public boolean hasFromSrcAtk() { + return (bitField0_ & 0x00002000) != 0; + } + + /** + * <code>optional int32 FromSrcAtk = 1;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromSrcAtk() { + bitField0_ &= ~0x00002000; + fromSrcAtk = 0; + return this; + } + + /** + * <code>optional int32 FromSrcAtk = 1;</code> + * @return the fromSrcAtk + */ + public int getFromSrcAtk() { + return fromSrcAtk; + } + + /** + * <code>optional int32 FromSrcAtk = 1;</code> + * @param value the fromSrcAtk to set + * @return this + */ + public TravelerDuelBattleSample setFromSrcAtk(final int value) { + bitField0_ |= 0x00002000; + fromSrcAtk = value; + return this; + } + + /** + * <code>optional int32 FromDmgPlus = 6;</code> + * @return whether the fromDmgPlus field is set + */ + public boolean hasFromDmgPlus() { + return (bitField0_ & 0x00004000) != 0; + } + + /** + * <code>optional int32 FromDmgPlus = 6;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromDmgPlus() { + bitField0_ &= ~0x00004000; + fromDmgPlus = 0; + return this; + } + + /** + * <code>optional int32 FromDmgPlus = 6;</code> + * @return the fromDmgPlus + */ + public int getFromDmgPlus() { + return fromDmgPlus; + } + + /** + * <code>optional int32 FromDmgPlus = 6;</code> + * @param value the fromDmgPlus to set + * @return this + */ + public TravelerDuelBattleSample setFromDmgPlus(final int value) { + bitField0_ |= 0x00004000; + fromDmgPlus = value; + return this; + } + + /** + * <code>optional int32 FromFinalDmgPlus = 9;</code> + * @return whether the fromFinalDmgPlus field is set + */ + public boolean hasFromFinalDmgPlus() { + return (bitField0_ & 0x00008000) != 0; + } + + /** + * <code>optional int32 FromFinalDmgPlus = 9;</code> + * @return this + */ + public TravelerDuelBattleSample clearFromFinalDmgPlus() { + bitField0_ &= ~0x00008000; + fromFinalDmgPlus = 0; + return this; + } + + /** + * <code>optional int32 FromFinalDmgPlus = 9;</code> + * @return the fromFinalDmgPlus + */ + public int getFromFinalDmgPlus() { + return fromFinalDmgPlus; + } + + /** + * <code>optional int32 FromFinalDmgPlus = 9;</code> + * @param value the fromFinalDmgPlus to set + * @return this + */ + public TravelerDuelBattleSample setFromFinalDmgPlus(final int value) { + bitField0_ |= 0x00008000; + fromFinalDmgPlus = value; + return this; + } + + /** + * <code>optional int32 Dmg = 16;</code> + * @return whether the dmg field is set + */ + public boolean hasDmg() { + return (bitField0_ & 0x00010000) != 0; + } + + /** + * <code>optional int32 Dmg = 16;</code> + * @return this + */ + public TravelerDuelBattleSample clearDmg() { + bitField0_ &= ~0x00010000; + dmg = 0; + return this; + } + + /** + * <code>optional int32 Dmg = 16;</code> + * @return the dmg + */ + public int getDmg() { + return dmg; + } + + /** + * <code>optional int32 Dmg = 16;</code> + * @param value the dmg to set + * @return this + */ + public TravelerDuelBattleSample setDmg(final int value) { + bitField0_ |= 0x00010000; + dmg = value; + return this; + } + + /** + * <code>optional int32 Hp = 18;</code> + * @return whether the hp field is set + */ + public boolean hasHp() { + return (bitField0_ & 0x00020000) != 0; + } + + /** + * <code>optional int32 Hp = 18;</code> + * @return this + */ + public TravelerDuelBattleSample clearHp() { + bitField0_ &= ~0x00020000; + hp = 0; + return this; + } + + /** + * <code>optional int32 Hp = 18;</code> + * @return the hp + */ + public int getHp() { + return hp; + } + + /** + * <code>optional int32 Hp = 18;</code> + * @param value the hp to set + * @return this + */ + public TravelerDuelBattleSample setHp(final int value) { + bitField0_ |= 0x00020000; + hp = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00040000) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public TravelerDuelBattleSample clearNextPackage() { + bitField0_ &= ~0x00040000; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00040000; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public TravelerDuelBattleSample addNextPackage(final byte value) { + bitField0_ |= 0x00040000; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public TravelerDuelBattleSample addAllNextPackage(final byte... values) { + bitField0_ |= 0x00040000; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public TravelerDuelBattleSample setNextPackage(final byte... values) { + bitField0_ |= 0x00040000; + nextPackage.copyFrom(values); + return this; + } + + @Override + public TravelerDuelBattleSample copyFrom(final TravelerDuelBattleSample other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + fromPerkIntensityRatio = other.fromPerkIntensityRatio; + fromSlotDmgRatio = other.fromSlotDmgRatio; + fromEE = other.fromEE; + fromGenDmgRatio = other.fromGenDmgRatio; + fromCritRatio = other.fromCritRatio; + fromFinalDmgRatio = other.fromFinalDmgRatio; + toErAmend = other.toErAmend; + toDefAmend = other.toDefAmend; + toRcdSlotDmgRatio = other.toRcdSlotDmgRatio; + toEERCD = other.toEERCD; + toGenDmgRcdRatio = other.toGenDmgRcdRatio; + toDmgPlusRcd = other.toDmgPlusRcd; + critRate = other.critRate; + fromSrcAtk = other.fromSrcAtk; + fromDmgPlus = other.fromDmgPlus; + fromFinalDmgPlus = other.fromFinalDmgPlus; + dmg = other.dmg; + hp = other.hp; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelBattleSample mergeFrom(final TravelerDuelBattleSample other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFromPerkIntensityRatio()) { + setFromPerkIntensityRatio(other.fromPerkIntensityRatio); + } + if (other.hasFromSlotDmgRatio()) { + setFromSlotDmgRatio(other.fromSlotDmgRatio); + } + if (other.hasFromEE()) { + setFromEE(other.fromEE); + } + if (other.hasFromGenDmgRatio()) { + setFromGenDmgRatio(other.fromGenDmgRatio); + } + if (other.hasFromCritRatio()) { + setFromCritRatio(other.fromCritRatio); + } + if (other.hasFromFinalDmgRatio()) { + setFromFinalDmgRatio(other.fromFinalDmgRatio); + } + if (other.hasToErAmend()) { + setToErAmend(other.toErAmend); + } + if (other.hasToDefAmend()) { + setToDefAmend(other.toDefAmend); + } + if (other.hasToRcdSlotDmgRatio()) { + setToRcdSlotDmgRatio(other.toRcdSlotDmgRatio); + } + if (other.hasToEERCD()) { + setToEERCD(other.toEERCD); + } + if (other.hasToGenDmgRcdRatio()) { + setToGenDmgRcdRatio(other.toGenDmgRcdRatio); + } + if (other.hasToDmgPlusRcd()) { + setToDmgPlusRcd(other.toDmgPlusRcd); + } + if (other.hasCritRate()) { + setCritRate(other.critRate); + } + if (other.hasFromSrcAtk()) { + setFromSrcAtk(other.fromSrcAtk); + } + if (other.hasFromDmgPlus()) { + setFromDmgPlus(other.fromDmgPlus); + } + if (other.hasFromFinalDmgPlus()) { + setFromFinalDmgPlus(other.fromFinalDmgPlus); + } + if (other.hasDmg()) { + setDmg(other.dmg); + } + if (other.hasHp()) { + setHp(other.hp); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public TravelerDuelBattleSample clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + fromPerkIntensityRatio = 0F; + fromSlotDmgRatio = 0F; + fromEE = 0F; + fromGenDmgRatio = 0F; + fromCritRatio = 0F; + fromFinalDmgRatio = 0F; + toErAmend = 0F; + toDefAmend = 0F; + toRcdSlotDmgRatio = 0F; + toEERCD = 0F; + toGenDmgRcdRatio = 0F; + toDmgPlusRcd = 0F; + critRate = 0F; + fromSrcAtk = 0; + fromDmgPlus = 0; + fromFinalDmgPlus = 0; + dmg = 0; + hp = 0; + nextPackage.clear(); + return this; + } + + @Override + public TravelerDuelBattleSample clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof TravelerDuelBattleSample)) { + return false; + } + TravelerDuelBattleSample other = (TravelerDuelBattleSample) o; + return bitField0_ == other.bitField0_ + && (!hasFromPerkIntensityRatio() || ProtoUtil.isEqual(fromPerkIntensityRatio, other.fromPerkIntensityRatio)) + && (!hasFromSlotDmgRatio() || ProtoUtil.isEqual(fromSlotDmgRatio, other.fromSlotDmgRatio)) + && (!hasFromEE() || ProtoUtil.isEqual(fromEE, other.fromEE)) + && (!hasFromGenDmgRatio() || ProtoUtil.isEqual(fromGenDmgRatio, other.fromGenDmgRatio)) + && (!hasFromCritRatio() || ProtoUtil.isEqual(fromCritRatio, other.fromCritRatio)) + && (!hasFromFinalDmgRatio() || ProtoUtil.isEqual(fromFinalDmgRatio, other.fromFinalDmgRatio)) + && (!hasToErAmend() || ProtoUtil.isEqual(toErAmend, other.toErAmend)) + && (!hasToDefAmend() || ProtoUtil.isEqual(toDefAmend, other.toDefAmend)) + && (!hasToRcdSlotDmgRatio() || ProtoUtil.isEqual(toRcdSlotDmgRatio, other.toRcdSlotDmgRatio)) + && (!hasToEERCD() || ProtoUtil.isEqual(toEERCD, other.toEERCD)) + && (!hasToGenDmgRcdRatio() || ProtoUtil.isEqual(toGenDmgRcdRatio, other.toGenDmgRcdRatio)) + && (!hasToDmgPlusRcd() || ProtoUtil.isEqual(toDmgPlusRcd, other.toDmgPlusRcd)) + && (!hasCritRate() || ProtoUtil.isEqual(critRate, other.critRate)) + && (!hasFromSrcAtk() || fromSrcAtk == other.fromSrcAtk) + && (!hasFromDmgPlus() || fromDmgPlus == other.fromDmgPlus) + && (!hasFromFinalDmgPlus() || fromFinalDmgPlus == other.fromFinalDmgPlus) + && (!hasDmg() || dmg == other.dmg) + && (!hasHp() || hp == other.hp) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 21); + output.writeFloatNoTag(fromPerkIntensityRatio); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 29); + output.writeFloatNoTag(fromSlotDmgRatio); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 37); + output.writeFloatNoTag(fromEE); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 45); + output.writeFloatNoTag(fromGenDmgRatio); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 61); + output.writeFloatNoTag(fromCritRatio); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 69); + output.writeFloatNoTag(fromFinalDmgRatio); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 85); + output.writeFloatNoTag(toErAmend); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeRawByte((byte) 93); + output.writeFloatNoTag(toDefAmend); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeRawByte((byte) 101); + output.writeFloatNoTag(toRcdSlotDmgRatio); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeRawByte((byte) 109); + output.writeFloatNoTag(toEERCD); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeRawByte((byte) 117); + output.writeFloatNoTag(toGenDmgRcdRatio); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeRawByte((byte) 125); + output.writeFloatNoTag(toDmgPlusRcd); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeRawLittleEndian16((short) 397); + output.writeFloatNoTag(critRate); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeRawByte((byte) 8); + output.writeInt32NoTag(fromSrcAtk); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeRawByte((byte) 48); + output.writeInt32NoTag(fromDmgPlus); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeRawByte((byte) 72); + output.writeInt32NoTag(fromFinalDmgPlus); + } + if ((bitField0_ & 0x00010000) != 0) { + output.writeRawLittleEndian16((short) 384); + output.writeInt32NoTag(dmg); + } + if ((bitField0_ & 0x00020000) != 0) { + output.writeRawLittleEndian16((short) 400); + output.writeInt32NoTag(hp); + } + if ((bitField0_ & 0x00040000) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000040) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000080) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000100) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000200) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000400) != 0) { + size += 5; + } + if ((bitField0_ & 0x00000800) != 0) { + size += 5; + } + if ((bitField0_ & 0x00001000) != 0) { + size += 6; + } + if ((bitField0_ & 0x00002000) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(fromSrcAtk); + } + if ((bitField0_ & 0x00004000) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(fromDmgPlus); + } + if ((bitField0_ & 0x00008000) != 0) { + size += 1 + ProtoSink.computeInt32SizeNoTag(fromFinalDmgPlus); + } + if ((bitField0_ & 0x00010000) != 0) { + size += 2 + ProtoSink.computeInt32SizeNoTag(dmg); + } + if ((bitField0_ & 0x00020000) != 0) { + size += 2 + ProtoSink.computeInt32SizeNoTag(hp); + } + if ((bitField0_ & 0x00040000) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public TravelerDuelBattleSample mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 21: { + // fromPerkIntensityRatio + fromPerkIntensityRatio = input.readFloat(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 29) { + break; + } + } + case 29: { + // fromSlotDmgRatio + fromSlotDmgRatio = input.readFloat(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 37) { + break; + } + } + case 37: { + // fromEE + fromEE = input.readFloat(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 45) { + break; + } + } + case 45: { + // fromGenDmgRatio + fromGenDmgRatio = input.readFloat(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 61) { + break; + } + } + case 61: { + // fromCritRatio + fromCritRatio = input.readFloat(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 69) { + break; + } + } + case 69: { + // fromFinalDmgRatio + fromFinalDmgRatio = input.readFloat(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 85) { + break; + } + } + case 85: { + // toErAmend + toErAmend = input.readFloat(); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 93) { + break; + } + } + case 93: { + // toDefAmend + toDefAmend = input.readFloat(); + bitField0_ |= 0x00000080; + tag = input.readTag(); + if (tag != 101) { + break; + } + } + case 101: { + // toRcdSlotDmgRatio + toRcdSlotDmgRatio = input.readFloat(); + bitField0_ |= 0x00000100; + tag = input.readTag(); + if (tag != 109) { + break; + } + } + case 109: { + // toEERCD + toEERCD = input.readFloat(); + bitField0_ |= 0x00000200; + tag = input.readTag(); + if (tag != 117) { + break; + } + } + case 117: { + // toGenDmgRcdRatio + toGenDmgRcdRatio = input.readFloat(); + bitField0_ |= 0x00000400; + tag = input.readTag(); + if (tag != 125) { + break; + } + } + case 125: { + // toDmgPlusRcd + toDmgPlusRcd = input.readFloat(); + bitField0_ |= 0x00000800; + tag = input.readTag(); + if (tag != 141) { + break; + } + } + case 141: { + // critRate + critRate = input.readFloat(); + bitField0_ |= 0x00001000; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // fromSrcAtk + fromSrcAtk = input.readInt32(); + bitField0_ |= 0x00002000; + tag = input.readTag(); + if (tag != 48) { + break; + } + } + case 48: { + // fromDmgPlus + fromDmgPlus = input.readInt32(); + bitField0_ |= 0x00004000; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // fromFinalDmgPlus + fromFinalDmgPlus = input.readInt32(); + bitField0_ |= 0x00008000; + tag = input.readTag(); + if (tag != 128) { + break; + } + } + case 128: { + // dmg + dmg = input.readInt32(); + bitField0_ |= 0x00010000; + tag = input.readTag(); + if (tag != 144) { + break; + } + } + case 144: { + // hp + hp = input.readInt32(); + bitField0_ |= 0x00020000; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00040000; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeFloat(FieldNames.fromPerkIntensityRatio, fromPerkIntensityRatio); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeFloat(FieldNames.fromSlotDmgRatio, fromSlotDmgRatio); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeFloat(FieldNames.fromEE, fromEE); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeFloat(FieldNames.fromGenDmgRatio, fromGenDmgRatio); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeFloat(FieldNames.fromCritRatio, fromCritRatio); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeFloat(FieldNames.fromFinalDmgRatio, fromFinalDmgRatio); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeFloat(FieldNames.toErAmend, toErAmend); + } + if ((bitField0_ & 0x00000080) != 0) { + output.writeFloat(FieldNames.toDefAmend, toDefAmend); + } + if ((bitField0_ & 0x00000100) != 0) { + output.writeFloat(FieldNames.toRcdSlotDmgRatio, toRcdSlotDmgRatio); + } + if ((bitField0_ & 0x00000200) != 0) { + output.writeFloat(FieldNames.toEERCD, toEERCD); + } + if ((bitField0_ & 0x00000400) != 0) { + output.writeFloat(FieldNames.toGenDmgRcdRatio, toGenDmgRcdRatio); + } + if ((bitField0_ & 0x00000800) != 0) { + output.writeFloat(FieldNames.toDmgPlusRcd, toDmgPlusRcd); + } + if ((bitField0_ & 0x00001000) != 0) { + output.writeFloat(FieldNames.critRate, critRate); + } + if ((bitField0_ & 0x00002000) != 0) { + output.writeInt32(FieldNames.fromSrcAtk, fromSrcAtk); + } + if ((bitField0_ & 0x00004000) != 0) { + output.writeInt32(FieldNames.fromDmgPlus, fromDmgPlus); + } + if ((bitField0_ & 0x00008000) != 0) { + output.writeInt32(FieldNames.fromFinalDmgPlus, fromFinalDmgPlus); + } + if ((bitField0_ & 0x00010000) != 0) { + output.writeInt32(FieldNames.dmg, dmg); + } + if ((bitField0_ & 0x00020000) != 0) { + output.writeInt32(FieldNames.hp, hp); + } + if ((bitField0_ & 0x00040000) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public TravelerDuelBattleSample mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1072259184: { + if (input.isAtField(FieldNames.fromPerkIntensityRatio)) { + if (!input.trySkipNullValue()) { + fromPerkIntensityRatio = input.readFloat(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1791376053: { + if (input.isAtField(FieldNames.fromSlotDmgRatio)) { + if (!input.trySkipNullValue()) { + fromSlotDmgRatio = input.readFloat(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2112735722: { + if (input.isAtField(FieldNames.fromEE)) { + if (!input.trySkipNullValue()) { + fromEE = input.readFloat(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 206612211: { + if (input.isAtField(FieldNames.fromGenDmgRatio)) { + if (!input.trySkipNullValue()) { + fromGenDmgRatio = input.readFloat(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -996215385: { + if (input.isAtField(FieldNames.fromCritRatio)) { + if (!input.trySkipNullValue()) { + fromCritRatio = input.readFloat(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case -336775783: { + if (input.isAtField(FieldNames.fromFinalDmgRatio)) { + if (!input.trySkipNullValue()) { + fromFinalDmgRatio = input.readFloat(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1183556249: { + if (input.isAtField(FieldNames.toErAmend)) { + if (!input.trySkipNullValue()) { + toErAmend = input.readFloat(); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1707087899: { + if (input.isAtField(FieldNames.toDefAmend)) { + if (!input.trySkipNullValue()) { + toDefAmend = input.readFloat(); + bitField0_ |= 0x00000080; + } + } else { + input.skipUnknownField(); + } + break; + } + case -831412829: { + if (input.isAtField(FieldNames.toRcdSlotDmgRatio)) { + if (!input.trySkipNullValue()) { + toRcdSlotDmgRatio = input.readFloat(); + bitField0_ |= 0x00000100; + } + } else { + input.skipUnknownField(); + } + break; + } + case 484593112: { + if (input.isAtField(FieldNames.toEERCD)) { + if (!input.trySkipNullValue()) { + toEERCD = input.readFloat(); + bitField0_ |= 0x00000200; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1466564447: { + if (input.isAtField(FieldNames.toGenDmgRcdRatio)) { + if (!input.trySkipNullValue()) { + toGenDmgRcdRatio = input.readFloat(); + bitField0_ |= 0x00000400; + } + } else { + input.skipUnknownField(); + } + break; + } + case 748047990: { + if (input.isAtField(FieldNames.toDmgPlusRcd)) { + if (!input.trySkipNullValue()) { + toDmgPlusRcd = input.readFloat(); + bitField0_ |= 0x00000800; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2016109050: { + if (input.isAtField(FieldNames.critRate)) { + if (!input.trySkipNullValue()) { + critRate = input.readFloat(); + bitField0_ |= 0x00001000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -145833346: { + if (input.isAtField(FieldNames.fromSrcAtk)) { + if (!input.trySkipNullValue()) { + fromSrcAtk = input.readInt32(); + bitField0_ |= 0x00002000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -792531826: { + if (input.isAtField(FieldNames.fromDmgPlus)) { + if (!input.trySkipNullValue()) { + fromDmgPlus = input.readInt32(); + bitField0_ |= 0x00004000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 543276620: { + if (input.isAtField(FieldNames.fromFinalDmgPlus)) { + if (!input.trySkipNullValue()) { + fromFinalDmgPlus = input.readInt32(); + bitField0_ |= 0x00008000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 68830: { + if (input.isAtField(FieldNames.dmg)) { + if (!input.trySkipNullValue()) { + dmg = input.readInt32(); + bitField0_ |= 0x00010000; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2344: { + if (input.isAtField(FieldNames.hp)) { + if (!input.trySkipNullValue()) { + hp = input.readInt32(); + bitField0_ |= 0x00020000; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00040000; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public TravelerDuelBattleSample clone() { + return new TravelerDuelBattleSample().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static TravelerDuelBattleSample parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleSample(), data).checkInitialized(); + } + + public static TravelerDuelBattleSample parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleSample(), input).checkInitialized(); + } + + public static TravelerDuelBattleSample parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new TravelerDuelBattleSample(), input).checkInitialized(); + } + + /** + * @return factory for creating TravelerDuelBattleSample messages + */ + public static MessageFactory<TravelerDuelBattleSample> getFactory() { + return TravelerDuelBattleSampleFactory.INSTANCE; + } + + private enum TravelerDuelBattleSampleFactory implements MessageFactory<TravelerDuelBattleSample> { + INSTANCE; + + @Override + public TravelerDuelBattleSample create() { + return TravelerDuelBattleSample.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName fromPerkIntensityRatio = FieldName.forField("FromPerkIntensityRatio"); + + static final FieldName fromSlotDmgRatio = FieldName.forField("FromSlotDmgRatio"); + + static final FieldName fromEE = FieldName.forField("FromEE"); + + static final FieldName fromGenDmgRatio = FieldName.forField("FromGenDmgRatio"); + + static final FieldName fromCritRatio = FieldName.forField("FromCritRatio"); + + static final FieldName fromFinalDmgRatio = FieldName.forField("FromFinalDmgRatio"); + + static final FieldName toErAmend = FieldName.forField("ToErAmend"); + + static final FieldName toDefAmend = FieldName.forField("ToDefAmend"); + + static final FieldName toRcdSlotDmgRatio = FieldName.forField("ToRcdSlotDmgRatio"); + + static final FieldName toEERCD = FieldName.forField("ToEERCD"); + + static final FieldName toGenDmgRcdRatio = FieldName.forField("ToGenDmgRcdRatio"); + + static final FieldName toDmgPlusRcd = FieldName.forField("ToDmgPlusRcd"); + + static final FieldName critRate = FieldName.forField("CritRate"); + + static final FieldName fromSrcAtk = FieldName.forField("FromSrcAtk"); + + static final FieldName fromDmgPlus = FieldName.forField("FromDmgPlus"); + + static final FieldName fromFinalDmgPlus = FieldName.forField("FromFinalDmgPlus"); + + static final FieldName dmg = FieldName.forField("Dmg"); + + static final FieldName hp = FieldName.forField("Hp"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code RankChange} + */ + public static final class RankChange extends ProtoMessage<RankChange> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Old = 1;</code> + */ + private int old; + + /** + * <code>optional uint32 New = 2;</code> + */ + private int new_; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional string Token = 3;</code> + */ + private final Utf8String token = Utf8String.newEmptyInstance(); + + private RankChange() { + } + + /** + * @return a new empty instance of {@code RankChange} + */ + public static RankChange newInstance() { + return new RankChange(); + } + + /** + * <code>optional uint32 Old = 1;</code> + * @return whether the old field is set + */ + public boolean hasOld() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Old = 1;</code> + * @return this + */ + public RankChange clearOld() { + bitField0_ &= ~0x00000001; + old = 0; + return this; + } + + /** + * <code>optional uint32 Old = 1;</code> + * @return the old + */ + public int getOld() { + return old; + } + + /** + * <code>optional uint32 Old = 1;</code> + * @param value the old to set + * @return this + */ + public RankChange setOld(final int value) { + bitField0_ |= 0x00000001; + old = value; + return this; + } + + /** + * <code>optional uint32 New = 2;</code> + * @return whether the new_ field is set + */ + public boolean hasNew() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 New = 2;</code> + * @return this + */ + public RankChange clearNew() { + bitField0_ &= ~0x00000002; + new_ = 0; + return this; + } + + /** + * <code>optional uint32 New = 2;</code> + * @return the new_ + */ + public int getNew() { + return new_; + } + + /** + * <code>optional uint32 New = 2;</code> + * @param value the new_ to set + * @return this + */ + public RankChange setNew(final int value) { + bitField0_ |= 0x00000002; + new_ = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public RankChange clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public RankChange addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public RankChange addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public RankChange setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>optional string Token = 3;</code> + * @return whether the token field is set + */ + public boolean hasToken() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional string Token = 3;</code> + * @return this + */ + public RankChange clearToken() { + bitField0_ &= ~0x00000008; + token.clear(); + return this; + } + + /** + * <code>optional string Token = 3;</code> + * @return the token + */ + public String getToken() { + return token.getString(); + } + + /** + * <code>optional string Token = 3;</code> + * @return internal {@code Utf8String} representation of token for reading + */ + public Utf8String getTokenBytes() { + return this.token; + } + + /** + * <code>optional string Token = 3;</code> + * @return internal {@code Utf8String} representation of token for modifications + */ + public Utf8String getMutableTokenBytes() { + bitField0_ |= 0x00000008; + return this.token; + } + + /** + * <code>optional string Token = 3;</code> + * @param value the token to set + * @return this + */ + public RankChange setToken(final CharSequence value) { + bitField0_ |= 0x00000008; + token.copyFrom(value); + return this; + } + + /** + * <code>optional string Token = 3;</code> + * @param value the token to set + * @return this + */ + public RankChange setToken(final Utf8String value) { + bitField0_ |= 0x00000008; + token.copyFrom(value); + return this; + } + + @Override + public RankChange copyFrom(final RankChange other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + old = other.old; + new_ = other.new_; + nextPackage.copyFrom(other.nextPackage); + token.copyFrom(other.token); + } + return this; + } + + @Override + public RankChange mergeFrom(final RankChange other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasOld()) { + setOld(other.old); + } + if (other.hasNew()) { + setNew(other.new_); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasToken()) { + getMutableTokenBytes().copyFrom(other.token); + } + return this; + } + + @Override + public RankChange clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + old = 0; + new_ = 0; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public RankChange clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + token.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof RankChange)) { + return false; + } + RankChange other = (RankChange) o; + return bitField0_ == other.bitField0_ + && (!hasOld() || old == other.old) + && (!hasNew() || new_ == other.new_) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasToken() || token.equals(other.token)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(old); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(new_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 26); + output.writeStringNoTag(token); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(old); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(new_); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeStringSizeNoTag(token); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public RankChange mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // old + old = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // new_ + new_ = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // token + input.readString(token); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.old, old); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.new_, new_); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeString(FieldNames.token, token); + } + output.endObject(); + } + + @Override + public RankChange mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 79367: { + if (input.isAtField(FieldNames.old)) { + if (!input.trySkipNullValue()) { + old = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 78208: { + if (input.isAtField(FieldNames.new_)) { + if (!input.trySkipNullValue()) { + new_ = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80988633: { + if (input.isAtField(FieldNames.token)) { + if (!input.trySkipNullValue()) { + input.readString(token); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public RankChange clone() { + return new RankChange().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static RankChange parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new RankChange(), data).checkInitialized(); + } + + public static RankChange parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new RankChange(), input).checkInitialized(); + } + + public static RankChange parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new RankChange(), input).checkInitialized(); + } + + /** + * @return factory for creating RankChange messages + */ + public static MessageFactory<RankChange> getFactory() { + return RankChangeFactory.INSTANCE; + } + + private enum RankChangeFactory implements MessageFactory<RankChange> { + INSTANCE; + + @Override + public RankChange create() { + return RankChange.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName old = FieldName.forField("Old"); + + static final FieldName new_ = FieldName.forField("New"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName token = FieldName.forField("Token"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/TutorialLevelRewardReceive.java b/src/generated/main/emu/nebula/proto/TutorialLevelRewardReceive.java new file mode 100644 index 0000000..f787f56 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TutorialLevelRewardReceive.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class TutorialLevelRewardReceive { +} diff --git a/src/generated/main/emu/nebula/proto/TutorialLevelSettle.java b/src/generated/main/emu/nebula/proto/TutorialLevelSettle.java new file mode 100644 index 0000000..4e72a3d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/TutorialLevelSettle.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class TutorialLevelSettle { +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorApply.java b/src/generated/main/emu/nebula/proto/VampireSurvivorApply.java new file mode 100644 index 0000000..cbf0252 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorApply.java @@ -0,0 +1,1108 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedLong; +import us.hebi.quickbuf.RepeatedMessage; + +public final class VampireSurvivorApply { + /** + * Protobuf type {@code VampireSurvivorApplyReq} + */ + public static final class VampireSurvivorApplyReq extends ProtoMessage<VampireSurvivorApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint64 BuildIds = 2;</code> + */ + private final RepeatedLong buildIds = RepeatedLong.newEmptyInstance(); + + private VampireSurvivorApplyReq() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorApplyReq} + */ + public static VampireSurvivorApplyReq newInstance() { + return new VampireSurvivorApplyReq(); + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public VampireSurvivorApplyReq clearId() { + bitField0_ &= ~0x00000001; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public VampireSurvivorApplyReq setId(final int value) { + bitField0_ |= 0x00000001; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorApplyReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 2;</code> + * @return whether the buildIds field is set + */ + public boolean hasBuildIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint64 BuildIds = 2;</code> + * @return this + */ + public VampireSurvivorApplyReq clearBuildIds() { + bitField0_ &= ~0x00000004; + buildIds.clear(); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableBuildIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedLong getBuildIds() { + return buildIds; + } + + /** + * <code>repeated uint64 BuildIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedLong getMutableBuildIds() { + bitField0_ |= 0x00000004; + return buildIds; + } + + /** + * <code>repeated uint64 BuildIds = 2;</code> + * @param value the buildIds to add + * @return this + */ + public VampireSurvivorApplyReq addBuildIds(final long value) { + bitField0_ |= 0x00000004; + buildIds.add(value); + return this; + } + + /** + * <code>repeated uint64 BuildIds = 2;</code> + * @param values the buildIds to add + * @return this + */ + public VampireSurvivorApplyReq addAllBuildIds(final long... values) { + bitField0_ |= 0x00000004; + buildIds.addAll(values); + return this; + } + + @Override + public VampireSurvivorApplyReq copyFrom(final VampireSurvivorApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + buildIds.copyFrom(other.buildIds); + } + return this; + } + + @Override + public VampireSurvivorApplyReq mergeFrom(final VampireSurvivorApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasBuildIds()) { + getMutableBuildIds().addAll(other.buildIds); + } + return this; + } + + @Override + public VampireSurvivorApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + id = 0; + nextPackage.clear(); + buildIds.clear(); + return this; + } + + @Override + public VampireSurvivorApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + buildIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorApplyReq)) { + return false; + } + VampireSurvivorApplyReq other = (VampireSurvivorApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasBuildIds() || buildIds.equals(other.buildIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < buildIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * buildIds.length()) + ProtoSink.computeRepeatedUInt64SizeNoTag(buildIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // buildIds [packed=true] + input.readPackedUInt64(buildIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // buildIds [packed=false] + tag = input.readRepeatedUInt64(buildIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt64(FieldNames.buildIds, buildIds); + } + output.endObject(); + } + + @Override + public VampireSurvivorApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1366033014: { + if (input.isAtField(FieldNames.buildIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt64(buildIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorApplyReq clone() { + return new VampireSurvivorApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorApplyReq(), data).checkInitialized(); + } + + public static VampireSurvivorApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorApplyReq(), input).checkInitialized(); + } + + public static VampireSurvivorApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorApplyReq messages + */ + public static MessageFactory<VampireSurvivorApplyReq> getFactory() { + return VampireSurvivorApplyReqFactory.INSTANCE; + } + + private enum VampireSurvivorApplyReqFactory implements MessageFactory<VampireSurvivorApplyReq> { + INSTANCE; + + @Override + public VampireSurvivorApplyReq create() { + return VampireSurvivorApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName buildIds = FieldName.forField("BuildIds"); + } + } + + /** + * Protobuf type {@code VampireSurvivorApplyResp} + */ + public static final class VampireSurvivorApplyResp extends ProtoMessage<VampireSurvivorApplyResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .VampireSurvivorFateCardSelect Select = 2;</code> + */ + private final Public.VampireSurvivorFateCardSelect select = Public.VampireSurvivorFateCardSelect.newInstance(); + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 3;</code> + */ + private final Public.VampireSurvivorLevelReward reward = Public.VampireSurvivorLevelReward.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .VampireSurvivorEvent Events = 1;</code> + */ + private final RepeatedMessage<Public.VampireSurvivorEvent> events = RepeatedMessage.newEmptyInstance(Public.VampireSurvivorEvent.getFactory()); + + private VampireSurvivorApplyResp() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorApplyResp} + */ + public static VampireSurvivorApplyResp newInstance() { + return new VampireSurvivorApplyResp(); + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Select = 2;</code> + * @return whether the select field is set + */ + public boolean hasSelect() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Select = 2;</code> + * @return this + */ + public VampireSurvivorApplyResp clearSelect() { + bitField0_ &= ~0x00000001; + select.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Select = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableSelect()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.VampireSurvivorFateCardSelect getSelect() { + return select; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Select = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.VampireSurvivorFateCardSelect getMutableSelect() { + bitField0_ |= 0x00000001; + return select; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Select = 2;</code> + * @param value the select to set + * @return this + */ + public VampireSurvivorApplyResp setSelect(final Public.VampireSurvivorFateCardSelect value) { + bitField0_ |= 0x00000001; + select.copyFrom(value); + return this; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 3;</code> + * @return whether the reward field is set + */ + public boolean hasReward() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 3;</code> + * @return this + */ + public VampireSurvivorApplyResp clearReward() { + bitField0_ &= ~0x00000002; + reward.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.VampireSurvivorLevelReward getReward() { + return reward; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.VampireSurvivorLevelReward getMutableReward() { + bitField0_ |= 0x00000002; + return reward; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 3;</code> + * @param value the reward to set + * @return this + */ + public VampireSurvivorApplyResp setReward(final Public.VampireSurvivorLevelReward value) { + bitField0_ |= 0x00000002; + reward.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorApplyResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorApplyResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorApplyResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorApplyResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .VampireSurvivorEvent Events = 1;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .VampireSurvivorEvent Events = 1;</code> + * @return this + */ + public VampireSurvivorApplyResp clearEvents() { + bitField0_ &= ~0x00000008; + events.clear(); + return this; + } + + /** + * <code>repeated .VampireSurvivorEvent Events = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.VampireSurvivorEvent> getEvents() { + return events; + } + + /** + * <code>repeated .VampireSurvivorEvent Events = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.VampireSurvivorEvent> getMutableEvents() { + bitField0_ |= 0x00000008; + return events; + } + + /** + * <code>repeated .VampireSurvivorEvent Events = 1;</code> + * @param value the events to add + * @return this + */ + public VampireSurvivorApplyResp addEvents(final Public.VampireSurvivorEvent value) { + bitField0_ |= 0x00000008; + events.add(value); + return this; + } + + /** + * <code>repeated .VampireSurvivorEvent Events = 1;</code> + * @param values the events to add + * @return this + */ + public VampireSurvivorApplyResp addAllEvents(final Public.VampireSurvivorEvent... values) { + bitField0_ |= 0x00000008; + events.addAll(values); + return this; + } + + @Override + public VampireSurvivorApplyResp copyFrom(final VampireSurvivorApplyResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + select.copyFrom(other.select); + reward.copyFrom(other.reward); + nextPackage.copyFrom(other.nextPackage); + events.copyFrom(other.events); + } + return this; + } + + @Override + public VampireSurvivorApplyResp mergeFrom(final VampireSurvivorApplyResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSelect()) { + getMutableSelect().mergeFrom(other.select); + } + if (other.hasReward()) { + getMutableReward().mergeFrom(other.reward); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasEvents()) { + getMutableEvents().addAll(other.events); + } + return this; + } + + @Override + public VampireSurvivorApplyResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + select.clear(); + reward.clear(); + nextPackage.clear(); + events.clear(); + return this; + } + + @Override + public VampireSurvivorApplyResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + select.clearQuick(); + reward.clearQuick(); + nextPackage.clear(); + events.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorApplyResp)) { + return false; + } + VampireSurvivorApplyResp other = (VampireSurvivorApplyResp) o; + return bitField0_ == other.bitField0_ + && (!hasSelect() || select.equals(other.select)) + && (!hasReward() || reward.equals(other.reward)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasEvents() || events.equals(other.events)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(select); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(reward); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < events.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(events.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(select); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(reward); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * events.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(events); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorApplyResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // select + input.readMessage(select); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // reward + input.readMessage(reward); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // events + tag = input.readRepeatedMessage(events, tag); + bitField0_ |= 0x00000008; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.select, select); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.reward, reward); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.events, events); + } + output.endObject(); + } + + @Override + public VampireSurvivorApplyResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1822154468: { + if (input.isAtField(FieldNames.select)) { + if (!input.trySkipNullValue()) { + input.readMessage(select); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1850459313: { + if (input.isAtField(FieldNames.reward)) { + if (!input.trySkipNullValue()) { + input.readMessage(reward); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(events); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorApplyResp clone() { + return new VampireSurvivorApplyResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorApplyResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorApplyResp(), data).checkInitialized(); + } + + public static VampireSurvivorApplyResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorApplyResp(), input).checkInitialized(); + } + + public static VampireSurvivorApplyResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorApplyResp(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorApplyResp messages + */ + public static MessageFactory<VampireSurvivorApplyResp> getFactory() { + return VampireSurvivorApplyRespFactory.INSTANCE; + } + + private enum VampireSurvivorApplyRespFactory implements MessageFactory<VampireSurvivorApplyResp> { + INSTANCE; + + @Override + public VampireSurvivorApplyResp create() { + return VampireSurvivorApplyResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName select = FieldName.forField("Select"); + + static final FieldName reward = FieldName.forField("Reward"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName events = FieldName.forField("Events"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorAreaChange.java b/src/generated/main/emu/nebula/proto/VampireSurvivorAreaChange.java new file mode 100644 index 0000000..d7b6bfe --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorAreaChange.java @@ -0,0 +1,607 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class VampireSurvivorAreaChange { + /** + * Protobuf type {@code VampireSurvivorAreaChangeReq} + */ + public static final class VampireSurvivorAreaChangeReq extends ProtoMessage<VampireSurvivorAreaChangeReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Time = 2;</code> + */ + private int time; + + /** + * <code>optional .Events Events = 7;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 KillCount = 1;</code> + */ + private final RepeatedInt killCount = RepeatedInt.newEmptyInstance(); + + private VampireSurvivorAreaChangeReq() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorAreaChangeReq} + */ + public static VampireSurvivorAreaChangeReq newInstance() { + return new VampireSurvivorAreaChangeReq(); + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return this + */ + public VampireSurvivorAreaChangeReq clearTime() { + bitField0_ &= ~0x00000001; + time = 0; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return the time + */ + public int getTime() { + return time; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @param value the time to set + * @return this + */ + public VampireSurvivorAreaChangeReq setTime(final int value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * <code>optional .Events Events = 7;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .Events Events = 7;</code> + * @return this + */ + public VampireSurvivorAreaChangeReq clearEvents() { + bitField0_ &= ~0x00000002; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 7;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 7;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000002; + return events; + } + + /** + * <code>optional .Events Events = 7;</code> + * @param value the events to set + * @return this + */ + public VampireSurvivorAreaChangeReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000002; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorAreaChangeReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorAreaChangeReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorAreaChangeReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorAreaChangeReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @return whether the killCount field is set + */ + public boolean hasKillCount() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @return this + */ + public VampireSurvivorAreaChangeReq clearKillCount() { + bitField0_ &= ~0x00000008; + killCount.clear(); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableKillCount()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getKillCount() { + return killCount; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableKillCount() { + bitField0_ |= 0x00000008; + return killCount; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @param value the killCount to add + * @return this + */ + public VampireSurvivorAreaChangeReq addKillCount(final int value) { + bitField0_ |= 0x00000008; + killCount.add(value); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @param values the killCount to add + * @return this + */ + public VampireSurvivorAreaChangeReq addAllKillCount(final int... values) { + bitField0_ |= 0x00000008; + killCount.addAll(values); + return this; + } + + @Override + public VampireSurvivorAreaChangeReq copyFrom(final VampireSurvivorAreaChangeReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + killCount.copyFrom(other.killCount); + } + return this; + } + + @Override + public VampireSurvivorAreaChangeReq mergeFrom(final VampireSurvivorAreaChangeReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasKillCount()) { + getMutableKillCount().addAll(other.killCount); + } + return this; + } + + @Override + public VampireSurvivorAreaChangeReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0; + events.clear(); + nextPackage.clear(); + killCount.clear(); + return this; + } + + @Override + public VampireSurvivorAreaChangeReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + killCount.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorAreaChangeReq)) { + return false; + } + VampireSurvivorAreaChangeReq other = (VampireSurvivorAreaChangeReq) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || time == other.time) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasKillCount() || killCount.equals(other.killCount)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < killCount.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(killCount.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * killCount.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(killCount); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorAreaChangeReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // events + input.readMessage(events); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // killCount [packed=true] + input.readPackedUInt32(killCount, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // killCount [packed=false] + tag = input.readRepeatedUInt32(killCount, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.killCount, killCount); + } + output.endObject(); + } + + @Override + public VampireSurvivorAreaChangeReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 414756913: { + if (input.isAtField(FieldNames.killCount)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(killCount); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorAreaChangeReq clone() { + return new VampireSurvivorAreaChangeReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorAreaChangeReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorAreaChangeReq(), data).checkInitialized(); + } + + public static VampireSurvivorAreaChangeReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorAreaChangeReq(), input).checkInitialized(); + } + + public static VampireSurvivorAreaChangeReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorAreaChangeReq(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorAreaChangeReq messages + */ + public static MessageFactory<VampireSurvivorAreaChangeReq> getFactory() { + return VampireSurvivorAreaChangeReqFactory.INSTANCE; + } + + private enum VampireSurvivorAreaChangeReqFactory implements MessageFactory<VampireSurvivorAreaChangeReq> { + INSTANCE; + + @Override + public VampireSurvivorAreaChangeReq create() { + return VampireSurvivorAreaChangeReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("Time"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName killCount = FieldName.forField("KillCount"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorExtraRewardSelect.java b/src/generated/main/emu/nebula/proto/VampireSurvivorExtraRewardSelect.java new file mode 100644 index 0000000..54c652a --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorExtraRewardSelect.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class VampireSurvivorExtraRewardSelect { +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorQuestRewardReceive.java b/src/generated/main/emu/nebula/proto/VampireSurvivorQuestRewardReceive.java new file mode 100644 index 0000000..3021b2d --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorQuestRewardReceive.java @@ -0,0 +1,510 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; + +public final class VampireSurvivorQuestRewardReceive { + /** + * Protobuf type {@code VampireSurvivorQuestRewardReceiveReq} + */ + public static final class VampireSurvivorQuestRewardReceiveReq extends ProtoMessage<VampireSurvivorQuestRewardReceiveReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 QuestType = 1;</code> + */ + private int questType; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 QuestIds = 2;</code> + */ + private final RepeatedInt questIds = RepeatedInt.newEmptyInstance(); + + private VampireSurvivorQuestRewardReceiveReq() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorQuestRewardReceiveReq} + */ + public static VampireSurvivorQuestRewardReceiveReq newInstance() { + return new VampireSurvivorQuestRewardReceiveReq(); + } + + /** + * <code>optional uint32 QuestType = 1;</code> + * @return whether the questType field is set + */ + public boolean hasQuestType() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 QuestType = 1;</code> + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq clearQuestType() { + bitField0_ &= ~0x00000001; + questType = 0; + return this; + } + + /** + * <code>optional uint32 QuestType = 1;</code> + * @return the questType + */ + public int getQuestType() { + return questType; + } + + /** + * <code>optional uint32 QuestType = 1;</code> + * @param value the questType to set + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq setQuestType(final int value) { + bitField0_ |= 0x00000001; + questType = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq clearNextPackage() { + bitField0_ &= ~0x00000002; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000002; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq addNextPackage(final byte value) { + bitField0_ |= 0x00000002; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000002; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 QuestIds = 2;</code> + * @return whether the questIds field is set + */ + public boolean hasQuestIds() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated uint32 QuestIds = 2;</code> + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq clearQuestIds() { + bitField0_ &= ~0x00000004; + questIds.clear(); + return this; + } + + /** + * <code>repeated uint32 QuestIds = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQuestIds()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getQuestIds() { + return questIds; + } + + /** + * <code>repeated uint32 QuestIds = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableQuestIds() { + bitField0_ |= 0x00000004; + return questIds; + } + + /** + * <code>repeated uint32 QuestIds = 2;</code> + * @param value the questIds to add + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq addQuestIds(final int value) { + bitField0_ |= 0x00000004; + questIds.add(value); + return this; + } + + /** + * <code>repeated uint32 QuestIds = 2;</code> + * @param values the questIds to add + * @return this + */ + public VampireSurvivorQuestRewardReceiveReq addAllQuestIds(final int... values) { + bitField0_ |= 0x00000004; + questIds.addAll(values); + return this; + } + + @Override + public VampireSurvivorQuestRewardReceiveReq copyFrom( + final VampireSurvivorQuestRewardReceiveReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + questType = other.questType; + nextPackage.copyFrom(other.nextPackage); + questIds.copyFrom(other.questIds); + } + return this; + } + + @Override + public VampireSurvivorQuestRewardReceiveReq mergeFrom( + final VampireSurvivorQuestRewardReceiveReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQuestType()) { + setQuestType(other.questType); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasQuestIds()) { + getMutableQuestIds().addAll(other.questIds); + } + return this; + } + + @Override + public VampireSurvivorQuestRewardReceiveReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + questType = 0; + nextPackage.clear(); + questIds.clear(); + return this; + } + + @Override + public VampireSurvivorQuestRewardReceiveReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + questIds.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorQuestRewardReceiveReq)) { + return false; + } + VampireSurvivorQuestRewardReceiveReq other = (VampireSurvivorQuestRewardReceiveReq) o; + return bitField0_ == other.bitField0_ + && (!hasQuestType() || questType == other.questType) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasQuestIds() || questIds.equals(other.questIds)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(questType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < questIds.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(questIds.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(questType); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * questIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(questIds); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorQuestRewardReceiveReq mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // questType + questType = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // questIds [packed=true] + input.readPackedUInt32(questIds, tag); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 16: { + // questIds [packed=false] + tag = input.readRepeatedUInt32(questIds, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.questType, questType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedUInt32(FieldNames.questIds, questIds); + } + output.endObject(); + } + + @Override + public VampireSurvivorQuestRewardReceiveReq mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 221117212: { + if (input.isAtField(FieldNames.questType)) { + if (!input.trySkipNullValue()) { + questType = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1101257066: { + if (input.isAtField(FieldNames.questIds)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(questIds); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorQuestRewardReceiveReq clone() { + return new VampireSurvivorQuestRewardReceiveReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorQuestRewardReceiveReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorQuestRewardReceiveReq(), data).checkInitialized(); + } + + public static VampireSurvivorQuestRewardReceiveReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorQuestRewardReceiveReq(), input).checkInitialized(); + } + + public static VampireSurvivorQuestRewardReceiveReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorQuestRewardReceiveReq(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorQuestRewardReceiveReq messages + */ + public static MessageFactory<VampireSurvivorQuestRewardReceiveReq> getFactory() { + return VampireSurvivorQuestRewardReceiveReqFactory.INSTANCE; + } + + private enum VampireSurvivorQuestRewardReceiveReqFactory implements MessageFactory<VampireSurvivorQuestRewardReceiveReq> { + INSTANCE; + + @Override + public VampireSurvivorQuestRewardReceiveReq create() { + return VampireSurvivorQuestRewardReceiveReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName questType = FieldName.forField("QuestType"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName questIds = FieldName.forField("QuestIds"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorRestart.java b/src/generated/main/emu/nebula/proto/VampireSurvivorRestart.java new file mode 100644 index 0000000..d46f608 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorRestart.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class VampireSurvivorRestart { +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorRewardChest.java b/src/generated/main/emu/nebula/proto/VampireSurvivorRewardChest.java new file mode 100644 index 0000000..5b299e4 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorRewardChest.java @@ -0,0 +1,982 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class VampireSurvivorRewardChest { + /** + * Protobuf type {@code VampireSurvivorRewardChestReq} + */ + public static final class VampireSurvivorRewardChestReq extends ProtoMessage<VampireSurvivorRewardChestReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 EventType = 1;</code> + */ + private int eventType; + + /** + * <code>optional uint32 Number = 2;</code> + */ + private int number; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private VampireSurvivorRewardChestReq() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorRewardChestReq} + */ + public static VampireSurvivorRewardChestReq newInstance() { + return new VampireSurvivorRewardChestReq(); + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @return whether the eventType field is set + */ + public boolean hasEventType() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @return this + */ + public VampireSurvivorRewardChestReq clearEventType() { + bitField0_ &= ~0x00000001; + eventType = 0; + return this; + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @return the eventType + */ + public int getEventType() { + return eventType; + } + + /** + * <code>optional uint32 EventType = 1;</code> + * @param value the eventType to set + * @return this + */ + public VampireSurvivorRewardChestReq setEventType(final int value) { + bitField0_ |= 0x00000001; + eventType = value; + return this; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return whether the number field is set + */ + public boolean hasNumber() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return this + */ + public VampireSurvivorRewardChestReq clearNumber() { + bitField0_ &= ~0x00000002; + number = 0; + return this; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @return the number + */ + public int getNumber() { + return number; + } + + /** + * <code>optional uint32 Number = 2;</code> + * @param value the number to set + * @return this + */ + public VampireSurvivorRewardChestReq setNumber(final int value) { + bitField0_ |= 0x00000002; + number = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorRewardChestReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorRewardChestReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorRewardChestReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorRewardChestReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public VampireSurvivorRewardChestReq copyFrom(final VampireSurvivorRewardChestReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + eventType = other.eventType; + number = other.number; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorRewardChestReq mergeFrom(final VampireSurvivorRewardChestReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasEventType()) { + setEventType(other.eventType); + } + if (other.hasNumber()) { + setNumber(other.number); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorRewardChestReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + eventType = 0; + number = 0; + nextPackage.clear(); + return this; + } + + @Override + public VampireSurvivorRewardChestReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorRewardChestReq)) { + return false; + } + VampireSurvivorRewardChestReq other = (VampireSurvivorRewardChestReq) o; + return bitField0_ == other.bitField0_ + && (!hasEventType() || eventType == other.eventType) + && (!hasNumber() || number == other.number) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(eventType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(number); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(eventType); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(number); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorRewardChestReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // eventType + eventType = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // number + number = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.eventType, eventType); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.number, number); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public VampireSurvivorRewardChestReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2035398868: { + if (input.isAtField(FieldNames.eventType)) { + if (!input.trySkipNullValue()) { + eventType = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1950496919: { + if (input.isAtField(FieldNames.number)) { + if (!input.trySkipNullValue()) { + number = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorRewardChestReq clone() { + return new VampireSurvivorRewardChestReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorRewardChestReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardChestReq(), data).checkInitialized(); + } + + public static VampireSurvivorRewardChestReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardChestReq(), input).checkInitialized(); + } + + public static VampireSurvivorRewardChestReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardChestReq(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorRewardChestReq messages + */ + public static MessageFactory<VampireSurvivorRewardChestReq> getFactory() { + return VampireSurvivorRewardChestReqFactory.INSTANCE; + } + + private enum VampireSurvivorRewardChestReqFactory implements MessageFactory<VampireSurvivorRewardChestReq> { + INSTANCE; + + @Override + public VampireSurvivorRewardChestReq create() { + return VampireSurvivorRewardChestReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName eventType = FieldName.forField("EventType"); + + static final FieldName number = FieldName.forField("Number"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code VampireSurvivorRewardChestResp} + */ + public static final class VampireSurvivorRewardChestResp extends ProtoMessage<VampireSurvivorRewardChestResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .CardInfo ChestCards = 1;</code> + */ + private final RepeatedMessage<Public.CardInfo> chestCards = RepeatedMessage.newEmptyInstance(Public.CardInfo.getFactory()); + + /** + * <code>repeated .CardInfo ExtraCards = 2;</code> + */ + private final RepeatedMessage<Public.CardInfo> extraCards = RepeatedMessage.newEmptyInstance(Public.CardInfo.getFactory()); + + private VampireSurvivorRewardChestResp() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorRewardChestResp} + */ + public static VampireSurvivorRewardChestResp newInstance() { + return new VampireSurvivorRewardChestResp(); + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorRewardChestResp clearNextPackage() { + bitField0_ &= ~0x00000001; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000001; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorRewardChestResp addNextPackage(final byte value) { + bitField0_ |= 0x00000001; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorRewardChestResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorRewardChestResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000001; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .CardInfo ChestCards = 1;</code> + * @return whether the chestCards field is set + */ + public boolean hasChestCards() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>repeated .CardInfo ChestCards = 1;</code> + * @return this + */ + public VampireSurvivorRewardChestResp clearChestCards() { + bitField0_ &= ~0x00000002; + chestCards.clear(); + return this; + } + + /** + * <code>repeated .CardInfo ChestCards = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChestCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.CardInfo> getChestCards() { + return chestCards; + } + + /** + * <code>repeated .CardInfo ChestCards = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.CardInfo> getMutableChestCards() { + bitField0_ |= 0x00000002; + return chestCards; + } + + /** + * <code>repeated .CardInfo ChestCards = 1;</code> + * @param value the chestCards to add + * @return this + */ + public VampireSurvivorRewardChestResp addChestCards(final Public.CardInfo value) { + bitField0_ |= 0x00000002; + chestCards.add(value); + return this; + } + + /** + * <code>repeated .CardInfo ChestCards = 1;</code> + * @param values the chestCards to add + * @return this + */ + public VampireSurvivorRewardChestResp addAllChestCards(final Public.CardInfo... values) { + bitField0_ |= 0x00000002; + chestCards.addAll(values); + return this; + } + + /** + * <code>repeated .CardInfo ExtraCards = 2;</code> + * @return whether the extraCards field is set + */ + public boolean hasExtraCards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .CardInfo ExtraCards = 2;</code> + * @return this + */ + public VampireSurvivorRewardChestResp clearExtraCards() { + bitField0_ &= ~0x00000004; + extraCards.clear(); + return this; + } + + /** + * <code>repeated .CardInfo ExtraCards = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableExtraCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.CardInfo> getExtraCards() { + return extraCards; + } + + /** + * <code>repeated .CardInfo ExtraCards = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.CardInfo> getMutableExtraCards() { + bitField0_ |= 0x00000004; + return extraCards; + } + + /** + * <code>repeated .CardInfo ExtraCards = 2;</code> + * @param value the extraCards to add + * @return this + */ + public VampireSurvivorRewardChestResp addExtraCards(final Public.CardInfo value) { + bitField0_ |= 0x00000004; + extraCards.add(value); + return this; + } + + /** + * <code>repeated .CardInfo ExtraCards = 2;</code> + * @param values the extraCards to add + * @return this + */ + public VampireSurvivorRewardChestResp addAllExtraCards(final Public.CardInfo... values) { + bitField0_ |= 0x00000004; + extraCards.addAll(values); + return this; + } + + @Override + public VampireSurvivorRewardChestResp copyFrom(final VampireSurvivorRewardChestResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nextPackage.copyFrom(other.nextPackage); + chestCards.copyFrom(other.chestCards); + extraCards.copyFrom(other.extraCards); + } + return this; + } + + @Override + public VampireSurvivorRewardChestResp mergeFrom(final VampireSurvivorRewardChestResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasChestCards()) { + getMutableChestCards().addAll(other.chestCards); + } + if (other.hasExtraCards()) { + getMutableExtraCards().addAll(other.extraCards); + } + return this; + } + + @Override + public VampireSurvivorRewardChestResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chestCards.clear(); + extraCards.clear(); + return this; + } + + @Override + public VampireSurvivorRewardChestResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + chestCards.clearQuick(); + extraCards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorRewardChestResp)) { + return false; + } + VampireSurvivorRewardChestResp other = (VampireSurvivorRewardChestResp) o; + return bitField0_ == other.bitField0_ + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasChestCards() || chestCards.equals(other.chestCards)) + && (!hasExtraCards() || extraCards.equals(other.extraCards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < chestCards.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(chestCards.get(i)); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < extraCards.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(extraCards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 * chestCards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(chestCards); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * extraCards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(extraCards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorRewardChestResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // chestCards + tag = input.readRepeatedMessage(chestCards, tag); + bitField0_ |= 0x00000002; + if (tag != 18) { + break; + } + } + case 18: { + // extraCards + tag = input.readRepeatedMessage(extraCards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedMessage(FieldNames.chestCards, chestCards); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.extraCards, extraCards); + } + output.endObject(); + } + + @Override + public VampireSurvivorRewardChestResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1273420542: { + if (input.isAtField(FieldNames.chestCards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(chestCards); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1580054189: { + if (input.isAtField(FieldNames.extraCards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(extraCards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorRewardChestResp clone() { + return new VampireSurvivorRewardChestResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorRewardChestResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardChestResp(), data).checkInitialized(); + } + + public static VampireSurvivorRewardChestResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardChestResp(), input).checkInitialized(); + } + + public static VampireSurvivorRewardChestResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardChestResp(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorRewardChestResp messages + */ + public static MessageFactory<VampireSurvivorRewardChestResp> getFactory() { + return VampireSurvivorRewardChestRespFactory.INSTANCE; + } + + private enum VampireSurvivorRewardChestRespFactory implements MessageFactory<VampireSurvivorRewardChestResp> { + INSTANCE; + + @Override + public VampireSurvivorRewardChestResp create() { + return VampireSurvivorRewardChestResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName chestCards = FieldName.forField("ChestCards"); + + static final FieldName extraCards = FieldName.forField("ExtraCards"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorRewardSelect.java b/src/generated/main/emu/nebula/proto/VampireSurvivorRewardSelect.java new file mode 100644 index 0000000..38e375c --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorRewardSelect.java @@ -0,0 +1,1417 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class VampireSurvivorRewardSelect { + /** + * Protobuf type {@code VampireSurvivorRewardSelectReq} + */ + public static final class VampireSurvivorRewardSelectReq extends ProtoMessage<VampireSurvivorRewardSelectReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Index = 1;</code> + */ + private int index; + + /** + * <code>optional bool ReRoll = 2;</code> + */ + private boolean reRoll; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private VampireSurvivorRewardSelectReq() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorRewardSelectReq} + */ + public static VampireSurvivorRewardSelectReq newInstance() { + return new VampireSurvivorRewardSelectReq(); + } + + /** + * <code>optional uint32 Index = 1;</code> + * @return whether the index field is set + */ + public boolean hasIndex() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Index = 1;</code> + * @return this + */ + public VampireSurvivorRewardSelectReq clearIndex() { + bitField0_ &= ~0x00000001; + index = 0; + return this; + } + + /** + * <code>optional uint32 Index = 1;</code> + * @return the index + */ + public int getIndex() { + return index; + } + + /** + * <code>optional uint32 Index = 1;</code> + * @param value the index to set + * @return this + */ + public VampireSurvivorRewardSelectReq setIndex(final int value) { + bitField0_ |= 0x00000001; + index = value; + return this; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return whether the reRoll field is set + */ + public boolean hasReRoll() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return this + */ + public VampireSurvivorRewardSelectReq clearReRoll() { + bitField0_ &= ~0x00000002; + reRoll = false; + return this; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @return the reRoll + */ + public boolean getReRoll() { + return reRoll; + } + + /** + * <code>optional bool ReRoll = 2;</code> + * @param value the reRoll to set + * @return this + */ + public VampireSurvivorRewardSelectReq setReRoll(final boolean value) { + bitField0_ |= 0x00000002; + reRoll = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorRewardSelectReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorRewardSelectReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorRewardSelectReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorRewardSelectReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public VampireSurvivorRewardSelectReq copyFrom(final VampireSurvivorRewardSelectReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + index = other.index; + reRoll = other.reRoll; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorRewardSelectReq mergeFrom(final VampireSurvivorRewardSelectReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasIndex()) { + setIndex(other.index); + } + if (other.hasReRoll()) { + setReRoll(other.reRoll); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorRewardSelectReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + index = 0; + reRoll = false; + nextPackage.clear(); + return this; + } + + @Override + public VampireSurvivorRewardSelectReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorRewardSelectReq)) { + return false; + } + VampireSurvivorRewardSelectReq other = (VampireSurvivorRewardSelectReq) o; + return bitField0_ == other.bitField0_ + && (!hasIndex() || index == other.index) + && (!hasReRoll() || reRoll == other.reRoll) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeBoolNoTag(reRoll); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(index); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorRewardSelectReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // index + index = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // reRoll + reRoll = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.index, index); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.reRoll, reRoll); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public VampireSurvivorRewardSelectReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 70793394: { + if (input.isAtField(FieldNames.index)) { + if (!input.trySkipNullValue()) { + index = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1851548304: { + if (input.isAtField(FieldNames.reRoll)) { + if (!input.trySkipNullValue()) { + reRoll = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorRewardSelectReq clone() { + return new VampireSurvivorRewardSelectReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorRewardSelectReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardSelectReq(), data).checkInitialized(); + } + + public static VampireSurvivorRewardSelectReq parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardSelectReq(), input).checkInitialized(); + } + + public static VampireSurvivorRewardSelectReq parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardSelectReq(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorRewardSelectReq messages + */ + public static MessageFactory<VampireSurvivorRewardSelectReq> getFactory() { + return VampireSurvivorRewardSelectReqFactory.INSTANCE; + } + + private enum VampireSurvivorRewardSelectReqFactory implements MessageFactory<VampireSurvivorRewardSelectReq> { + INSTANCE; + + @Override + public VampireSurvivorRewardSelectReq create() { + return VampireSurvivorRewardSelectReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName index = FieldName.forField("Index"); + + static final FieldName reRoll = FieldName.forField("ReRoll"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code VampireSurvivorRewardSelectResp} + */ + public static final class VampireSurvivorRewardSelectResp extends ProtoMessage<VampireSurvivorRewardSelectResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .VampireSurvivorRewardSelectResp.Success Resp = 1;</code> + */ + private final Success resp = Success.newInstance(); + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + */ + private final Public.VampireSurvivorFateCardSelect pkg = Public.VampireSurvivorFateCardSelect.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private VampireSurvivorRewardSelectResp() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorRewardSelectResp} + */ + public static VampireSurvivorRewardSelectResp newInstance() { + return new VampireSurvivorRewardSelectResp(); + } + + /** + * <code>optional .VampireSurvivorRewardSelectResp.Success Resp = 1;</code> + * @return whether the resp field is set + */ + public boolean hasResp() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .VampireSurvivorRewardSelectResp.Success Resp = 1;</code> + * @return this + */ + public VampireSurvivorRewardSelectResp clearResp() { + bitField0_ &= ~0x00000001; + resp.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorRewardSelectResp.Success Resp = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableResp()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Success getResp() { + return resp; + } + + /** + * <code>optional .VampireSurvivorRewardSelectResp.Success Resp = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Success getMutableResp() { + bitField0_ |= 0x00000001; + return resp; + } + + /** + * <code>optional .VampireSurvivorRewardSelectResp.Success Resp = 1;</code> + * @param value the resp to set + * @return this + */ + public VampireSurvivorRewardSelectResp setResp(final Success value) { + bitField0_ |= 0x00000001; + resp.copyFrom(value); + return this; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * @return whether the pkg field is set + */ + public boolean hasPkg() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * @return this + */ + public VampireSurvivorRewardSelectResp clearPkg() { + bitField0_ &= ~0x00000002; + pkg.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePkg()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.VampireSurvivorFateCardSelect getPkg() { + return pkg; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.VampireSurvivorFateCardSelect getMutablePkg() { + bitField0_ |= 0x00000002; + return pkg; + } + + /** + * <code>optional .VampireSurvivorFateCardSelect Pkg = 2;</code> + * @param value the pkg to set + * @return this + */ + public VampireSurvivorRewardSelectResp setPkg( + final Public.VampireSurvivorFateCardSelect value) { + bitField0_ |= 0x00000002; + pkg.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorRewardSelectResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorRewardSelectResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorRewardSelectResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorRewardSelectResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public VampireSurvivorRewardSelectResp copyFrom(final VampireSurvivorRewardSelectResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + resp.copyFrom(other.resp); + pkg.copyFrom(other.pkg); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorRewardSelectResp mergeFrom(final VampireSurvivorRewardSelectResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasResp()) { + getMutableResp().mergeFrom(other.resp); + } + if (other.hasPkg()) { + getMutablePkg().mergeFrom(other.pkg); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorRewardSelectResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + resp.clear(); + pkg.clear(); + nextPackage.clear(); + return this; + } + + @Override + public VampireSurvivorRewardSelectResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + resp.clearQuick(); + pkg.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorRewardSelectResp)) { + return false; + } + VampireSurvivorRewardSelectResp other = (VampireSurvivorRewardSelectResp) o; + return bitField0_ == other.bitField0_ + && (!hasResp() || resp.equals(other.resp)) + && (!hasPkg() || pkg.equals(other.pkg)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(resp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(pkg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(resp); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(pkg); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorRewardSelectResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // resp + input.readMessage(resp); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // pkg + input.readMessage(pkg); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.resp, resp); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.pkg, pkg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public VampireSurvivorRewardSelectResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2543600: { + if (input.isAtField(FieldNames.resp)) { + if (!input.trySkipNullValue()) { + input.readMessage(resp); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 80300: { + if (input.isAtField(FieldNames.pkg)) { + if (!input.trySkipNullValue()) { + input.readMessage(pkg); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorRewardSelectResp clone() { + return new VampireSurvivorRewardSelectResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorRewardSelectResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardSelectResp(), data).checkInitialized(); + } + + public static VampireSurvivorRewardSelectResp parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardSelectResp(), input).checkInitialized(); + } + + public static VampireSurvivorRewardSelectResp parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorRewardSelectResp(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorRewardSelectResp messages + */ + public static MessageFactory<VampireSurvivorRewardSelectResp> getFactory() { + return VampireSurvivorRewardSelectRespFactory.INSTANCE; + } + + /** + * Protobuf type {@code Success} + */ + public static final class Success extends ProtoMessage<Success> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 FateCardId = 1;</code> + */ + private int fateCardId; + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 2;</code> + */ + private final Public.VampireSurvivorLevelReward reward = Public.VampireSurvivorLevelReward.newInstance(); + + /** + * <code>repeated .CardInfo ExtraCards = 3;</code> + */ + private final RepeatedMessage<Public.CardInfo> extraCards = RepeatedMessage.newEmptyInstance(Public.CardInfo.getFactory()); + + private Success() { + } + + /** + * @return a new empty instance of {@code Success} + */ + public static Success newInstance() { + return new Success(); + } + + /** + * <code>optional uint32 FateCardId = 1;</code> + * @return whether the fateCardId field is set + */ + public boolean hasFateCardId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 FateCardId = 1;</code> + * @return this + */ + public Success clearFateCardId() { + bitField0_ &= ~0x00000001; + fateCardId = 0; + return this; + } + + /** + * <code>optional uint32 FateCardId = 1;</code> + * @return the fateCardId + */ + public int getFateCardId() { + return fateCardId; + } + + /** + * <code>optional uint32 FateCardId = 1;</code> + * @param value the fateCardId to set + * @return this + */ + public Success setFateCardId(final int value) { + bitField0_ |= 0x00000001; + fateCardId = value; + return this; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 2;</code> + * @return whether the reward field is set + */ + public boolean hasReward() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 2;</code> + * @return this + */ + public Success clearReward() { + bitField0_ &= ~0x00000002; + reward.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableReward()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.VampireSurvivorLevelReward getReward() { + return reward; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.VampireSurvivorLevelReward getMutableReward() { + bitField0_ |= 0x00000002; + return reward; + } + + /** + * <code>optional .VampireSurvivorLevelReward Reward = 2;</code> + * @param value the reward to set + * @return this + */ + public Success setReward(final Public.VampireSurvivorLevelReward value) { + bitField0_ |= 0x00000002; + reward.copyFrom(value); + return this; + } + + /** + * <code>repeated .CardInfo ExtraCards = 3;</code> + * @return whether the extraCards field is set + */ + public boolean hasExtraCards() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .CardInfo ExtraCards = 3;</code> + * @return this + */ + public Success clearExtraCards() { + bitField0_ &= ~0x00000004; + extraCards.clear(); + return this; + } + + /** + * <code>repeated .CardInfo ExtraCards = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableExtraCards()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.CardInfo> getExtraCards() { + return extraCards; + } + + /** + * <code>repeated .CardInfo ExtraCards = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.CardInfo> getMutableExtraCards() { + bitField0_ |= 0x00000004; + return extraCards; + } + + /** + * <code>repeated .CardInfo ExtraCards = 3;</code> + * @param value the extraCards to add + * @return this + */ + public Success addExtraCards(final Public.CardInfo value) { + bitField0_ |= 0x00000004; + extraCards.add(value); + return this; + } + + /** + * <code>repeated .CardInfo ExtraCards = 3;</code> + * @param values the extraCards to add + * @return this + */ + public Success addAllExtraCards(final Public.CardInfo... values) { + bitField0_ |= 0x00000004; + extraCards.addAll(values); + return this; + } + + @Override + public Success copyFrom(final Success other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + fateCardId = other.fateCardId; + reward.copyFrom(other.reward); + extraCards.copyFrom(other.extraCards); + } + return this; + } + + @Override + public Success mergeFrom(final Success other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFateCardId()) { + setFateCardId(other.fateCardId); + } + if (other.hasReward()) { + getMutableReward().mergeFrom(other.reward); + } + if (other.hasExtraCards()) { + getMutableExtraCards().addAll(other.extraCards); + } + return this; + } + + @Override + public Success clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + fateCardId = 0; + reward.clear(); + extraCards.clear(); + return this; + } + + @Override + public Success clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + reward.clearQuick(); + extraCards.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof Success)) { + return false; + } + Success other = (Success) o; + return bitField0_ == other.bitField0_ + && (!hasFateCardId() || fateCardId == other.fateCardId) + && (!hasReward() || reward.equals(other.reward)) + && (!hasExtraCards() || extraCards.equals(other.extraCards)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(fateCardId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(reward); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < extraCards.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(extraCards.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(fateCardId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(reward); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * extraCards.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(extraCards); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public Success mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // fateCardId + fateCardId = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // reward + input.readMessage(reward); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // extraCards + tag = input.readRepeatedMessage(extraCards, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.fateCardId, fateCardId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.reward, reward); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.extraCards, extraCards); + } + output.endObject(); + } + + @Override + public Success mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1656856567: { + if (input.isAtField(FieldNames.fateCardId)) { + if (!input.trySkipNullValue()) { + fateCardId = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1850459313: { + if (input.isAtField(FieldNames.reward)) { + if (!input.trySkipNullValue()) { + input.readMessage(reward); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1580054189: { + if (input.isAtField(FieldNames.extraCards)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(extraCards); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public Success clone() { + return new Success().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static Success parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new Success(), data).checkInitialized(); + } + + public static Success parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new Success(), input).checkInitialized(); + } + + public static Success parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new Success(), input).checkInitialized(); + } + + /** + * @return factory for creating Success messages + */ + public static MessageFactory<Success> getFactory() { + return SuccessFactory.INSTANCE; + } + + private enum SuccessFactory implements MessageFactory<Success> { + INSTANCE; + + @Override + public Success create() { + return Success.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName fateCardId = FieldName.forField("FateCardId"); + + static final FieldName reward = FieldName.forField("Reward"); + + static final FieldName extraCards = FieldName.forField("ExtraCards"); + } + } + + private enum VampireSurvivorRewardSelectRespFactory implements MessageFactory<VampireSurvivorRewardSelectResp> { + INSTANCE; + + @Override + public VampireSurvivorRewardSelectResp create() { + return VampireSurvivorRewardSelectResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName resp = FieldName.forField("Resp"); + + static final FieldName pkg = FieldName.forField("Pkg"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/VampireSurvivorSettle.java b/src/generated/main/emu/nebula/proto/VampireSurvivorSettle.java new file mode 100644 index 0000000..8b05c30 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireSurvivorSettle.java @@ -0,0 +1,2625 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedInt; +import us.hebi.quickbuf.RepeatedMessage; + +public final class VampireSurvivorSettle { + /** + * Protobuf type {@code VampireSurvivorSettleReq} + */ + public static final class VampireSurvivorSettleReq extends ProtoMessage<VampireSurvivorSettleReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Time = 2;</code> + */ + private int time; + + /** + * <code>optional bool Defeat = 3;</code> + */ + private boolean defeat; + + /** + * <code>optional .Events Events = 7;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 KillCount = 1;</code> + */ + private final RepeatedInt killCount = RepeatedInt.newEmptyInstance(); + + private VampireSurvivorSettleReq() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorSettleReq} + */ + public static VampireSurvivorSettleReq newInstance() { + return new VampireSurvivorSettleReq(); + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return this + */ + public VampireSurvivorSettleReq clearTime() { + bitField0_ &= ~0x00000001; + time = 0; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return the time + */ + public int getTime() { + return time; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @param value the time to set + * @return this + */ + public VampireSurvivorSettleReq setTime(final int value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * <code>optional bool Defeat = 3;</code> + * @return whether the defeat field is set + */ + public boolean hasDefeat() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Defeat = 3;</code> + * @return this + */ + public VampireSurvivorSettleReq clearDefeat() { + bitField0_ &= ~0x00000002; + defeat = false; + return this; + } + + /** + * <code>optional bool Defeat = 3;</code> + * @return the defeat + */ + public boolean getDefeat() { + return defeat; + } + + /** + * <code>optional bool Defeat = 3;</code> + * @param value the defeat to set + * @return this + */ + public VampireSurvivorSettleReq setDefeat(final boolean value) { + bitField0_ |= 0x00000002; + defeat = value; + return this; + } + + /** + * <code>optional .Events Events = 7;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .Events Events = 7;</code> + * @return this + */ + public VampireSurvivorSettleReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 7;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 7;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * <code>optional .Events Events = 7;</code> + * @param value the events to set + * @return this + */ + public VampireSurvivorSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorSettleReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @return whether the killCount field is set + */ + public boolean hasKillCount() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @return this + */ + public VampireSurvivorSettleReq clearKillCount() { + bitField0_ &= ~0x00000010; + killCount.clear(); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableKillCount()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getKillCount() { + return killCount; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableKillCount() { + bitField0_ |= 0x00000010; + return killCount; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @param value the killCount to add + * @return this + */ + public VampireSurvivorSettleReq addKillCount(final int value) { + bitField0_ |= 0x00000010; + killCount.add(value); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @param values the killCount to add + * @return this + */ + public VampireSurvivorSettleReq addAllKillCount(final int... values) { + bitField0_ |= 0x00000010; + killCount.addAll(values); + return this; + } + + @Override + public VampireSurvivorSettleReq copyFrom(final VampireSurvivorSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + defeat = other.defeat; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + killCount.copyFrom(other.killCount); + } + return this; + } + + @Override + public VampireSurvivorSettleReq mergeFrom(final VampireSurvivorSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasDefeat()) { + setDefeat(other.defeat); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasKillCount()) { + getMutableKillCount().addAll(other.killCount); + } + return this; + } + + @Override + public VampireSurvivorSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0; + defeat = false; + events.clear(); + nextPackage.clear(); + killCount.clear(); + return this; + } + + @Override + public VampireSurvivorSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + killCount.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorSettleReq)) { + return false; + } + VampireSurvivorSettleReq other = (VampireSurvivorSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || time == other.time) + && (!hasDefeat() || defeat == other.defeat) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasKillCount() || killCount.equals(other.killCount)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeBoolNoTag(defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < killCount.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(killCount.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * killCount.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(killCount); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // defeat + defeat = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // killCount [packed=true] + input.readPackedUInt32(killCount, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // killCount [packed=false] + tag = input.readRepeatedUInt32(killCount, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.defeat, defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.killCount, killCount); + } + output.endObject(); + } + + @Override + public VampireSurvivorSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2043196755: { + if (input.isAtField(FieldNames.defeat)) { + if (!input.trySkipNullValue()) { + defeat = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 414756913: { + if (input.isAtField(FieldNames.killCount)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(killCount); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorSettleReq clone() { + return new VampireSurvivorSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorSettleReq(), data).checkInitialized(); + } + + public static VampireSurvivorSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorSettleReq(), input).checkInitialized(); + } + + public static VampireSurvivorSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorSettleReq messages + */ + public static MessageFactory<VampireSurvivorSettleReq> getFactory() { + return VampireSurvivorSettleReqFactory.INSTANCE; + } + + private enum VampireSurvivorSettleReqFactory implements MessageFactory<VampireSurvivorSettleReq> { + INSTANCE; + + @Override + public VampireSurvivorSettleReq create() { + return VampireSurvivorSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("Time"); + + static final FieldName defeat = FieldName.forField("Defeat"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName killCount = FieldName.forField("KillCount"); + } + } + + /** + * Protobuf type {@code VampireSurvivorSettleResp} + */ + public static final class VampireSurvivorSettleResp extends ProtoMessage<VampireSurvivorSettleResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional .VampireSurvivorSettleResp.VictoryData Victory = 1;</code> + */ + private final VictoryData victory = VictoryData.newInstance(); + + /** + * <code>optional .VampireSurvivorSettleResp.DefeatData Defeat = 2;</code> + */ + private final DefeatData defeat = DefeatData.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private VampireSurvivorSettleResp() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorSettleResp} + */ + public static VampireSurvivorSettleResp newInstance() { + return new VampireSurvivorSettleResp(); + } + + /** + * <code>optional .VampireSurvivorSettleResp.VictoryData Victory = 1;</code> + * @return whether the victory field is set + */ + public boolean hasVictory() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional .VampireSurvivorSettleResp.VictoryData Victory = 1;</code> + * @return this + */ + public VampireSurvivorSettleResp clearVictory() { + bitField0_ &= ~0x00000001; + victory.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorSettleResp.VictoryData Victory = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableVictory()} if you want to modify it. + * + * @return internal storage object for reading + */ + public VictoryData getVictory() { + return victory; + } + + /** + * <code>optional .VampireSurvivorSettleResp.VictoryData Victory = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public VictoryData getMutableVictory() { + bitField0_ |= 0x00000001; + return victory; + } + + /** + * <code>optional .VampireSurvivorSettleResp.VictoryData Victory = 1;</code> + * @param value the victory to set + * @return this + */ + public VampireSurvivorSettleResp setVictory(final VictoryData value) { + bitField0_ |= 0x00000001; + victory.copyFrom(value); + return this; + } + + /** + * <code>optional .VampireSurvivorSettleResp.DefeatData Defeat = 2;</code> + * @return whether the defeat field is set + */ + public boolean hasDefeat() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .VampireSurvivorSettleResp.DefeatData Defeat = 2;</code> + * @return this + */ + public VampireSurvivorSettleResp clearDefeat() { + bitField0_ &= ~0x00000002; + defeat.clear(); + return this; + } + + /** + * <code>optional .VampireSurvivorSettleResp.DefeatData Defeat = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableDefeat()} if you want to modify it. + * + * @return internal storage object for reading + */ + public DefeatData getDefeat() { + return defeat; + } + + /** + * <code>optional .VampireSurvivorSettleResp.DefeatData Defeat = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public DefeatData getMutableDefeat() { + bitField0_ |= 0x00000002; + return defeat; + } + + /** + * <code>optional .VampireSurvivorSettleResp.DefeatData Defeat = 2;</code> + * @param value the defeat to set + * @return this + */ + public VampireSurvivorSettleResp setDefeat(final DefeatData value) { + bitField0_ |= 0x00000002; + defeat.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorSettleResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public VampireSurvivorSettleResp copyFrom(final VampireSurvivorSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + victory.copyFrom(other.victory); + defeat.copyFrom(other.defeat); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorSettleResp mergeFrom(final VampireSurvivorSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasVictory()) { + getMutableVictory().mergeFrom(other.victory); + } + if (other.hasDefeat()) { + getMutableDefeat().mergeFrom(other.defeat); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireSurvivorSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + victory.clear(); + defeat.clear(); + nextPackage.clear(); + return this; + } + + @Override + public VampireSurvivorSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + victory.clearQuick(); + defeat.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorSettleResp)) { + return false; + } + VampireSurvivorSettleResp other = (VampireSurvivorSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasVictory() || victory.equals(other.victory)) + && (!hasDefeat() || defeat.equals(other.defeat)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(victory); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(victory); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // victory + input.readMessage(victory); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // defeat + input.readMessage(defeat); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.victory, victory); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.defeat, defeat); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public VampireSurvivorSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2116960754: { + if (input.isAtField(FieldNames.victory)) { + if (!input.trySkipNullValue()) { + input.readMessage(victory); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2043196755: { + if (input.isAtField(FieldNames.defeat)) { + if (!input.trySkipNullValue()) { + input.readMessage(defeat); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorSettleResp clone() { + return new VampireSurvivorSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorSettleResp(), data).checkInitialized(); + } + + public static VampireSurvivorSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorSettleResp(), input).checkInitialized(); + } + + public static VampireSurvivorSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorSettleResp messages + */ + public static MessageFactory<VampireSurvivorSettleResp> getFactory() { + return VampireSurvivorSettleRespFactory.INSTANCE; + } + + /** + * Protobuf type {@code VictoryData} + */ + public static final class VictoryData extends ProtoMessage<VictoryData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 FinalScore = 2;</code> + */ + private int finalScore; + + /** + * <code>optional uint32 SeasonId = 3;</code> + */ + private int seasonId; + + /** + * <code>repeated .VampireSurvivorAreaInfo Infos = 1;</code> + */ + private final RepeatedMessage<VampireSurvivorAreaInfo> infos = RepeatedMessage.newEmptyInstance(VampireSurvivorAreaInfo.getFactory()); + + private VictoryData() { + } + + /** + * @return a new empty instance of {@code VictoryData} + */ + public static VictoryData newInstance() { + return new VictoryData(); + } + + /** + * <code>optional uint32 FinalScore = 2;</code> + * @return whether the finalScore field is set + */ + public boolean hasFinalScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 FinalScore = 2;</code> + * @return this + */ + public VictoryData clearFinalScore() { + bitField0_ &= ~0x00000001; + finalScore = 0; + return this; + } + + /** + * <code>optional uint32 FinalScore = 2;</code> + * @return the finalScore + */ + public int getFinalScore() { + return finalScore; + } + + /** + * <code>optional uint32 FinalScore = 2;</code> + * @param value the finalScore to set + * @return this + */ + public VictoryData setFinalScore(final int value) { + bitField0_ |= 0x00000001; + finalScore = value; + return this; + } + + /** + * <code>optional uint32 SeasonId = 3;</code> + * @return whether the seasonId field is set + */ + public boolean hasSeasonId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 SeasonId = 3;</code> + * @return this + */ + public VictoryData clearSeasonId() { + bitField0_ &= ~0x00000002; + seasonId = 0; + return this; + } + + /** + * <code>optional uint32 SeasonId = 3;</code> + * @return the seasonId + */ + public int getSeasonId() { + return seasonId; + } + + /** + * <code>optional uint32 SeasonId = 3;</code> + * @param value the seasonId to set + * @return this + */ + public VictoryData setSeasonId(final int value) { + bitField0_ |= 0x00000002; + seasonId = value; + return this; + } + + /** + * <code>repeated .VampireSurvivorAreaInfo Infos = 1;</code> + * @return whether the infos field is set + */ + public boolean hasInfos() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>repeated .VampireSurvivorAreaInfo Infos = 1;</code> + * @return this + */ + public VictoryData clearInfos() { + bitField0_ &= ~0x00000004; + infos.clear(); + return this; + } + + /** + * <code>repeated .VampireSurvivorAreaInfo Infos = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableInfos()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<VampireSurvivorAreaInfo> getInfos() { + return infos; + } + + /** + * <code>repeated .VampireSurvivorAreaInfo Infos = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<VampireSurvivorAreaInfo> getMutableInfos() { + bitField0_ |= 0x00000004; + return infos; + } + + /** + * <code>repeated .VampireSurvivorAreaInfo Infos = 1;</code> + * @param value the infos to add + * @return this + */ + public VictoryData addInfos(final VampireSurvivorAreaInfo value) { + bitField0_ |= 0x00000004; + infos.add(value); + return this; + } + + /** + * <code>repeated .VampireSurvivorAreaInfo Infos = 1;</code> + * @param values the infos to add + * @return this + */ + public VictoryData addAllInfos(final VampireSurvivorAreaInfo... values) { + bitField0_ |= 0x00000004; + infos.addAll(values); + return this; + } + + @Override + public VictoryData copyFrom(final VictoryData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + finalScore = other.finalScore; + seasonId = other.seasonId; + infos.copyFrom(other.infos); + } + return this; + } + + @Override + public VictoryData mergeFrom(final VictoryData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFinalScore()) { + setFinalScore(other.finalScore); + } + if (other.hasSeasonId()) { + setSeasonId(other.seasonId); + } + if (other.hasInfos()) { + getMutableInfos().addAll(other.infos); + } + return this; + } + + @Override + public VictoryData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + finalScore = 0; + seasonId = 0; + infos.clear(); + return this; + } + + @Override + public VictoryData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + infos.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VictoryData)) { + return false; + } + VictoryData other = (VictoryData) o; + return bitField0_ == other.bitField0_ + && (!hasFinalScore() || finalScore == other.finalScore) + && (!hasSeasonId() || seasonId == other.seasonId) + && (!hasInfos() || infos.equals(other.infos)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(finalScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(seasonId); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < infos.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(infos.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(finalScore); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(seasonId); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 * infos.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(infos); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VictoryData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // finalScore + finalScore = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // seasonId + seasonId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // infos + tag = input.readRepeatedMessage(infos, tag); + bitField0_ |= 0x00000004; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.finalScore, finalScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.seasonId, seasonId); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedMessage(FieldNames.infos, infos); + } + output.endObject(); + } + + @Override + public VictoryData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 120578780: { + if (input.isAtField(FieldNames.finalScore)) { + if (!input.trySkipNullValue()) { + finalScore = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 954575742: { + if (input.isAtField(FieldNames.seasonId)) { + if (!input.trySkipNullValue()) { + seasonId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 70795621: { + if (input.isAtField(FieldNames.infos)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(infos); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VictoryData clone() { + return new VictoryData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VictoryData parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VictoryData(), data).checkInitialized(); + } + + public static VictoryData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VictoryData(), input).checkInitialized(); + } + + public static VictoryData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VictoryData(), input).checkInitialized(); + } + + /** + * @return factory for creating VictoryData messages + */ + public static MessageFactory<VictoryData> getFactory() { + return VictoryDataFactory.INSTANCE; + } + + private enum VictoryDataFactory implements MessageFactory<VictoryData> { + INSTANCE; + + @Override + public VictoryData create() { + return VictoryData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName finalScore = FieldName.forField("FinalScore"); + + static final FieldName seasonId = FieldName.forField("SeasonId"); + + static final FieldName infos = FieldName.forField("Infos"); + } + } + + /** + * Protobuf type {@code DefeatData} + */ + public static final class DefeatData extends ProtoMessage<DefeatData> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 FinalScore = 1;</code> + */ + private int finalScore; + + /** + * <code>optional uint32 SeasonId = 2;</code> + */ + private int seasonId; + + private DefeatData() { + } + + /** + * @return a new empty instance of {@code DefeatData} + */ + public static DefeatData newInstance() { + return new DefeatData(); + } + + /** + * <code>optional uint32 FinalScore = 1;</code> + * @return whether the finalScore field is set + */ + public boolean hasFinalScore() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 FinalScore = 1;</code> + * @return this + */ + public DefeatData clearFinalScore() { + bitField0_ &= ~0x00000001; + finalScore = 0; + return this; + } + + /** + * <code>optional uint32 FinalScore = 1;</code> + * @return the finalScore + */ + public int getFinalScore() { + return finalScore; + } + + /** + * <code>optional uint32 FinalScore = 1;</code> + * @param value the finalScore to set + * @return this + */ + public DefeatData setFinalScore(final int value) { + bitField0_ |= 0x00000001; + finalScore = value; + return this; + } + + /** + * <code>optional uint32 SeasonId = 2;</code> + * @return whether the seasonId field is set + */ + public boolean hasSeasonId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 SeasonId = 2;</code> + * @return this + */ + public DefeatData clearSeasonId() { + bitField0_ &= ~0x00000002; + seasonId = 0; + return this; + } + + /** + * <code>optional uint32 SeasonId = 2;</code> + * @return the seasonId + */ + public int getSeasonId() { + return seasonId; + } + + /** + * <code>optional uint32 SeasonId = 2;</code> + * @param value the seasonId to set + * @return this + */ + public DefeatData setSeasonId(final int value) { + bitField0_ |= 0x00000002; + seasonId = value; + return this; + } + + @Override + public DefeatData copyFrom(final DefeatData other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + finalScore = other.finalScore; + seasonId = other.seasonId; + } + return this; + } + + @Override + public DefeatData mergeFrom(final DefeatData other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFinalScore()) { + setFinalScore(other.finalScore); + } + if (other.hasSeasonId()) { + setSeasonId(other.seasonId); + } + return this; + } + + @Override + public DefeatData clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + finalScore = 0; + seasonId = 0; + return this; + } + + @Override + public DefeatData clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof DefeatData)) { + return false; + } + DefeatData other = (DefeatData) o; + return bitField0_ == other.bitField0_ + && (!hasFinalScore() || finalScore == other.finalScore) + && (!hasSeasonId() || seasonId == other.seasonId); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(finalScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(seasonId); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(finalScore); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(seasonId); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public DefeatData mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // finalScore + finalScore = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // seasonId + seasonId = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.finalScore, finalScore); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.seasonId, seasonId); + } + output.endObject(); + } + + @Override + public DefeatData mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 120578780: { + if (input.isAtField(FieldNames.finalScore)) { + if (!input.trySkipNullValue()) { + finalScore = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 954575742: { + if (input.isAtField(FieldNames.seasonId)) { + if (!input.trySkipNullValue()) { + seasonId = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public DefeatData clone() { + return new DefeatData().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static DefeatData parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new DefeatData(), data).checkInitialized(); + } + + public static DefeatData parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new DefeatData(), input).checkInitialized(); + } + + public static DefeatData parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new DefeatData(), input).checkInitialized(); + } + + /** + * @return factory for creating DefeatData messages + */ + public static MessageFactory<DefeatData> getFactory() { + return DefeatDataFactory.INSTANCE; + } + + private enum DefeatDataFactory implements MessageFactory<DefeatData> { + INSTANCE; + + @Override + public DefeatData create() { + return DefeatData.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName finalScore = FieldName.forField("FinalScore"); + + static final FieldName seasonId = FieldName.forField("SeasonId"); + } + } + + private enum VampireSurvivorSettleRespFactory implements MessageFactory<VampireSurvivorSettleResp> { + INSTANCE; + + @Override + public VampireSurvivorSettleResp create() { + return VampireSurvivorSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName victory = FieldName.forField("Victory"); + + static final FieldName defeat = FieldName.forField("Defeat"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code VampireSurvivorAreaInfo} + */ + public static final class VampireSurvivorAreaInfo extends ProtoMessage<VampireSurvivorAreaInfo> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 BossTime = 3;</code> + */ + private int bossTime; + + /** + * <code>optional uint32 Score = 4;</code> + */ + private int score; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated uint32 KillCount = 1;</code> + */ + private final RepeatedInt killCount = RepeatedInt.newEmptyInstance(); + + /** + * <code>repeated uint32 KillScore = 2;</code> + */ + private final RepeatedInt killScore = RepeatedInt.newEmptyInstance(); + + private VampireSurvivorAreaInfo() { + } + + /** + * @return a new empty instance of {@code VampireSurvivorAreaInfo} + */ + public static VampireSurvivorAreaInfo newInstance() { + return new VampireSurvivorAreaInfo(); + } + + /** + * <code>optional uint32 BossTime = 3;</code> + * @return whether the bossTime field is set + */ + public boolean hasBossTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 BossTime = 3;</code> + * @return this + */ + public VampireSurvivorAreaInfo clearBossTime() { + bitField0_ &= ~0x00000001; + bossTime = 0; + return this; + } + + /** + * <code>optional uint32 BossTime = 3;</code> + * @return the bossTime + */ + public int getBossTime() { + return bossTime; + } + + /** + * <code>optional uint32 BossTime = 3;</code> + * @param value the bossTime to set + * @return this + */ + public VampireSurvivorAreaInfo setBossTime(final int value) { + bitField0_ |= 0x00000001; + bossTime = value; + return this; + } + + /** + * <code>optional uint32 Score = 4;</code> + * @return whether the score field is set + */ + public boolean hasScore() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Score = 4;</code> + * @return this + */ + public VampireSurvivorAreaInfo clearScore() { + bitField0_ &= ~0x00000002; + score = 0; + return this; + } + + /** + * <code>optional uint32 Score = 4;</code> + * @return the score + */ + public int getScore() { + return score; + } + + /** + * <code>optional uint32 Score = 4;</code> + * @param value the score to set + * @return this + */ + public VampireSurvivorAreaInfo setScore(final int value) { + bitField0_ |= 0x00000002; + score = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireSurvivorAreaInfo clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireSurvivorAreaInfo addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireSurvivorAreaInfo addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireSurvivorAreaInfo setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @return whether the killCount field is set + */ + public boolean hasKillCount() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @return this + */ + public VampireSurvivorAreaInfo clearKillCount() { + bitField0_ &= ~0x00000008; + killCount.clear(); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableKillCount()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getKillCount() { + return killCount; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableKillCount() { + bitField0_ |= 0x00000008; + return killCount; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @param value the killCount to add + * @return this + */ + public VampireSurvivorAreaInfo addKillCount(final int value) { + bitField0_ |= 0x00000008; + killCount.add(value); + return this; + } + + /** + * <code>repeated uint32 KillCount = 1;</code> + * @param values the killCount to add + * @return this + */ + public VampireSurvivorAreaInfo addAllKillCount(final int... values) { + bitField0_ |= 0x00000008; + killCount.addAll(values); + return this; + } + + /** + * <code>repeated uint32 KillScore = 2;</code> + * @return whether the killScore field is set + */ + public boolean hasKillScore() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated uint32 KillScore = 2;</code> + * @return this + */ + public VampireSurvivorAreaInfo clearKillScore() { + bitField0_ &= ~0x00000010; + killScore.clear(); + return this; + } + + /** + * <code>repeated uint32 KillScore = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableKillScore()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedInt getKillScore() { + return killScore; + } + + /** + * <code>repeated uint32 KillScore = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedInt getMutableKillScore() { + bitField0_ |= 0x00000010; + return killScore; + } + + /** + * <code>repeated uint32 KillScore = 2;</code> + * @param value the killScore to add + * @return this + */ + public VampireSurvivorAreaInfo addKillScore(final int value) { + bitField0_ |= 0x00000010; + killScore.add(value); + return this; + } + + /** + * <code>repeated uint32 KillScore = 2;</code> + * @param values the killScore to add + * @return this + */ + public VampireSurvivorAreaInfo addAllKillScore(final int... values) { + bitField0_ |= 0x00000010; + killScore.addAll(values); + return this; + } + + @Override + public VampireSurvivorAreaInfo copyFrom(final VampireSurvivorAreaInfo other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + bossTime = other.bossTime; + score = other.score; + nextPackage.copyFrom(other.nextPackage); + killCount.copyFrom(other.killCount); + killScore.copyFrom(other.killScore); + } + return this; + } + + @Override + public VampireSurvivorAreaInfo mergeFrom(final VampireSurvivorAreaInfo other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBossTime()) { + setBossTime(other.bossTime); + } + if (other.hasScore()) { + setScore(other.score); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasKillCount()) { + getMutableKillCount().addAll(other.killCount); + } + if (other.hasKillScore()) { + getMutableKillScore().addAll(other.killScore); + } + return this; + } + + @Override + public VampireSurvivorAreaInfo clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + bossTime = 0; + score = 0; + nextPackage.clear(); + killCount.clear(); + killScore.clear(); + return this; + } + + @Override + public VampireSurvivorAreaInfo clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + killCount.clear(); + killScore.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireSurvivorAreaInfo)) { + return false; + } + VampireSurvivorAreaInfo other = (VampireSurvivorAreaInfo) o; + return bitField0_ == other.bitField0_ + && (!hasBossTime() || bossTime == other.bossTime) + && (!hasScore() || score == other.score) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasKillCount() || killCount.equals(other.killCount)) + && (!hasKillScore() || killScore.equals(other.killScore)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(bossTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 32); + output.writeUInt32NoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < killCount.length(); i++) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(killCount.array()[i]); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < killScore.length(); i++) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(killScore.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(bossTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(score); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * killCount.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(killCount); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * killScore.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(killScore); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireSurvivorAreaInfo mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // bossTime + bossTime = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 32) { + break; + } + } + case 32: { + // score + score = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // killCount [packed=true] + input.readPackedUInt32(killCount, tag); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // killScore [packed=true] + input.readPackedUInt32(killScore, tag); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 8: { + // killCount [packed=false] + tag = input.readRepeatedUInt32(killCount, tag); + bitField0_ |= 0x00000008; + break; + } + case 16: { + // killScore [packed=false] + tag = input.readRepeatedUInt32(killScore, tag); + bitField0_ |= 0x00000010; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.bossTime, bossTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.score, score); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedUInt32(FieldNames.killCount, killCount); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedUInt32(FieldNames.killScore, killScore); + } + output.endObject(); + } + + @Override + public VampireSurvivorAreaInfo mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2103777286: { + if (input.isAtField(FieldNames.bossTime)) { + if (!input.trySkipNullValue()) { + bossTime = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 79711858: { + if (input.isAtField(FieldNames.score)) { + if (!input.trySkipNullValue()) { + score = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 414756913: { + if (input.isAtField(FieldNames.killCount)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(killCount); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 429170100: { + if (input.isAtField(FieldNames.killScore)) { + if (!input.trySkipNullValue()) { + input.readRepeatedUInt32(killScore); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireSurvivorAreaInfo clone() { + return new VampireSurvivorAreaInfo().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireSurvivorAreaInfo parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireSurvivorAreaInfo(), data).checkInitialized(); + } + + public static VampireSurvivorAreaInfo parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorAreaInfo(), input).checkInitialized(); + } + + public static VampireSurvivorAreaInfo parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireSurvivorAreaInfo(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireSurvivorAreaInfo messages + */ + public static MessageFactory<VampireSurvivorAreaInfo> getFactory() { + return VampireSurvivorAreaInfoFactory.INSTANCE; + } + + private enum VampireSurvivorAreaInfoFactory implements MessageFactory<VampireSurvivorAreaInfo> { + INSTANCE; + + @Override + public VampireSurvivorAreaInfo create() { + return VampireSurvivorAreaInfo.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName bossTime = FieldName.forField("BossTime"); + + static final FieldName score = FieldName.forField("Score"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName killCount = FieldName.forField("KillCount"); + + static final FieldName killScore = FieldName.forField("KillScore"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/VampireTalentDetail.java b/src/generated/main/emu/nebula/proto/VampireTalentDetail.java new file mode 100644 index 0000000..4059adf --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireTalentDetail.java @@ -0,0 +1,666 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class VampireTalentDetail { + /** + * Protobuf type {@code VampireTalentDetailResp} + */ + public static final class VampireTalentDetailResp extends ProtoMessage<VampireTalentDetailResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional int64 ResetTime = 3;</code> + */ + private long resetTime; + + /** + * <code>optional uint32 ActiveCount = 9;</code> + */ + private int activeCount; + + /** + * <code>optional uint32 ObtainCount = 10;</code> + */ + private int obtainCount; + + /** + * <code>optional bytes Nodes = 1;</code> + */ + private final RepeatedByte nodes = RepeatedByte.newEmptyInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private VampireTalentDetailResp() { + } + + /** + * @return a new empty instance of {@code VampireTalentDetailResp} + */ + public static VampireTalentDetailResp newInstance() { + return new VampireTalentDetailResp(); + } + + /** + * <code>optional int64 ResetTime = 3;</code> + * @return whether the resetTime field is set + */ + public boolean hasResetTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional int64 ResetTime = 3;</code> + * @return this + */ + public VampireTalentDetailResp clearResetTime() { + bitField0_ &= ~0x00000001; + resetTime = 0L; + return this; + } + + /** + * <code>optional int64 ResetTime = 3;</code> + * @return the resetTime + */ + public long getResetTime() { + return resetTime; + } + + /** + * <code>optional int64 ResetTime = 3;</code> + * @param value the resetTime to set + * @return this + */ + public VampireTalentDetailResp setResetTime(final long value) { + bitField0_ |= 0x00000001; + resetTime = value; + return this; + } + + /** + * <code>optional uint32 ActiveCount = 9;</code> + * @return whether the activeCount field is set + */ + public boolean hasActiveCount() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 ActiveCount = 9;</code> + * @return this + */ + public VampireTalentDetailResp clearActiveCount() { + bitField0_ &= ~0x00000002; + activeCount = 0; + return this; + } + + /** + * <code>optional uint32 ActiveCount = 9;</code> + * @return the activeCount + */ + public int getActiveCount() { + return activeCount; + } + + /** + * <code>optional uint32 ActiveCount = 9;</code> + * @param value the activeCount to set + * @return this + */ + public VampireTalentDetailResp setActiveCount(final int value) { + bitField0_ |= 0x00000002; + activeCount = value; + return this; + } + + /** + * <code>optional uint32 ObtainCount = 10;</code> + * @return whether the obtainCount field is set + */ + public boolean hasObtainCount() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional uint32 ObtainCount = 10;</code> + * @return this + */ + public VampireTalentDetailResp clearObtainCount() { + bitField0_ &= ~0x00000004; + obtainCount = 0; + return this; + } + + /** + * <code>optional uint32 ObtainCount = 10;</code> + * @return the obtainCount + */ + public int getObtainCount() { + return obtainCount; + } + + /** + * <code>optional uint32 ObtainCount = 10;</code> + * @param value the obtainCount to set + * @return this + */ + public VampireTalentDetailResp setObtainCount(final int value) { + bitField0_ |= 0x00000004; + obtainCount = value; + return this; + } + + /** + * <code>optional bytes Nodes = 1;</code> + * @return whether the nodes field is set + */ + public boolean hasNodes() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes Nodes = 1;</code> + * @return this + */ + public VampireTalentDetailResp clearNodes() { + bitField0_ &= ~0x00000008; + nodes.clear(); + return this; + } + + /** + * <code>optional bytes Nodes = 1;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNodes()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNodes() { + return nodes; + } + + /** + * <code>optional bytes Nodes = 1;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNodes() { + bitField0_ |= 0x00000008; + return nodes; + } + + /** + * <code>optional bytes Nodes = 1;</code> + * @param value the nodes to add + * @return this + */ + public VampireTalentDetailResp addNodes(final byte value) { + bitField0_ |= 0x00000008; + nodes.add(value); + return this; + } + + /** + * <code>optional bytes Nodes = 1;</code> + * @param values the nodes to add + * @return this + */ + public VampireTalentDetailResp addAllNodes(final byte... values) { + bitField0_ |= 0x00000008; + nodes.addAll(values); + return this; + } + + /** + * <code>optional bytes Nodes = 1;</code> + * @param values the nodes to set + * @return this + */ + public VampireTalentDetailResp setNodes(final byte... values) { + bitField0_ |= 0x00000008; + nodes.copyFrom(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public VampireTalentDetailResp clearNextPackage() { + bitField0_ &= ~0x00000010; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000010; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public VampireTalentDetailResp addNextPackage(final byte value) { + bitField0_ |= 0x00000010; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public VampireTalentDetailResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public VampireTalentDetailResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000010; + nextPackage.copyFrom(values); + return this; + } + + @Override + public VampireTalentDetailResp copyFrom(final VampireTalentDetailResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + resetTime = other.resetTime; + activeCount = other.activeCount; + obtainCount = other.obtainCount; + nodes.copyFrom(other.nodes); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireTalentDetailResp mergeFrom(final VampireTalentDetailResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasResetTime()) { + setResetTime(other.resetTime); + } + if (other.hasActiveCount()) { + setActiveCount(other.activeCount); + } + if (other.hasObtainCount()) { + setObtainCount(other.obtainCount); + } + if (other.hasNodes()) { + getMutableNodes().copyFrom(other.nodes); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public VampireTalentDetailResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + resetTime = 0L; + activeCount = 0; + obtainCount = 0; + nodes.clear(); + nextPackage.clear(); + return this; + } + + @Override + public VampireTalentDetailResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nodes.clear(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof VampireTalentDetailResp)) { + return false; + } + VampireTalentDetailResp other = (VampireTalentDetailResp) o; + return bitField0_ == other.bitField0_ + && (!hasResetTime() || resetTime == other.resetTime) + && (!hasActiveCount() || activeCount == other.activeCount) + && (!hasObtainCount() || obtainCount == other.obtainCount) + && (!hasNodes() || nodes.equals(other.nodes)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 24); + output.writeInt64NoTag(resetTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 72); + output.writeUInt32NoTag(activeCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 80); + output.writeUInt32NoTag(obtainCount); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 10); + output.writeBytesNoTag(nodes); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeInt64SizeNoTag(resetTime); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(activeCount); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(obtainCount); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeBytesSizeNoTag(nodes); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public VampireTalentDetailResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 24: { + // resetTime + resetTime = input.readInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 72) { + break; + } + } + case 72: { + // activeCount + activeCount = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 80) { + break; + } + } + case 80: { + // obtainCount + obtainCount = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // nodes + input.readBytes(nodes); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeInt64(FieldNames.resetTime, resetTime); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.activeCount, activeCount); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.obtainCount, obtainCount); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nodes, nodes); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public VampireTalentDetailResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -267205476: { + if (input.isAtField(FieldNames.resetTime)) { + if (!input.trySkipNullValue()) { + resetTime = input.readInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 590544265: { + if (input.isAtField(FieldNames.activeCount)) { + if (!input.trySkipNullValue()) { + activeCount = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1946978122: { + if (input.isAtField(FieldNames.obtainCount)) { + if (!input.trySkipNullValue()) { + obtainCount = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 75440785: { + if (input.isAtField(FieldNames.nodes)) { + if (!input.trySkipNullValue()) { + input.readBytes(nodes); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public VampireTalentDetailResp clone() { + return new VampireTalentDetailResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static VampireTalentDetailResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new VampireTalentDetailResp(), data).checkInitialized(); + } + + public static VampireTalentDetailResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireTalentDetailResp(), input).checkInitialized(); + } + + public static VampireTalentDetailResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new VampireTalentDetailResp(), input).checkInitialized(); + } + + /** + * @return factory for creating VampireTalentDetailResp messages + */ + public static MessageFactory<VampireTalentDetailResp> getFactory() { + return VampireTalentDetailRespFactory.INSTANCE; + } + + private enum VampireTalentDetailRespFactory implements MessageFactory<VampireTalentDetailResp> { + INSTANCE; + + @Override + public VampireTalentDetailResp create() { + return VampireTalentDetailResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName resetTime = FieldName.forField("ResetTime"); + + static final FieldName activeCount = FieldName.forField("ActiveCount"); + + static final FieldName obtainCount = FieldName.forField("ObtainCount"); + + static final FieldName nodes = FieldName.forField("Nodes"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/VampireTalentReset.java b/src/generated/main/emu/nebula/proto/VampireTalentReset.java new file mode 100644 index 0000000..95803cb --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireTalentReset.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class VampireTalentReset { +} diff --git a/src/generated/main/emu/nebula/proto/VampireTalentShow.java b/src/generated/main/emu/nebula/proto/VampireTalentShow.java new file mode 100644 index 0000000..2604709 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireTalentShow.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class VampireTalentShow { +} diff --git a/src/generated/main/emu/nebula/proto/VampireTalentUnlock.java b/src/generated/main/emu/nebula/proto/VampireTalentUnlock.java new file mode 100644 index 0000000..8f4b9b6 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/VampireTalentUnlock.java @@ -0,0 +1,5 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +public final class VampireTalentUnlock { +} diff --git a/src/generated/main/emu/nebula/proto/WeekBossApply.java b/src/generated/main/emu/nebula/proto/WeekBossApply.java new file mode 100644 index 0000000..f4207ef --- /dev/null +++ b/src/generated/main/emu/nebula/proto/WeekBossApply.java @@ -0,0 +1,463 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; + +public final class WeekBossApply { + /** + * Protobuf type {@code WeekBossApplyReq} + */ + public static final class WeekBossApplyReq extends ProtoMessage<WeekBossApplyReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint64 BuildId = 2;</code> + */ + private long buildId; + + /** + * <code>optional uint32 Id = 1;</code> + */ + private int id; + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private WeekBossApplyReq() { + } + + /** + * @return a new empty instance of {@code WeekBossApplyReq} + */ + public static WeekBossApplyReq newInstance() { + return new WeekBossApplyReq(); + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return whether the buildId field is set + */ + public boolean hasBuildId() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return this + */ + public WeekBossApplyReq clearBuildId() { + bitField0_ &= ~0x00000001; + buildId = 0L; + return this; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @return the buildId + */ + public long getBuildId() { + return buildId; + } + + /** + * <code>optional uint64 BuildId = 2;</code> + * @param value the buildId to set + * @return this + */ + public WeekBossApplyReq setBuildId(final long value) { + bitField0_ |= 0x00000001; + buildId = value; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return whether the id field is set + */ + public boolean hasId() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return this + */ + public WeekBossApplyReq clearId() { + bitField0_ &= ~0x00000002; + id = 0; + return this; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @return the id + */ + public int getId() { + return id; + } + + /** + * <code>optional uint32 Id = 1;</code> + * @param value the id to set + * @return this + */ + public WeekBossApplyReq setId(final int value) { + bitField0_ |= 0x00000002; + id = value; + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public WeekBossApplyReq clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public WeekBossApplyReq addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public WeekBossApplyReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public WeekBossApplyReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + @Override + public WeekBossApplyReq copyFrom(final WeekBossApplyReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + buildId = other.buildId; + id = other.id; + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WeekBossApplyReq mergeFrom(final WeekBossApplyReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasBuildId()) { + setBuildId(other.buildId); + } + if (other.hasId()) { + setId(other.id); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WeekBossApplyReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + buildId = 0L; + id = 0; + nextPackage.clear(); + return this; + } + + @Override + public WeekBossApplyReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WeekBossApplyReq)) { + return false; + } + WeekBossApplyReq other = (WeekBossApplyReq) o; + return bitField0_ == other.bitField0_ + && (!hasBuildId() || buildId == other.buildId) + && (!hasId() || id == other.id) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt64NoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt64SizeNoTag(buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(id); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WeekBossApplyReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // buildId + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // id + id = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt64(FieldNames.buildId, buildId); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.id, id); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public WeekBossApplyReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1895597065: { + if (input.isAtField(FieldNames.buildId)) { + if (!input.trySkipNullValue()) { + buildId = input.readUInt64(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2363: { + if (input.isAtField(FieldNames.id)) { + if (!input.trySkipNullValue()) { + id = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WeekBossApplyReq clone() { + return new WeekBossApplyReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WeekBossApplyReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WeekBossApplyReq(), data).checkInitialized(); + } + + public static WeekBossApplyReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossApplyReq(), input).checkInitialized(); + } + + public static WeekBossApplyReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossApplyReq(), input).checkInitialized(); + } + + /** + * @return factory for creating WeekBossApplyReq messages + */ + public static MessageFactory<WeekBossApplyReq> getFactory() { + return WeekBossApplyReqFactory.INSTANCE; + } + + private enum WeekBossApplyReqFactory implements MessageFactory<WeekBossApplyReq> { + INSTANCE; + + @Override + public WeekBossApplyReq create() { + return WeekBossApplyReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName buildId = FieldName.forField("BuildId"); + + static final FieldName id = FieldName.forField("Id"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } +} diff --git a/src/generated/main/emu/nebula/proto/WeekBossSettle.java b/src/generated/main/emu/nebula/proto/WeekBossSettle.java new file mode 100644 index 0000000..5353fc5 --- /dev/null +++ b/src/generated/main/emu/nebula/proto/WeekBossSettle.java @@ -0,0 +1,1260 @@ +// Code generated by protocol buffer compiler. Do not edit! +package emu.nebula.proto; + +import java.io.IOException; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedByte; +import us.hebi.quickbuf.RepeatedMessage; + +public final class WeekBossSettle { + /** + * Protobuf type {@code WeekBossSettleReq} + */ + public static final class WeekBossSettleReq extends ProtoMessage<WeekBossSettleReq> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional uint32 Time = 2;</code> + */ + private int time; + + /** + * <code>optional bool Result = 1;</code> + */ + private boolean result; + + /** + * <code>optional .Events Events = 7;</code> + */ + private final Public.Events events = Public.Events.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + private WeekBossSettleReq() { + } + + /** + * @return a new empty instance of {@code WeekBossSettleReq} + */ + public static WeekBossSettleReq newInstance() { + return new WeekBossSettleReq(); + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return this + */ + public WeekBossSettleReq clearTime() { + bitField0_ &= ~0x00000001; + time = 0; + return this; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @return the time + */ + public int getTime() { + return time; + } + + /** + * <code>optional uint32 Time = 2;</code> + * @param value the time to set + * @return this + */ + public WeekBossSettleReq setTime(final int value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * <code>optional bool Result = 1;</code> + * @return whether the result field is set + */ + public boolean hasResult() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional bool Result = 1;</code> + * @return this + */ + public WeekBossSettleReq clearResult() { + bitField0_ &= ~0x00000002; + result = false; + return this; + } + + /** + * <code>optional bool Result = 1;</code> + * @return the result + */ + public boolean getResult() { + return result; + } + + /** + * <code>optional bool Result = 1;</code> + * @param value the result to set + * @return this + */ + public WeekBossSettleReq setResult(final boolean value) { + bitField0_ |= 0x00000002; + result = value; + return this; + } + + /** + * <code>optional .Events Events = 7;</code> + * @return whether the events field is set + */ + public boolean hasEvents() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional .Events Events = 7;</code> + * @return this + */ + public WeekBossSettleReq clearEvents() { + bitField0_ &= ~0x00000004; + events.clear(); + return this; + } + + /** + * <code>optional .Events Events = 7;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableEvents()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.Events getEvents() { + return events; + } + + /** + * <code>optional .Events Events = 7;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.Events getMutableEvents() { + bitField0_ |= 0x00000004; + return events; + } + + /** + * <code>optional .Events Events = 7;</code> + * @param value the events to set + * @return this + */ + public WeekBossSettleReq setEvents(final Public.Events value) { + bitField0_ |= 0x00000004; + events.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public WeekBossSettleReq clearNextPackage() { + bitField0_ &= ~0x00000008; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000008; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public WeekBossSettleReq addNextPackage(final byte value) { + bitField0_ |= 0x00000008; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public WeekBossSettleReq addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public WeekBossSettleReq setNextPackage(final byte... values) { + bitField0_ |= 0x00000008; + nextPackage.copyFrom(values); + return this; + } + + @Override + public WeekBossSettleReq copyFrom(final WeekBossSettleReq other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + result = other.result; + events.copyFrom(other.events); + nextPackage.copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WeekBossSettleReq mergeFrom(final WeekBossSettleReq other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasResult()) { + setResult(other.result); + } + if (other.hasEvents()) { + getMutableEvents().mergeFrom(other.events); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + return this; + } + + @Override + public WeekBossSettleReq clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0; + result = false; + events.clear(); + nextPackage.clear(); + return this; + } + + @Override + public WeekBossSettleReq clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + events.clearQuick(); + nextPackage.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WeekBossSettleReq)) { + return false; + } + WeekBossSettleReq other = (WeekBossSettleReq) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || time == other.time) + && (!hasResult() || result == other.result) + && (!hasEvents() || events.equals(other.events)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(result); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(events); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WeekBossSettleReq mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 16: { + // time + time = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 8) { + break; + } + } + case 8: { + // result + result = input.readBool(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // events + input.readMessage(events); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeBool(FieldNames.result, result); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.events, events); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + output.endObject(); + } + + @Override + public WeekBossSettleReq mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 2606829: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1850559427: { + if (input.isAtField(FieldNames.result)) { + if (!input.trySkipNullValue()) { + result = input.readBool(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2087505209: { + if (input.isAtField(FieldNames.events)) { + if (!input.trySkipNullValue()) { + input.readMessage(events); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WeekBossSettleReq clone() { + return new WeekBossSettleReq().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WeekBossSettleReq parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WeekBossSettleReq(), data).checkInitialized(); + } + + public static WeekBossSettleReq parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossSettleReq(), input).checkInitialized(); + } + + public static WeekBossSettleReq parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossSettleReq(), input).checkInitialized(); + } + + /** + * @return factory for creating WeekBossSettleReq messages + */ + public static MessageFactory<WeekBossSettleReq> getFactory() { + return WeekBossSettleReqFactory.INSTANCE; + } + + private enum WeekBossSettleReqFactory implements MessageFactory<WeekBossSettleReq> { + INSTANCE; + + @Override + public WeekBossSettleReq create() { + return WeekBossSettleReq.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("Time"); + + static final FieldName result = FieldName.forField("Result"); + + static final FieldName events = FieldName.forField("Events"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + } + } + + /** + * Protobuf type {@code WeekBossLevelSettleResp} + */ + public static final class WeekBossLevelSettleResp extends ProtoMessage<WeekBossLevelSettleResp> implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * <code>optional bool First = 1;</code> + */ + private boolean first; + + /** + * <code>optional .ChangeInfo Change = 2;</code> + */ + private final Public.ChangeInfo change = Public.ChangeInfo.newInstance(); + + /** + * <code>optional bytes NextPackage = 2047;</code> + */ + private final RepeatedByte nextPackage = RepeatedByte.newEmptyInstance(); + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + */ + private final RepeatedMessage<Public.ItemTpl> awardItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + */ + private final RepeatedMessage<Public.ItemTpl> firstItems = RepeatedMessage.newEmptyInstance(Public.ItemTpl.getFactory()); + + private WeekBossLevelSettleResp() { + } + + /** + * @return a new empty instance of {@code WeekBossLevelSettleResp} + */ + public static WeekBossLevelSettleResp newInstance() { + return new WeekBossLevelSettleResp(); + } + + /** + * <code>optional bool First = 1;</code> + * @return whether the first field is set + */ + public boolean hasFirst() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * <code>optional bool First = 1;</code> + * @return this + */ + public WeekBossLevelSettleResp clearFirst() { + bitField0_ &= ~0x00000001; + first = false; + return this; + } + + /** + * <code>optional bool First = 1;</code> + * @return the first + */ + public boolean getFirst() { + return first; + } + + /** + * <code>optional bool First = 1;</code> + * @param value the first to set + * @return this + */ + public WeekBossLevelSettleResp setFirst(final boolean value) { + bitField0_ |= 0x00000001; + first = value; + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return whether the change field is set + */ + public boolean hasChange() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @return this + */ + public WeekBossLevelSettleResp clearChange() { + bitField0_ &= ~0x00000002; + change.clear(); + return this; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableChange()} if you want to modify it. + * + * @return internal storage object for reading + */ + public Public.ChangeInfo getChange() { + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public Public.ChangeInfo getMutableChange() { + bitField0_ |= 0x00000002; + return change; + } + + /** + * <code>optional .ChangeInfo Change = 2;</code> + * @param value the change to set + * @return this + */ + public WeekBossLevelSettleResp setChange(final Public.ChangeInfo value) { + bitField0_ |= 0x00000002; + change.copyFrom(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return whether the nextPackage field is set + */ + public boolean hasNextPackage() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @return this + */ + public WeekBossLevelSettleResp clearNextPackage() { + bitField0_ &= ~0x00000004; + nextPackage.clear(); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableNextPackage()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedByte getNextPackage() { + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedByte getMutableNextPackage() { + bitField0_ |= 0x00000004; + return nextPackage; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param value the nextPackage to add + * @return this + */ + public WeekBossLevelSettleResp addNextPackage(final byte value) { + bitField0_ |= 0x00000004; + nextPackage.add(value); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to add + * @return this + */ + public WeekBossLevelSettleResp addAllNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.addAll(values); + return this; + } + + /** + * <code>optional bytes NextPackage = 2047;</code> + * @param values the nextPackage to set + * @return this + */ + public WeekBossLevelSettleResp setNextPackage(final byte... values) { + bitField0_ |= 0x00000004; + nextPackage.copyFrom(values); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @return whether the awardItems field is set + */ + public boolean hasAwardItems() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @return this + */ + public WeekBossLevelSettleResp clearAwardItems() { + bitField0_ &= ~0x00000008; + awardItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAwardItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getAwardItems() { + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableAwardItems() { + bitField0_ |= 0x00000008; + return awardItems; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @param value the awardItems to add + * @return this + */ + public WeekBossLevelSettleResp addAwardItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000008; + awardItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl AwardItems = 3;</code> + * @param values the awardItems to add + * @return this + */ + public WeekBossLevelSettleResp addAllAwardItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000008; + awardItems.addAll(values); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @return whether the firstItems field is set + */ + public boolean hasFirstItems() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @return this + */ + public WeekBossLevelSettleResp clearFirstItems() { + bitField0_ &= ~0x00000010; + firstItems.clear(); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFirstItems()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage<Public.ItemTpl> getFirstItems() { + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage<Public.ItemTpl> getMutableFirstItems() { + bitField0_ |= 0x00000010; + return firstItems; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @param value the firstItems to add + * @return this + */ + public WeekBossLevelSettleResp addFirstItems(final Public.ItemTpl value) { + bitField0_ |= 0x00000010; + firstItems.add(value); + return this; + } + + /** + * <code>repeated .ItemTpl FirstItems = 4;</code> + * @param values the firstItems to add + * @return this + */ + public WeekBossLevelSettleResp addAllFirstItems(final Public.ItemTpl... values) { + bitField0_ |= 0x00000010; + firstItems.addAll(values); + return this; + } + + @Override + public WeekBossLevelSettleResp copyFrom(final WeekBossLevelSettleResp other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + first = other.first; + change.copyFrom(other.change); + nextPackage.copyFrom(other.nextPackage); + awardItems.copyFrom(other.awardItems); + firstItems.copyFrom(other.firstItems); + } + return this; + } + + @Override + public WeekBossLevelSettleResp mergeFrom(final WeekBossLevelSettleResp other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFirst()) { + setFirst(other.first); + } + if (other.hasChange()) { + getMutableChange().mergeFrom(other.change); + } + if (other.hasNextPackage()) { + getMutableNextPackage().copyFrom(other.nextPackage); + } + if (other.hasAwardItems()) { + getMutableAwardItems().addAll(other.awardItems); + } + if (other.hasFirstItems()) { + getMutableFirstItems().addAll(other.firstItems); + } + return this; + } + + @Override + public WeekBossLevelSettleResp clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + first = false; + change.clear(); + nextPackage.clear(); + awardItems.clear(); + firstItems.clear(); + return this; + } + + @Override + public WeekBossLevelSettleResp clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + change.clearQuick(); + nextPackage.clear(); + awardItems.clearQuick(); + firstItems.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof WeekBossLevelSettleResp)) { + return false; + } + WeekBossLevelSettleResp other = (WeekBossLevelSettleResp) o; + return bitField0_ == other.bitField0_ + && (!hasFirst() || first == other.first) + && (!hasChange() || change.equals(other.change)) + && (!hasNextPackage() || nextPackage.equals(other.nextPackage)) + && (!hasAwardItems() || awardItems.equals(other.awardItems)) + && (!hasFirstItems() || firstItems.equals(other.firstItems)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeBoolNoTag(first); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawLittleEndian16((short) 32762); + output.writeBytesNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < awardItems.length(); i++) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(awardItems.get(i)); + } + } + if ((bitField0_ & 0x00000010) != 0) { + for (int i = 0; i < firstItems.length(); i++) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(firstItems.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 2; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(change); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 2 + ProtoSink.computeBytesSizeNoTag(nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 * awardItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(awardItems); + } + if ((bitField0_ & 0x00000010) != 0) { + size += (1 * firstItems.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(firstItems); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public WeekBossLevelSettleResp mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // first + first = input.readBool(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // change + input.readMessage(change); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 16378) { + break; + } + } + case 16378: { + // nextPackage + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // awardItems + tag = input.readRepeatedMessage(awardItems, tag); + bitField0_ |= 0x00000008; + if (tag != 34) { + break; + } + } + case 34: { + // firstItems + tag = input.readRepeatedMessage(firstItems, tag); + bitField0_ |= 0x00000010; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeBool(FieldNames.first, first); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.change, change); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeBytes(FieldNames.nextPackage, nextPackage); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedMessage(FieldNames.awardItems, awardItems); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRepeatedMessage(FieldNames.firstItems, firstItems); + } + output.endObject(); + } + + @Override + public WeekBossLevelSettleResp mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 67887760: { + if (input.isAtField(FieldNames.first)) { + if (!input.trySkipNullValue()) { + first = input.readBool(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2017198032: { + if (input.isAtField(FieldNames.change)) { + if (!input.trySkipNullValue()) { + input.readMessage(change); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2082324045: { + if (input.isAtField(FieldNames.nextPackage)) { + if (!input.trySkipNullValue()) { + input.readBytes(nextPackage); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1943188605: { + if (input.isAtField(FieldNames.awardItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(awardItems); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1812344592: { + if (input.isAtField(FieldNames.firstItems)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(firstItems); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public WeekBossLevelSettleResp clone() { + return new WeekBossLevelSettleResp().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static WeekBossLevelSettleResp parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new WeekBossLevelSettleResp(), data).checkInitialized(); + } + + public static WeekBossLevelSettleResp parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossLevelSettleResp(), input).checkInitialized(); + } + + public static WeekBossLevelSettleResp parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new WeekBossLevelSettleResp(), input).checkInitialized(); + } + + /** + * @return factory for creating WeekBossLevelSettleResp messages + */ + public static MessageFactory<WeekBossLevelSettleResp> getFactory() { + return WeekBossLevelSettleRespFactory.INSTANCE; + } + + private enum WeekBossLevelSettleRespFactory implements MessageFactory<WeekBossLevelSettleResp> { + INSTANCE; + + @Override + public WeekBossLevelSettleResp create() { + return WeekBossLevelSettleResp.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName first = FieldName.forField("First"); + + static final FieldName change = FieldName.forField("Change"); + + static final FieldName nextPackage = FieldName.forField("NextPackage"); + + static final FieldName awardItems = FieldName.forField("AwardItems"); + + static final FieldName firstItems = FieldName.forField("FirstItems"); + } + } +} diff --git a/src/main/java/emu/nebula/Config.java b/src/main/java/emu/nebula/Config.java new file mode 100644 index 0000000..8b1aa38 --- /dev/null +++ b/src/main/java/emu/nebula/Config.java @@ -0,0 +1,113 @@ +package emu.nebula; + +import java.util.Set; + +import lombok.Getter; + +@Getter +public class Config { + public DatabaseInfo accountDatabase = new DatabaseInfo(); + public DatabaseInfo gameDatabase = new DatabaseInfo(); + public InternalMongoInfo internalMongoServer = new InternalMongoInfo(); + public boolean useSameDatabase = true; + + public KeystoreInfo keystore = new KeystoreInfo(); + + public HttpServerConfig httpServer = new HttpServerConfig(80); + public GameServerConfig gameServer = new GameServerConfig(80); + + public ServerOptions serverOptions = new ServerOptions(); + public ServerRates serverRates = new ServerRates(); + public LogOptions logOptions = new LogOptions(); + + public String resourceDir = "./resources"; + public String dataDir = "./data"; + + @Getter + public static class DatabaseInfo { + public String uri = "mongodb://localhost:27017"; + public String collection = "nebula"; + public boolean useInternal = true; + } + + @Getter + public static class InternalMongoInfo { + public String address = "localhost"; + public int port = 27017; + public String filePath = "database.mv"; + } + + @Getter + public static class KeystoreInfo { + public String path = "./keystore.p12"; + public String password = ""; + } + + @Getter + private static class ServerConfig { + public boolean useSSL = false; + public String bindAddress = "0.0.0.0"; + public int bindPort; + public String publicAddress = "127.0.0.1"; // Will return bindAddress if publicAddress is null + public Integer publicPort; // Will return bindPort if publicPort is null + + public ServerConfig(int port) { + this.bindPort = port; + } + + public String getPublicAddress() { + if (this.publicAddress != null && !this.publicAddress.isEmpty()) { + return this.publicAddress; + } + + return this.bindAddress; + } + + public int getPublicPort() { + if (this.publicPort != null && this.publicPort != 0) { + return this.publicPort; + } + + return this.bindPort; + } + + public String getDisplayAddress() { + return (useSSL ? "https" : "http") + "://" + getPublicAddress() + ":" + getPublicPort(); + } + } + + @Getter + public static class HttpServerConfig extends ServerConfig { + + public HttpServerConfig(int port) { + super(port); + } + } + + @Getter + public static class GameServerConfig extends ServerConfig { + + public GameServerConfig(int port) { + super(port); + } + } + + @Getter + public static class ServerOptions { + public Set<String> defaultPermissions = Set.of("*"); + public boolean autoCreateAccount = true; + public boolean skipIntro = false; + } + + @Getter + public static class ServerRates { + public double exp = 1.0; + } + + @Getter + public static class LogOptions { + public boolean commands = true; + public boolean packets = false; + } + +} diff --git a/src/main/java/emu/nebula/GameConstants.java b/src/main/java/emu/nebula/GameConstants.java new file mode 100644 index 0000000..760297e --- /dev/null +++ b/src/main/java/emu/nebula/GameConstants.java @@ -0,0 +1,15 @@ +package emu.nebula; + +public class GameConstants { + public static final int DATA_VERSION = 22; + public static final String VERSION = "1.0.0." + DATA_VERSION; + + public static final String PROTO_BASE_TYPE_URL = "type.googleapis.com/proto."; + + public static final int INTRO_GUIDE_ID = 1; + + public static final int GOLD_ITEM_ID = 1; + + public static final int MAX_FORMATIONS = 5; + +} diff --git a/src/main/java/emu/nebula/Nebula.java b/src/main/java/emu/nebula/Nebula.java new file mode 100644 index 0000000..82555b8 --- /dev/null +++ b/src/main/java/emu/nebula/Nebula.java @@ -0,0 +1,247 @@ +package emu.nebula; + +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import emu.nebula.command.CommandManager; +import emu.nebula.data.ResourceLoader; +import emu.nebula.database.DatabaseManager; +import emu.nebula.game.GameContext; +import emu.nebula.server.HttpServer; +import emu.nebula.util.Handbook; +import emu.nebula.util.JsonUtils; +import lombok.Getter; + +public class Nebula { + private static final Logger log = LoggerFactory.getLogger(Nebula.class); + + // Config + private static final File configFile = new File("./config.json"); + @Getter private static Config config; + + // Database + @Getter private static DatabaseManager accountDatabase; + @Getter private static DatabaseManager gameDatabase; + + // Server + @Getter private static HttpServer httpServer; + @Getter private static HttpServer gameServer; // TODO + @Getter private static ServerType serverType = ServerType.BOTH; + + @Getter private static GameContext gameContext; + @Getter private static CommandManager commandManager; + + public static void main(String[] args) { + // Start Server + Nebula.getLogger().info("Starting Nebula " + getJarVersion()); + Nebula.getLogger().info("Git hash: " + getGitHash()); + Nebula.getLogger().info("Game version: " + GameConstants.VERSION); + + boolean generateHandbook = true; + + // Load config + commands + Nebula.loadConfig(); + + // Parse arguments + for (String arg : args) { + switch (arg) { + case "-login": + serverType = ServerType.LOGIN; + break; + case "-game": + serverType = ServerType.GAME; + break; + case "-nohandbook": + case "-skiphandbook": + generateHandbook = false; + break; + case "-database": + // Database only + DatabaseManager.startInternalMongoServer(Nebula.getConfig().getInternalMongoServer()); + Nebula.getLogger().info("Running local Mongo server at " + DatabaseManager.getServer().getConnectionString()); + return; + } + } + + // Skip these if we are only running the http server in dispatch mode + if (serverType.runGame()) { + // Load resources + ResourceLoader.loadAll(); + // Generate handbook + if (generateHandbook) { + Handbook.generate(); + } + } + + try { + // Start Database(s) + Nebula.initDatabases(); + } catch (Exception exception) { + Nebula.getLogger().error("Unable to start the database(s).", exception); + } + + // Start game context + Nebula.gameContext = new GameContext(); + Nebula.commandManager = new CommandManager(); + + // Start servers + try { + // Always run http server as it is needed by for dispatch and gateserver + httpServer = new HttpServer(serverType); + httpServer.start(); + } catch (Exception exception) { + Nebula.getLogger().error("Unable to start the HTTP server.", exception); + } + + // Start console + Nebula.startConsole(); + } + + public static Logger getLogger() { + return log; + } + + // Database + + private static void initDatabases() { + if (Nebula.getConfig().useSameDatabase) { + // Setup account and game database + accountDatabase = new DatabaseManager(Nebula.getConfig().getAccountDatabase(), serverType); + // Optimization: Dont run a 2nd database manager if we are not running a gameserver + if (serverType.runGame()) { + gameDatabase = accountDatabase; + } + } else { + // Run separate databases + accountDatabase = new DatabaseManager(Nebula.getConfig().getAccountDatabase(), ServerType.LOGIN); + // Optimization: Dont run a 2nd database manager if we are not running a gameserver + if (serverType.runGame()) { + gameDatabase = new DatabaseManager(Nebula.getConfig().getGameDatabase(), ServerType.GAME); + } + } + } + + // Config + + public static void loadConfig() { + // Load from file + try (FileReader file = new FileReader(configFile)) { + Nebula.config = JsonUtils.loadToClass(file, Config.class); + } catch (Exception e) { + // Ignored + } + + // Sanity check + if (Nebula.getConfig() == null) { + Nebula.config = new Config(); + } + + // Save config + Nebula.saveConfig(); + } + + public static void saveConfig() { + try (FileWriter file = new FileWriter(configFile)) { + Gson gson = new GsonBuilder() + .setDateFormat("dd-MM-yyyy hh:mm:ss") + .setPrettyPrinting() + .serializeNulls() + .create(); + + file.write(gson.toJson(config)); + } catch (Exception e) { + getLogger().error("Config save error"); + } + } + + // Build Config + + private static String getJarVersion() { + // Safely get the build config class without errors even if it hasnt been generated yet + try { + Class<?> buildConfig = Class.forName(Nebula.class.getPackageName() + ".BuildConfig"); + return buildConfig.getField("VERSION").get(null).toString(); + } catch (Exception e) { + // Ignored + } + + return ""; + } + + public static String getGitHash() { + // Use a string builder in case one of the build config fields are missing + StringBuilder builder = new StringBuilder(); + + // Safely get the build config class without errors even if it hasnt been generated yet + try { + SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Class<?> buildConfig = Class.forName(Nebula.class.getPackageName() + ".BuildConfig"); + + String hash = buildConfig.getField("GIT_HASH").get(null).toString(); + builder.append(hash); + + String timestamp = buildConfig.getField("GIT_TIMESTAMP").get(null).toString(); + long time = Long.parseLong(timestamp) * 1000; + builder.append(" (" + sf.format(new Date(time)) + ")"); + } catch (Exception e) { + // Ignored + } + + if (builder.isEmpty()) { + return "UNKNOWN"; + } else { + return builder.toString(); + } + } + + // Utils + + /** + * Returns the current server time in seconds + */ + public static long getCurrentTime() { + return System.currentTimeMillis() / 1000; + } + + // Console + + private static void startConsole() { + String input; + try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { + while ((input = br.readLine()) != null) { + Nebula.getCommandManager().invoke(null, input); + } + } catch (Exception e) { + Nebula.getLogger().error("Console error:", e); + } + } + + // Server enums + + public enum ServerType { + LOGIN (0x1), + GAME (0x2), + BOTH (0x3); + + private final int flags; + + ServerType(int flags) { + this.flags = flags; + } + + public boolean runLogin() { + return (this.flags & 0x1) == 0x1; + } + + public boolean runGame() { + return (this.flags & 0x2) == 0x2; + } + } +} diff --git a/src/main/java/emu/nebula/command/Command.java b/src/main/java/emu/nebula/command/Command.java new file mode 100644 index 0000000..ac4bfae --- /dev/null +++ b/src/main/java/emu/nebula/command/Command.java @@ -0,0 +1,17 @@ +package emu.nebula.command; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface Command { + public String label() default ""; + + public String[] aliases() default ""; + + public String desc() default ""; + + public String permission() default ""; + + public boolean requireTarget() default false; +} diff --git a/src/main/java/emu/nebula/command/CommandArgs.java b/src/main/java/emu/nebula/command/CommandArgs.java new file mode 100644 index 0000000..f44f280 --- /dev/null +++ b/src/main/java/emu/nebula/command/CommandArgs.java @@ -0,0 +1,130 @@ +package emu.nebula.command; + +import java.util.List; + +import emu.nebula.Nebula; +import emu.nebula.game.player.Player; +import emu.nebula.util.Utils; +import it.unimi.dsi.fastutil.ints.Int2IntMap; +import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; +import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +import it.unimi.dsi.fastutil.objects.ObjectSet; +import lombok.Getter; + +@Getter +public class CommandArgs { + private String raw; + private List<String> list; + private Player sender; + private Player target; + + private int targetUid; + private int amount; + private int level = -1; + private int rank = -1; + private int promotion = -1; + private int stage = -1; + + private Int2IntMap map; + private ObjectSet<String> flags; + + public CommandArgs(Player sender, List<String> args) { + this.sender = sender; + this.raw = String.join(" ", args); + this.list = args; + + // Parse args. Maybe regex is better. + var it = this.list.iterator(); + while (it.hasNext()) { + // Lower case first + String arg = it.next().toLowerCase(); + + try { + if (arg.length() >= 2 && !Character.isDigit(arg.charAt(0)) && Character.isDigit(arg.charAt(arg.length() - 1))) { + if (arg.startsWith("@")) { // Target UID + this.targetUid = Utils.parseSafeInt(arg.substring(1)); + it.remove(); + } else if (arg.startsWith("x")) { // Amount + this.amount = Utils.parseSafeInt(arg.substring(1)); + it.remove(); + } else if (arg.startsWith("lv")) { // Level + this.level = Utils.parseSafeInt(arg.substring(2)); + it.remove(); + } else if (arg.startsWith("r")) { // Rank + this.rank = Utils.parseSafeInt(arg.substring(1)); + it.remove(); + } else if (arg.startsWith("e")) { // Eidolons + this.rank = Utils.parseSafeInt(arg.substring(1)); + it.remove(); + } else if (arg.startsWith("p")) { // Promotion + this.promotion = Utils.parseSafeInt(arg.substring(1)); + it.remove(); + } else if (arg.startsWith("s")) { // Stage or Superimposition + this.stage = Utils.parseSafeInt(arg.substring(1)); + it.remove(); + } + } else if (arg.startsWith("-")) { // Flag + if (this.flags == null) this.flags = new ObjectOpenHashSet<>(); + this.flags.add(arg); + it.remove(); + } else if (arg.contains(":") || arg.contains(",")) { + String[] split = arg.split("[:,]"); + if (split.length >= 2) { + int key = Integer.parseInt(split[0]); + int value = Integer.parseInt(split[1]); + + if (this.map == null) this.map = new Int2IntOpenHashMap(); + this.map.put(key, value); + + it.remove(); + } + } + } catch (Exception e) { + + } + } + + // Get target player + if (targetUid != 0) { + if (Nebula.getGameContext() != null) { + target = Nebula.getGameContext().getPlayerModule().getCachedPlayerByUid(targetUid); + } + } else { + target = sender; + } + + if (target != null) { + this.targetUid = target.getUid(); + } + } + + public int size() { + return this.list.size(); + } + + public String get(int index) { + if (index < 0 || index >= list.size()) { + return ""; + } + + return this.list.get(index); + } + + /** + * Sends a message to the command sender + * @param message + */ + public void sendMessage(String message) { + if (sender != null) { + sender.sendMessage(message); + } else { + Nebula.getLogger().info(message); + } + } + + public boolean hasFlag(String flag) { + if (this.flags == null) return false; + return this.flags.contains(flag); + } + +} diff --git a/src/main/java/emu/nebula/command/CommandHandler.java b/src/main/java/emu/nebula/command/CommandHandler.java new file mode 100644 index 0000000..775279b --- /dev/null +++ b/src/main/java/emu/nebula/command/CommandHandler.java @@ -0,0 +1,15 @@ +package emu.nebula.command; + +public interface CommandHandler { + + public default Command getData() { + return this.getClass().getAnnotation(Command.class); + } + + public default String getLabel() { + return getData().label(); + } + + public void execute(CommandArgs args); + +} diff --git a/src/main/java/emu/nebula/command/CommandManager.java b/src/main/java/emu/nebula/command/CommandManager.java new file mode 100644 index 0000000..d5b36ce --- /dev/null +++ b/src/main/java/emu/nebula/command/CommandManager.java @@ -0,0 +1,168 @@ +package emu.nebula.command; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +import org.reflections.Reflections; + +import emu.nebula.Nebula; +import emu.nebula.game.player.Player; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; +import lombok.Getter; + +@Getter +public class CommandManager { + private Object2ObjectMap<String, CommandHandler> labels; + private Object2ObjectMap<String, CommandHandler> commands; + + public CommandManager() { + this.labels = new Object2ObjectOpenHashMap<>(); + this.commands = new Object2ObjectOpenHashMap<>(); + + // Scan for commands + var commandClasses = new Reflections(CommandManager.class.getPackageName()).getTypesAnnotatedWith(Command.class); + + for (var cls : commandClasses) { + if (!CommandHandler.class.isAssignableFrom(cls)) { + continue; + } + + try { + CommandHandler handler = (CommandHandler) cls.getDeclaredConstructor().newInstance(); + this.registerCommand(handler); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** + * Adds a command that players and server console users can use. Command handlers must have the proper command annotation attached to them. + */ + public CommandManager registerCommand(CommandHandler handler) { + Command command = handler.getClass().getAnnotation(Command.class); + if (command == null) return this; + + this.getLabels().put(command.label(), handler); + this.getCommands().put(command.label(), handler); + + for (String alias : command.aliases()) { + this.getCommands().put(alias, handler); + } + + return this; + } + + /** + * Removes a command from use. + * @param label The command name + * @return + */ + public CommandManager unregisterCommand(String label) { + CommandHandler handler = this.getLabels().get(label); + if (handler == null) return this; + + Command command = handler.getClass().getAnnotation(Command.class); + if (command == null) { + return this; + } + + this.getLabels().remove(command.label()); + this.getCommands().remove(command.label()); + + for (String alias : command.aliases()) { + this.getCommands().remove(alias); + } + + return this; + } + + /** + * Checks if the sender has permission to use this command. Will always return true if the sender is the server console. + * @param sender The sender of the command. + * @param command + * @return true if the sender has permission to use this command + */ + public boolean checkPermission(Player sender, Command command) { + if (sender == null || command.permission().isEmpty()) { + return true; + } + + return sender.getAccount().hasPermission(command.permission()); + } + + /** + * Checks if the sender has permission to use this command on other players. Will always return true if the sender is the server console. + * @param sender The sender of the command. + * @param command + * @return true if the sender has permission to use this command + */ + private boolean checkTargetPermission(Player sender, Command command) { + if (sender == null || command.permission().isEmpty()) { + return true; + } + + return sender.getAccount().hasPermission("target." + command.permission()); + } + + public void invoke(Player sender, String message) { + // Parse message into arguments + List<String> args = Arrays.stream(message.split(" ")).collect(Collectors.toCollection(ArrayList::new)); + + // Get command label + String label = args.remove(0).toLowerCase(); + + // Filter out command prefixes + if (label.startsWith("/") || label.startsWith("!")) { + label = label.substring(1); + } + + // Get command handler + CommandHandler handler = this.commands.get(label); + + // Execute command + if (handler != null) { + // Get command annotation data + Command command = handler.getData(); + + // Check if sender has permission to run the command. + if (sender != null && !this.checkPermission(sender, command)) { + // We have a double null check here just in case + sender.sendMessage("You do not have permission to use this command."); + return; + } + + // Build command arguments + CommandArgs cmdArgs = new CommandArgs(sender, args); + + // Check targeted permission + if (sender != cmdArgs.getTarget() && !this.checkTargetPermission(sender, command)) { + cmdArgs.sendMessage("You do not have permission to use this command on another player."); + return; + } + + // Make sure our command has a target + if (command.requireTarget() && cmdArgs.getTarget() == null) { + cmdArgs.sendMessage("Error: Targeted player not found or offline"); + return; + } + + // Log + if (sender != null && Nebula.getConfig().getLogOptions().commands) { + Nebula.getLogger().info("[UID: " + sender.getUid() + "] " + sender.getName() + " used command: " + message); + } + + // Run command + handler.execute(cmdArgs); + } else { + if (sender != null) { + sender.sendMessage("Invalid Command!"); + } else { + Nebula.getLogger().info("Invalid Command!"); + } + } + } +} diff --git a/src/main/java/emu/nebula/command/commands/AccountCommand.java b/src/main/java/emu/nebula/command/commands/AccountCommand.java new file mode 100644 index 0000000..110b832 --- /dev/null +++ b/src/main/java/emu/nebula/command/commands/AccountCommand.java @@ -0,0 +1,47 @@ +package emu.nebula.command.commands; + +import emu.nebula.command.Command; +import emu.nebula.command.CommandArgs; +import emu.nebula.command.CommandHandler; +import emu.nebula.game.account.AccountHelper; +import emu.nebula.util.Utils; + +@Command(label = "account", permission = "admin.account", desc = "/account {create | delete} [username] (reserved player uid). Creates or deletes an account.") +public class AccountCommand implements CommandHandler { + + @Override + public void execute(CommandArgs args) { + if (args.size() < 2) { + args.sendMessage("Invalid amount of args"); + return; + } + + String command = args.get(0).toLowerCase(); + String username = args.get(1); + + switch (command) { + case "create" -> { + // Reserved player uid + int reservedUid = 0; + + if (args.size() >= 3) { + reservedUid = Utils.parseSafeInt(args.get(2)); + } + + if (AccountHelper.createAccount(username, null, reservedUid) != null) { + args.sendMessage("Account created"); + } else { + args.sendMessage("Account already exists"); + } + } + case "delete" -> { + if (AccountHelper.deleteAccount(username)) { + args.sendMessage("Account deleted"); + } else { + args.sendMessage("Account doesnt exist"); + } + } + } + } + +} diff --git a/src/main/java/emu/nebula/command/commands/GiveCommand.java b/src/main/java/emu/nebula/command/commands/GiveCommand.java new file mode 100644 index 0000000..8c0790e --- /dev/null +++ b/src/main/java/emu/nebula/command/commands/GiveCommand.java @@ -0,0 +1,45 @@ +package emu.nebula.command.commands; + +import emu.nebula.util.Utils; +import emu.nebula.data.GameData; +import emu.nebula.game.mail.GameMail; +import emu.nebula.command.Command; +import emu.nebula.command.CommandArgs; +import emu.nebula.command.CommandHandler; + +@Command( + label = "give", + aliases = {"g", "item"}, + permission = "player.give", + requireTarget = true, + desc = "/give [item id] x(amount). Gives the targeted player an item." +) +public class GiveCommand implements CommandHandler { + + @Override + public void execute(CommandArgs args) { + // Setup mail + var mail = new GameMail("System", "Give Command Result", ""); + + // Get amount to give + int amount = Math.max(args.getAmount(), 1); + + // Parse items + for (String arg : args.getList()) { + // Parse item id + int itemId = Utils.parseSafeInt(arg); + + var itemData = GameData.getItemDataTable().get(itemId); + if (itemData == null) { + args.sendMessage("Item \"" + arg + "\" does not exist!"); + continue; + } + + // Add + mail.addAttachment(itemId, amount); + } + + // Add mail + args.getTarget().getMailbox().sendMail(mail); + } +} diff --git a/src/main/java/emu/nebula/command/commands/MailCommand.java b/src/main/java/emu/nebula/command/commands/MailCommand.java new file mode 100644 index 0000000..8335df4 --- /dev/null +++ b/src/main/java/emu/nebula/command/commands/MailCommand.java @@ -0,0 +1,20 @@ +package emu.nebula.command.commands; + +import emu.nebula.command.Command; +import emu.nebula.command.CommandArgs; +import emu.nebula.command.CommandHandler; +import emu.nebula.game.mail.GameMail; + +@Command(label = "mail", aliases = {"m"}, permission = "player.mail", requireTarget = true, desc = "/mail [content]. Sends the targeted player a system mail.") +public class MailCommand implements CommandHandler { + + @Override + public void execute(CommandArgs args) { + // Setup mail + var mail = new GameMail("System", "Test", "This is a test mail"); + + // Add mail + args.getTarget().getMailbox().sendMail(mail); + } + +} diff --git a/src/main/java/emu/nebula/command/commands/ReloadCommand.java b/src/main/java/emu/nebula/command/commands/ReloadCommand.java new file mode 100644 index 0000000..26bb3de --- /dev/null +++ b/src/main/java/emu/nebula/command/commands/ReloadCommand.java @@ -0,0 +1,17 @@ +package emu.nebula.command.commands; + +import emu.nebula.Nebula; +import emu.nebula.command.Command; +import emu.nebula.command.CommandArgs; +import emu.nebula.command.CommandHandler; + +@Command(label = "reload", permission = "admin.reload", desc = "/reload. Reloads the server config.") +public class ReloadCommand implements CommandHandler { + + @Override + public void execute(CommandArgs args) { + Nebula.loadConfig(); + args.sendMessage("Reloaded the server config"); + } + +} diff --git a/src/main/java/emu/nebula/data/BaseDef.java b/src/main/java/emu/nebula/data/BaseDef.java new file mode 100644 index 0000000..58e5201 --- /dev/null +++ b/src/main/java/emu/nebula/data/BaseDef.java @@ -0,0 +1,15 @@ +package emu.nebula.data; + +public abstract class BaseDef implements Comparable<BaseDef> { + + public abstract int getId(); + + public void onLoad() { + + } + + @Override + public int compareTo(BaseDef o) { + return this.getId() - o.getId(); + } +} diff --git a/src/main/java/emu/nebula/data/DataTable.java b/src/main/java/emu/nebula/data/DataTable.java new file mode 100644 index 0000000..8cca5dd --- /dev/null +++ b/src/main/java/emu/nebula/data/DataTable.java @@ -0,0 +1,89 @@ +package emu.nebula.data; + +import java.util.Iterator; +import java.util.stream.Stream; + +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import it.unimi.dsi.fastutil.ints.IntCollection; +import it.unimi.dsi.fastutil.ints.IntSet; +import it.unimi.dsi.fastutil.objects.ObjectCollection; +import it.unimi.dsi.fastutil.objects.ObjectSet; + +public class DataTable<T> implements Iterable<T> { + private Int2ObjectMap<T> map; + + public DataTable() { + this.map = new Int2ObjectOpenHashMap<>(); + } + + @SuppressWarnings("unchecked") + public void add(Object res) { + if (res instanceof BaseDef r) { + this.map.put(r.getId(), (T) res); + } + } + + public int size() { + return this.map.size(); + } + + // Wrapper functions + + /** + * Wrapper for {@link it.unimi.dsi.fastutil.ints.Int2ObjectMap.get} + */ + public T get(int id) { + return this.map.get(id); + } + + /** + * Wrapper for {@link it.unimi.dsi.fastutil.ints.Int2ObjectMap.containsKey} + */ + public boolean containsKey(int id) { + return this.map.containsKey(id); + } + + /** + * Wrapper for {@link it.unimi.dsi.fastutil.ints.Int2ObjectMap.keySet} + */ + public IntSet keySet() { + return this.map.keySet(); + } + + /** + * Wrapper for {@link it.unimi.dsi.fastutil.ints.Int2ObjectMap.values} + */ + public ObjectCollection<T> values() { + return this.map.values(); + } + + /** + * Wrapper for {@link it.unimi.dsi.fastutil.ints.Int2ObjectMap.int2ObjectEntrySet} + */ + public ObjectSet<Int2ObjectMap.Entry<T>> int2ObjectEntrySet() { + return this.map.int2ObjectEntrySet(); + } + + // Iterable/Streamable + + @Override + public Iterator<T> iterator() { + return this.values().iterator(); + } + + public Stream<T> stream() { + return this.values().stream(); + } + + // Custom + + public IntCollection getIds() { + return this.map.keySet(); + } + + public IntCollection getAllIds() { + return this.getIds(); + } + +} diff --git a/src/main/java/emu/nebula/data/GameData.java b/src/main/java/emu/nebula/data/GameData.java new file mode 100644 index 0000000..02eaf09 --- /dev/null +++ b/src/main/java/emu/nebula/data/GameData.java @@ -0,0 +1,45 @@ +package emu.nebula.data; + +import java.lang.reflect.Field; + +import java.util.Arrays; +import java.util.List; +import java.util.ArrayList; + +import java.util.stream.Collectors; + +import it.unimi.dsi.fastutil.ints.*; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; + +import emu.nebula.data.resources.*; + +import lombok.Getter; + +@SuppressWarnings("unused") +public class GameData { + @Getter private static DataTable<CharacterDef> CharacterDataTable = new DataTable<>(); + @Getter private static DataTable<CharacterAdvanceDef> CharacterAdvanceDataTable = new DataTable<>(); + @Getter private static DataTable<CharacterSkillUpgradeDef> CharacterSkillUpgradeDataTable = new DataTable<>(); + @Getter private static DataTable<CharacterUpgradeDef> CharacterUpgradeDataTable = new DataTable<>(); + @Getter private static DataTable<CharItemExpDef> CharItemExpDataTable = new DataTable<>(); + + @Getter private static DataTable<DiscDef> DiscDataTable = new DataTable<>(); + @Getter private static DataTable<DiscStrengthenDef> DiscStrengthenDataTable = new DataTable<>(); + @Getter private static DataTable<DiscItemExpDef> DiscItemExpDataTable = new DataTable<>(); + @Getter private static DataTable<DiscPromoteDef> DiscPromoteDataTable = new DataTable<>(); + @Getter private static DataTable<DiscPromoteLimitDef> DiscPromoteLimitDataTable = new DataTable<>(); + + @Getter private static DataTable<ItemDef> ItemDataTable = new DataTable<>(); + + @Getter private static DataTable<MallMonthlyCardDef> MallMonthlyCardDataTable = new DataTable<>(); + @Getter private static DataTable<MallPackageDef> MallPackageDataTable = new DataTable<>(); + @Getter private static DataTable<MallShopDef> MallShopDataTable = new DataTable<>(); + @Getter private static DataTable<MallGemDef> MallGemDataTable = new DataTable<>(); + + @Getter private static DataTable<WorldClassDef> WorldClassDataTable = new DataTable<>(); + @Getter private static DataTable<GuideGroupDef> GuideGroupDataTable = new DataTable<>(); + + @Getter private static DataTable<StarTowerDef> StarTowerDataTable = new DataTable<>(); + @Getter private static DataTable<PotentialDef> PotentialDataTable = new DataTable<>(); +} diff --git a/src/main/java/emu/nebula/data/ResourceLoader.java b/src/main/java/emu/nebula/data/ResourceLoader.java new file mode 100644 index 0000000..a21a197 --- /dev/null +++ b/src/main/java/emu/nebula/data/ResourceLoader.java @@ -0,0 +1,121 @@ +package emu.nebula.data; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.stream.Collectors; + +import org.reflections.Reflections; + +import emu.nebula.util.JsonUtils; +import emu.nebula.util.Utils; +import emu.nebula.Nebula; + +public class ResourceLoader { + private static boolean loaded = false; + + // Load all resources + public static void loadAll() { + // Make sure we don't load more than once + if (loaded) return; + + // Load + loadResources(); + + // Done + loaded = true; + Nebula.getLogger().info("Resource loading complete"); + } + + public static void loadResources() { + // Get resource classes and sort + List<Class<?>> classes = new Reflections(ResourceLoader.class.getPackage().getName()) + .getTypesAnnotatedWith(ResourceType.class) + .stream() + .collect(Collectors.toList()); + + classes.sort((a, b) -> b.getAnnotation(ResourceType.class).loadPriority().value() - a.getAnnotation(ResourceType.class).loadPriority().value()); + + // Load resource + for (Class<?> def : classes) { + loadFromResource(def); + } + } + + public static void loadFromResource(Class<?> resourceClass) { + // Load to map + DataTable<?> table = getTableForResource(GameData.class, resourceClass); + ResourceType type = resourceClass.getAnnotation(ResourceType.class); + + // Sanity check + if (type == null) { + return; + } + + int count = 0; + + try { + var json = JsonUtils.loadToMap(Nebula.getConfig().resourceDir + "/bin/" + type.name(), String.class, resourceClass); + + for (Object o : json.values()) { + BaseDef res = (BaseDef) o; + + if (res == null) { + continue; + } + + res.onLoad(); + + count++; + + if (table != null) { + table.add(o); + } + } + } catch (Exception e) { + e.printStackTrace(); + Nebula.getLogger().error("Error loading resource file: " + type.name(), e); + } + + Nebula.getLogger().info("Loaded " + count + " " + resourceClass.getSimpleName() + "s."); + } + + // Utility + + @SuppressWarnings("unchecked") + private static <T> DataTable<T> getTableForResource(Class<?> dataClass, Class<T> resourceClass) { + // Init + DataTable<T> table = null; + Field field = null; + + // Parse out "Def" in the resource name + String simpleName = resourceClass.getSimpleName(); + + if (simpleName.endsWith("Def")) { + simpleName = simpleName.substring(0, simpleName.length() - 3) + "Data"; + } + + // Get table + try { + field = dataClass.getDeclaredField(simpleName + "Table"); + } catch (Exception e) { + try { + field = dataClass.getDeclaredField(Utils.lowerCaseFirstChar(simpleName) + "Table"); + } catch (Exception ex) { + + } + } + + if (field != null) { + try { + field.setAccessible(true); + table = (DataTable<T>) field.get(null); + } catch (Exception e) { + + } finally { + field.setAccessible(false); + } + } + + return table; + } +} diff --git a/src/main/java/emu/nebula/data/ResourceType.java b/src/main/java/emu/nebula/data/ResourceType.java new file mode 100644 index 0000000..30c49a8 --- /dev/null +++ b/src/main/java/emu/nebula/data/ResourceType.java @@ -0,0 +1,33 @@ +package emu.nebula.data; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface ResourceType { + + /** Names of the file that this Resource loads from */ + String name(); + + /** + * Load priority - dictates which order to load this resource, with "highest" + * being loaded first + */ + LoadPriority loadPriority() default LoadPriority.NORMAL; + + Class<?> keyType() default int.class; + + public enum LoadPriority { + HIGHEST(4), HIGH(3), NORMAL(2), LOW(1), LOWEST(0); + + private final int value; + + LoadPriority(int value) { + this.value = value; + } + + public int value() { + return value; + } + } +} diff --git a/src/main/java/emu/nebula/data/resources/CharItemExpDef.java b/src/main/java/emu/nebula/data/resources/CharItemExpDef.java new file mode 100644 index 0000000..7e047c7 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/CharItemExpDef.java @@ -0,0 +1,17 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "CharItemExp.json") +public class CharItemExpDef extends BaseDef { + private int ItemId; + private int ExpValue; + + @Override + public int getId() { + return ItemId; + } +} diff --git a/src/main/java/emu/nebula/data/resources/CharacterAdvanceDef.java b/src/main/java/emu/nebula/data/resources/CharacterAdvanceDef.java new file mode 100644 index 0000000..754921a --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/CharacterAdvanceDef.java @@ -0,0 +1,55 @@ +package emu.nebula.data.resources; + +import emu.nebula.GameConstants; +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import emu.nebula.data.ResourceType.LoadPriority; +import emu.nebula.game.inventory.ItemParamMap; + +import lombok.Getter; + +@Getter +@ResourceType(name = "CharacterAdvance.json", loadPriority = LoadPriority.LOW) +public class CharacterAdvanceDef extends BaseDef { + private int Id; + private int Group; + private int AdvanceLvl; + + private int Tid1; + private int Qty1; + private int Tid2; + private int Qty2; + private int Tid3; + private int Qty3; + private int Tid4; + private int Qty4; + private int GoldQty; + + private transient ItemParamMap materials; + + @Override + public int getId() { + return Id; + } + + @Override + public void onLoad() { + this.materials = new ItemParamMap(); + + if (this.Tid1 > 0) { + this.materials.add(this.Tid1, this.Qty1); + } + if (this.Tid2 > 0) { + this.materials.add(this.Tid2, this.Qty2); + } + if (this.Tid3 > 0) { + this.materials.add(this.Tid3, this.Qty3); + } + if (this.Tid4 > 0) { + this.materials.add(this.Tid4, this.Qty4); + } + if (this.GoldQty > 0) { + this.materials.add(GameConstants.GOLD_ITEM_ID, this.GoldQty); + } + } +} diff --git a/src/main/java/emu/nebula/data/resources/CharacterDef.java b/src/main/java/emu/nebula/data/resources/CharacterDef.java new file mode 100644 index 0000000..8024a3b --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/CharacterDef.java @@ -0,0 +1,32 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "Character.json") +public class CharacterDef extends BaseDef { + private int Id; + private String Name; + + private boolean Available; + private int Grade; + private int DefaultSkinId; + private int AdvanceSkinId; + private int AdvanceGroup; + private int[] SkillsUpgradeGroup; + + @Override + public int getId() { + return Id; + } + + public int getSkillsUpgradeGroup(int index) { + if (index < 0 || index >= this.SkillsUpgradeGroup.length) { + return -1; + } + + return this.SkillsUpgradeGroup[index]; + } +} diff --git a/src/main/java/emu/nebula/data/resources/CharacterSkillUpgradeDef.java b/src/main/java/emu/nebula/data/resources/CharacterSkillUpgradeDef.java new file mode 100644 index 0000000..a9f683e --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/CharacterSkillUpgradeDef.java @@ -0,0 +1,57 @@ +package emu.nebula.data.resources; + +import emu.nebula.GameConstants; +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import emu.nebula.data.ResourceType.LoadPriority; +import emu.nebula.game.inventory.ItemParamMap; + +import lombok.Getter; + +@Getter +@ResourceType(name = "CharacterSkillUpgrade.json", loadPriority = LoadPriority.LOW) +public class CharacterSkillUpgradeDef extends BaseDef { + private int Group; + private int AdvanceNum; + + private int Tid1; + private int Qty1; + private int Tid2; + private int Qty2; + private int Tid3; + private int Qty3; + private int Tid4; + private int Qty4; + private int GoldQty; + + private transient int upgradeId; + private transient ItemParamMap materials; + + @Override + public int getId() { + return upgradeId; + } + + @Override + public void onLoad() { + this.materials = new ItemParamMap(); + + if (this.Tid1 > 0) { + this.materials.add(this.Tid1, this.Qty1); + } + if (this.Tid2 > 0) { + this.materials.add(this.Tid2, this.Qty2); + } + if (this.Tid3 > 0) { + this.materials.add(this.Tid3, this.Qty3); + } + if (this.Tid4 > 0) { + this.materials.add(this.Tid4, this.Qty4); + } + if (this.GoldQty > 0) { + this.materials.add(GameConstants.GOLD_ITEM_ID, this.GoldQty); + } + + this.upgradeId = (this.Group * 100) + this.AdvanceNum; + } +} diff --git a/src/main/java/emu/nebula/data/resources/CharacterUpgradeDef.java b/src/main/java/emu/nebula/data/resources/CharacterUpgradeDef.java new file mode 100644 index 0000000..30b0f43 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/CharacterUpgradeDef.java @@ -0,0 +1,17 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "CharacterUpgrade.json") +public class CharacterUpgradeDef extends BaseDef { + private int Level; + private int Exp; + + @Override + public int getId() { + return Level; + } +} diff --git a/src/main/java/emu/nebula/data/resources/DiscDef.java b/src/main/java/emu/nebula/data/resources/DiscDef.java new file mode 100644 index 0000000..3000c03 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/DiscDef.java @@ -0,0 +1,24 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "Disc.json") +public class DiscDef extends BaseDef { + private int Id; + private int StrengthenGroupId; + private int PromoteGroupId; + private int TransformItemId; + + @Override + public int getId() { + return Id; + } + + @Override + public void onLoad() { + + } +} diff --git a/src/main/java/emu/nebula/data/resources/DiscItemExpDef.java b/src/main/java/emu/nebula/data/resources/DiscItemExpDef.java new file mode 100644 index 0000000..c35d433 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/DiscItemExpDef.java @@ -0,0 +1,17 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "DiscItemExp.json") +public class DiscItemExpDef extends BaseDef { + private int ItemId; + private int Exp; + + @Override + public int getId() { + return ItemId; + } +} diff --git a/src/main/java/emu/nebula/data/resources/DiscPromoteDef.java b/src/main/java/emu/nebula/data/resources/DiscPromoteDef.java new file mode 100644 index 0000000..d87e09a --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/DiscPromoteDef.java @@ -0,0 +1,50 @@ +package emu.nebula.data.resources; + +import emu.nebula.GameConstants; +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import emu.nebula.data.ResourceType.LoadPriority; +import emu.nebula.game.inventory.ItemParamMap; + +import lombok.Getter; + +@Getter +@ResourceType(name = "DiscPromote.json", loadPriority = LoadPriority.LOW) +public class DiscPromoteDef extends BaseDef { + private int Id; + private int Group; + private int AdvanceLvl; + + private int ItemId1; + private int Num1; + private int ItemId2; + private int Num2; + private int ItemId3; + private int Num3; + private int ExpenseGold; + + private transient ItemParamMap materials; + + @Override + public int getId() { + return Id; + } + + @Override + public void onLoad() { + this.materials = new ItemParamMap(); + + if (this.ItemId1 > 0 && this.Num1 > 0) { + this.materials.add(this.ItemId1, this.Num1); + } + if (this.ItemId2 > 0 && this.Num2 > 0) { + this.materials.add(this.ItemId2, this.Num2); + } + if (this.ItemId3 > 0 && this.Num3 > 0) { + this.materials.add(this.ItemId3, this.Num3); + } + if (this.ExpenseGold > 0) { + this.materials.add(GameConstants.GOLD_ITEM_ID, this.ExpenseGold); + } + } +} diff --git a/src/main/java/emu/nebula/data/resources/DiscPromoteLimitDef.java b/src/main/java/emu/nebula/data/resources/DiscPromoteLimitDef.java new file mode 100644 index 0000000..f2d6c9b --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/DiscPromoteLimitDef.java @@ -0,0 +1,20 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "DiscPromoteLimit.json") +public class DiscPromoteLimitDef extends BaseDef { + private int Id; + private int Rarity; + private int Phase; + private int MaxLevel; + private int WorldClassLimit; + + @Override + public int getId() { + return Id; + } +} diff --git a/src/main/java/emu/nebula/data/resources/DiscStrengthenDef.java b/src/main/java/emu/nebula/data/resources/DiscStrengthenDef.java new file mode 100644 index 0000000..35adb10 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/DiscStrengthenDef.java @@ -0,0 +1,18 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; + +import lombok.Getter; + +@Getter +@ResourceType(name = "DiscStrengthen.json") +public class DiscStrengthenDef extends BaseDef { + private int Id; + private int Exp; + + @Override + public int getId() { + return Id; + } +} diff --git a/src/main/java/emu/nebula/data/resources/GuideGroupDef.java b/src/main/java/emu/nebula/data/resources/GuideGroupDef.java new file mode 100644 index 0000000..5f61f8b --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/GuideGroupDef.java @@ -0,0 +1,17 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "GuideGroup.json") +public class GuideGroupDef extends BaseDef { + private int Id; + private boolean IsActive; + + @Override + public int getId() { + return Id; + } +} diff --git a/src/main/java/emu/nebula/data/resources/ItemDef.java b/src/main/java/emu/nebula/data/resources/ItemDef.java new file mode 100644 index 0000000..d29b018 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/ItemDef.java @@ -0,0 +1,32 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import emu.nebula.game.inventory.ItemSubType; +import emu.nebula.game.inventory.ItemType; +import lombok.Getter; + +@Getter +@ResourceType(name = "Item.json") +public class ItemDef extends BaseDef { + private int Id; + private String Title; + private int Type; + private int Stype; + private int Rarity; + private boolean Stack; + + private transient ItemType itemType; + private transient ItemSubType itemSubType; + + @Override + public int getId() { + return Id; + } + + @Override + public void onLoad() { + this.itemType = ItemType.getByValue(this.Type); + this.itemSubType = ItemSubType.getByValue(this.Stype); + } +} diff --git a/src/main/java/emu/nebula/data/resources/MallGemDef.java b/src/main/java/emu/nebula/data/resources/MallGemDef.java new file mode 100644 index 0000000..b6328bf --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/MallGemDef.java @@ -0,0 +1,23 @@ +package emu.nebula.data.resources; + +import com.google.gson.annotations.SerializedName; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "MallGem.json") +public class MallGemDef extends BaseDef { + @SerializedName("Id") + private String IdString; + private int Stock; + private int ItemId; + private int CurrencyItemId; + private int ItemQty; + + @Override + public int getId() { + return IdString.hashCode(); + } +} diff --git a/src/main/java/emu/nebula/data/resources/MallMonthlyCardDef.java b/src/main/java/emu/nebula/data/resources/MallMonthlyCardDef.java new file mode 100644 index 0000000..b7ae8a2 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/MallMonthlyCardDef.java @@ -0,0 +1,23 @@ +package emu.nebula.data.resources; + +import com.google.gson.annotations.SerializedName; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "MallMonthlyCard.json") +public class MallMonthlyCardDef extends BaseDef { + @SerializedName("Id") + private String IdString; + private int MonthlyCardId; + private int Price; + private int BaseItemId; + private int BaseItemQty; + + @Override + public int getId() { + return IdString.hashCode(); + } +} diff --git a/src/main/java/emu/nebula/data/resources/MallPackageDef.java b/src/main/java/emu/nebula/data/resources/MallPackageDef.java new file mode 100644 index 0000000..6e4ef3a --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/MallPackageDef.java @@ -0,0 +1,23 @@ +package emu.nebula.data.resources; + +import com.google.gson.annotations.SerializedName; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "MallPackage.json") +public class MallPackageDef extends BaseDef { + @SerializedName("Id") + private String IdString; + private int Stock; + private int CurrencyType; + private int CurrencyItemId; + private int CurrencyItemQty; + + @Override + public int getId() { + return IdString.hashCode(); + } +} diff --git a/src/main/java/emu/nebula/data/resources/MallShopDef.java b/src/main/java/emu/nebula/data/resources/MallShopDef.java new file mode 100644 index 0000000..11026a7 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/MallShopDef.java @@ -0,0 +1,23 @@ +package emu.nebula.data.resources; + +import com.google.gson.annotations.SerializedName; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "MallShop.json") +public class MallShopDef extends BaseDef { + @SerializedName("Id") + private String IdString; + private int Stock; + private int ItemId; + private int CurrencyItemId; + private int ItemQty; + + @Override + public int getId() { + return IdString.hashCode(); + } +} diff --git a/src/main/java/emu/nebula/data/resources/PotentialDef.java b/src/main/java/emu/nebula/data/resources/PotentialDef.java new file mode 100644 index 0000000..ca847b2 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/PotentialDef.java @@ -0,0 +1,19 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "Potential.json") +public class PotentialDef extends BaseDef { + private int Id; + private int CharId; + private int Build; + private int MaxLevel; + + @Override + public int getId() { + return Id; + } +} diff --git a/src/main/java/emu/nebula/data/resources/StarTowerDef.java b/src/main/java/emu/nebula/data/resources/StarTowerDef.java new file mode 100644 index 0000000..3a30be2 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/StarTowerDef.java @@ -0,0 +1,17 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "StarTower.json") +public class StarTowerDef extends BaseDef { + private int Id; + private int[] FloorNum; + + @Override + public int getId() { + return Id; + } +} diff --git a/src/main/java/emu/nebula/data/resources/WorldClassDef.java b/src/main/java/emu/nebula/data/resources/WorldClassDef.java new file mode 100644 index 0000000..c12c480 --- /dev/null +++ b/src/main/java/emu/nebula/data/resources/WorldClassDef.java @@ -0,0 +1,18 @@ +package emu.nebula.data.resources; + +import emu.nebula.data.BaseDef; +import emu.nebula.data.ResourceType; +import lombok.Getter; + +@Getter +@ResourceType(name = "WorldClass.json") +public class WorldClassDef extends BaseDef { + private int Id; + private int Exp; + private String Reward; + + @Override + public int getId() { + return Id; + } +} diff --git a/src/main/java/emu/nebula/database/AccountDatabaseOnly.java b/src/main/java/emu/nebula/database/AccountDatabaseOnly.java new file mode 100644 index 0000000..d44a39c --- /dev/null +++ b/src/main/java/emu/nebula/database/AccountDatabaseOnly.java @@ -0,0 +1,9 @@ +package emu.nebula.database; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface AccountDatabaseOnly { + +} diff --git a/src/main/java/emu/nebula/database/DatabaseCounter.java b/src/main/java/emu/nebula/database/DatabaseCounter.java new file mode 100644 index 0000000..cbd78ad --- /dev/null +++ b/src/main/java/emu/nebula/database/DatabaseCounter.java @@ -0,0 +1,23 @@ +package emu.nebula.database; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; + +@Entity(value = "counters", useDiscriminator = false) +public class DatabaseCounter { + @Id + private String id; + private int count; + + public DatabaseCounter() {} + + public DatabaseCounter(String id) { + this.id = id; + this.count = 10000; + } + + public int getNextId() { + int id = ++count; + return id; + } +} diff --git a/src/main/java/emu/nebula/database/DatabaseManager.java b/src/main/java/emu/nebula/database/DatabaseManager.java new file mode 100644 index 0000000..d4e3b45 --- /dev/null +++ b/src/main/java/emu/nebula/database/DatabaseManager.java @@ -0,0 +1,251 @@ +package emu.nebula.database; + +import java.util.stream.Stream; + +import emu.nebula.Config.DatabaseInfo; +import emu.nebula.Config.InternalMongoInfo; +import emu.nebula.Nebula; +import emu.nebula.Nebula.ServerType; +import emu.nebula.database.codecs.*; +import emu.nebula.util.Utils; + +import org.bson.codecs.configuration.CodecRegistries; +import org.reflections.Reflections; + +import com.mongodb.MongoCommandException; +import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; +import com.mongodb.client.MongoDatabase; +import com.mongodb.client.MongoIterable; +import com.mongodb.client.result.DeleteResult; + +import de.bwaldvogel.mongo.MongoBackend; +import de.bwaldvogel.mongo.MongoServer; +import de.bwaldvogel.mongo.backend.h2.H2Backend; +import de.bwaldvogel.mongo.backend.memory.MemoryBackend; +import dev.morphia.*; +import dev.morphia.annotations.Entity; +import dev.morphia.mapping.Mapper; +import dev.morphia.mapping.MapperOptions; +import dev.morphia.query.filters.Filters; +import dev.morphia.query.updates.UpdateOperators; +import lombok.Getter; + +@Getter +public final class DatabaseManager { + @Getter + private static MongoServer server; + private Datastore datastore; + + private static final InsertOneOptions INSERT_OPTIONS = new InsertOneOptions(); + private static final DeleteOptions DELETE_OPTIONS = new DeleteOptions(); + private static final DeleteOptions DELETE_MANY = new DeleteOptions().multi(true); + + public DatabaseManager(DatabaseInfo info, ServerType type) { + // Variables + var internalConfig = Nebula.getConfig().getInternalMongoServer(); + String connectionString = info.getUri(); + + // Start local mongo server + if (info.isUseInternal()) { + if (Utils.isPortOpen(internalConfig.getAddress(), internalConfig.getPort())) { + connectionString = startInternalMongoServer(internalConfig); + Nebula.getLogger().info("Started local MongoDB server at " + server.getConnectionString()); + } else { + Nebula.getLogger().warn("Local MongoDB server could not be created because the port is in use."); + } + } + + // Initialize + MongoClient mongoClient = MongoClients.create(connectionString); + + // Add our custom fastutil codecs + var codecProvider = CodecRegistries.fromCodecs( + new IntSetCodec(), new IntListCodec(), new Int2IntMapCodec(), new ItemParamMapCodec() + ); + + // Set mapper options + MapperOptions mapperOptions = MapperOptions.builder() + .storeEmpties(true) + .storeNulls(false) + .codecProvider(codecProvider) + .build(); + + // Create data store. + datastore = Morphia.createDatastore(mongoClient, info.getCollection(), mapperOptions); + + // Map classes + var entities = new Reflections(Nebula.class.getPackageName()) + .getTypesAnnotatedWith(Entity.class) + .stream() + .filter(cls -> { + Entity e = cls.getAnnotation(Entity.class); + return e != null && !e.value().equals(Mapper.IGNORED_FIELDNAME); + }) + .toList(); + + if (type.runLogin()) { + // Only map account related entities + var map = entities.stream().filter(cls -> { + return cls.getAnnotation(AccountDatabaseOnly.class) != null; + }).toArray(Class<?>[]::new); + + datastore.getMapper().map(map); + } + if (type.runGame()) { + // Only map game related entities + var map = entities.stream().filter(cls -> { + return cls.getAnnotation(AccountDatabaseOnly.class) == null; + }).toArray(Class<?>[]::new); + + datastore.getMapper().map(map); + } + + // Ensure indexes + ensureIndexes(); + + // Done + Nebula.getLogger().info("Connected to the MongoDB database at " + connectionString); + } + + public MongoDatabase getDatabase() { + return getDatastore().getDatabase(); + } + + private void ensureIndexes() { + try { + datastore.ensureIndexes(); + } catch (MongoCommandException exception) { + Nebula.getLogger().warn("Mongo index error: ", exception); + // Duplicate index error + if (exception.getCode() == 85) { + // Drop all indexes and re add them + MongoIterable<String> collections = datastore.getDatabase().listCollectionNames(); + for (String name : collections) { + datastore.getDatabase().getCollection(name).dropIndexes(); + } + // Add back indexes + datastore.ensureIndexes(); + } + } + } + + // Database Functions + + public boolean checkIfObjectExists(Class<?> cls, String filter, String value) { + return getDatastore().find(cls).filter(Filters.eq(filter, value)).count() > 0; + } + + public <T> T getObjectByUid(Class<T> cls, long uid) { + return getDatastore().find(cls).filter(Filters.eq("_id", uid)).first(); + } + + public <T> T getObjectByField(Class<T> cls, String filter, Object value) { + return getDatastore().find(cls).filter(Filters.eq(filter, value)).first(); + } + + public <T> T getObjectByField(Class<T> cls, String filter, long value) { + return getDatastore().find(cls).filter(Filters.eq(filter, value)).first(); + } + + public <T> Stream<T> getObjects(Class<T> cls, String filter, Object value) { + return getDatastore().find(cls).filter(Filters.eq(filter, value)).stream(); + } + + public <T> Stream<T> getObjects(Class<T> cls, String filter, long value) { + return getDatastore().find(cls).filter(Filters.eq(filter, value)).stream(); + } + + public <T> Stream<T> getObjects(Class<T> cls) { + return getDatastore().find(cls).stream(); + } + + public <T> void save(T obj) { + getDatastore().save(obj, INSERT_OPTIONS); + } + + public <T> boolean delete(T obj) { + DeleteResult result = getDatastore().delete(obj, DELETE_OPTIONS); + return result.getDeletedCount() > 0; + } + + public boolean delete(Class<?> cls, String filter, long uid) { + DeleteResult result = getDatastore().find(cls).filter(Filters.eq(filter, uid)).delete(DELETE_MANY); + return result.getDeletedCount() > 0; + } + + public void update(Object obj, int uid, String field, Object item) { + update(obj, uid, field, item, false); + } + + public void update(Object obj, int uid, String field, Object value, boolean upsert) { + var opt = new UpdateOptions().upsert(upsert); + + getDatastore().find(obj.getClass()) + .filter(Filters.eq("_id", uid)) + .update(opt, UpdateOperators.set(field, value)); + } + + @SuppressWarnings("removal") + public void update(Object obj, int uid, String field, Object value, String field2, Object value2) { + getDatastore().find(obj.getClass()) + .filter(Filters.eq("_id", uid)) + .update(UpdateOperators.set(field, value), UpdateOperators.set(field2, value2)); + } + + public void updateNested(Object obj, int uid, String filter, int filterId, String field, Object item) { + var opt = new UpdateOptions().upsert(false); + + getDatastore().find(obj.getClass()) + .filter(Filters.eq("_id", uid)) + .filter(Filters.eq(filter, filterId)) + .update(opt, UpdateOperators.set(field, item)); + } + + public void addToList(Object obj, int uid, String field, Object item) { + var opt = new UpdateOptions().upsert(false); + + getDatastore().find(obj.getClass()) + .filter(Filters.eq("_id", uid)) + .update(opt, UpdateOperators.addToSet(field, item)); + } + + // Database counter + + public synchronized int getNextObjectId(Class<?> c) { + DatabaseCounter counter = getDatastore().find(DatabaseCounter.class).filter(Filters.eq("_id", c.getSimpleName())).first(); + if (counter == null) { + counter = new DatabaseCounter(c.getSimpleName()); + } + try { + return counter.getNextId(); + } finally { + getDatastore().save(counter); + } + } + + // Internal MongoDB server + + public static String startInternalMongoServer(InternalMongoInfo internalMongo) { + // Get backend + MongoBackend backend = null; + + if (internalMongo.filePath != null && internalMongo.filePath.length() > 0) { + backend = new H2Backend(internalMongo.filePath); + } else { + backend = new MemoryBackend(); + } + + // Create the local mongo server and replace the connection string + server = new MongoServer(backend); + + // Bind to address of it exists + if (internalMongo.getAddress() != null && internalMongo.getPort() != 0) { + server.bind(internalMongo.getAddress(), internalMongo.getPort()); + } else { + server.bind(); // Binds to random port + } + + return server.getConnectionString(); + } +} diff --git a/src/main/java/emu/nebula/database/GameDatabaseObject.java b/src/main/java/emu/nebula/database/GameDatabaseObject.java new file mode 100644 index 0000000..de98a68 --- /dev/null +++ b/src/main/java/emu/nebula/database/GameDatabaseObject.java @@ -0,0 +1,11 @@ +package emu.nebula.database; + +import emu.nebula.Nebula; + +public interface GameDatabaseObject { + + public default void save() { + Nebula.getGameDatabase().save(this); + } + +} diff --git a/src/main/java/emu/nebula/database/codecs/Int2IntMapCodec.java b/src/main/java/emu/nebula/database/codecs/Int2IntMapCodec.java new file mode 100644 index 0000000..51c4ff5 --- /dev/null +++ b/src/main/java/emu/nebula/database/codecs/Int2IntMapCodec.java @@ -0,0 +1,43 @@ +package emu.nebula.database.codecs; + +import org.bson.BsonReader; +import org.bson.BsonType; +import org.bson.BsonWriter; +import org.bson.codecs.Codec; +import org.bson.codecs.DecoderContext; +import org.bson.codecs.EncoderContext; + +import it.unimi.dsi.fastutil.ints.Int2IntMap; +import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; + +/** + * Custom mongodb codec for encoding/decoding fastutil int2int maps. + */ +public class Int2IntMapCodec implements Codec<Int2IntMap> { + + @Override + public Class<Int2IntMap> getEncoderClass() { + return Int2IntMap.class; + } + + @Override + public void encode(BsonWriter writer, Int2IntMap collection, EncoderContext encoderContext) { + writer.writeStartDocument(); + for (var entry : collection.int2IntEntrySet()) { + writer.writeName(Integer.toString(entry.getIntKey())); + writer.writeInt32(entry.getIntValue()); + } + writer.writeEndDocument(); + } + + @Override + public Int2IntMap decode(BsonReader reader, DecoderContext decoderContext) { + Int2IntMap collection = new Int2IntOpenHashMap(); + reader.readStartDocument(); + while (reader.readBsonType() != BsonType.END_OF_DOCUMENT) { + collection.put(Integer.parseInt(reader.readName()), reader.readInt32()); + } + reader.readEndDocument(); + return collection; + } +} \ No newline at end of file diff --git a/src/main/java/emu/nebula/database/codecs/IntListCodec.java b/src/main/java/emu/nebula/database/codecs/IntListCodec.java new file mode 100644 index 0000000..7b0929f --- /dev/null +++ b/src/main/java/emu/nebula/database/codecs/IntListCodec.java @@ -0,0 +1,42 @@ +package emu.nebula.database.codecs; + +import org.bson.BsonReader; +import org.bson.BsonType; +import org.bson.BsonWriter; +import org.bson.codecs.Codec; +import org.bson.codecs.DecoderContext; +import org.bson.codecs.EncoderContext; + +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; + +/** + * Custom mongodb codec for encoding/decoding fastutil int sets. + */ +public class IntListCodec implements Codec<IntList> { + + @Override + public Class<IntList> getEncoderClass() { + return IntList.class; + } + + @Override + public void encode(BsonWriter writer, IntList collection, EncoderContext encoderContext) { + writer.writeStartArray(); + for (int value : collection) { + writer.writeInt32(value); + } + writer.writeEndArray(); + } + + @Override + public IntList decode(BsonReader reader, DecoderContext decoderContext) { + IntList collection = new IntArrayList(); + reader.readStartArray(); + while (reader.readBsonType() != BsonType.END_OF_DOCUMENT) { + collection.add(reader.readInt32()); + } + reader.readEndArray(); + return collection; + } +} \ No newline at end of file diff --git a/src/main/java/emu/nebula/database/codecs/IntSetCodec.java b/src/main/java/emu/nebula/database/codecs/IntSetCodec.java new file mode 100644 index 0000000..1a39b8c --- /dev/null +++ b/src/main/java/emu/nebula/database/codecs/IntSetCodec.java @@ -0,0 +1,42 @@ +package emu.nebula.database.codecs; + +import org.bson.BsonReader; +import org.bson.BsonType; +import org.bson.BsonWriter; +import org.bson.codecs.Codec; +import org.bson.codecs.DecoderContext; +import org.bson.codecs.EncoderContext; + +import it.unimi.dsi.fastutil.ints.IntOpenHashSet; +import it.unimi.dsi.fastutil.ints.IntSet; + +/** + * Custom mongodb codec for encoding/decoding fastutil int sets. + */ +public class IntSetCodec implements Codec<IntSet> { + + @Override + public Class<IntSet> getEncoderClass() { + return IntSet.class; + } + + @Override + public void encode(BsonWriter writer, IntSet collection, EncoderContext encoderContext) { + writer.writeStartArray(); + for (int value : collection) { + writer.writeInt32(value); + } + writer.writeEndArray(); + } + + @Override + public IntSet decode(BsonReader reader, DecoderContext decoderContext) { + IntSet collection = new IntOpenHashSet(); + reader.readStartArray(); + while (reader.readBsonType() != BsonType.END_OF_DOCUMENT) { + collection.add(reader.readInt32()); + } + reader.readEndArray(); + return collection; + } +} \ No newline at end of file diff --git a/src/main/java/emu/nebula/database/codecs/ItemParamMapCodec.java b/src/main/java/emu/nebula/database/codecs/ItemParamMapCodec.java new file mode 100644 index 0000000..22dee0a --- /dev/null +++ b/src/main/java/emu/nebula/database/codecs/ItemParamMapCodec.java @@ -0,0 +1,42 @@ +package emu.nebula.database.codecs; + +import org.bson.BsonReader; +import org.bson.BsonType; +import org.bson.BsonWriter; +import org.bson.codecs.Codec; +import org.bson.codecs.DecoderContext; +import org.bson.codecs.EncoderContext; + +import emu.nebula.game.inventory.ItemParamMap; + +/** + * Copy of Int2IntMapCodec.java + */ +public class ItemParamMapCodec implements Codec<ItemParamMap> { + + @Override + public Class<ItemParamMap> getEncoderClass() { + return ItemParamMap.class; + } + + @Override + public void encode(BsonWriter writer, ItemParamMap collection, EncoderContext encoderContext) { + writer.writeStartDocument(); + for (var entry : collection.int2IntEntrySet()) { + writer.writeName(Integer.toString(entry.getIntKey())); + writer.writeInt32(entry.getIntValue()); + } + writer.writeEndDocument(); + } + + @Override + public ItemParamMap decode(BsonReader reader, DecoderContext decoderContext) { + ItemParamMap collection = new ItemParamMap(); + reader.readStartDocument(); + while (reader.readBsonType() != BsonType.END_OF_DOCUMENT) { + collection.put(Integer.parseInt(reader.readName()), reader.readInt32()); + } + reader.readEndDocument(); + return collection; + } +} \ No newline at end of file diff --git a/src/main/java/emu/nebula/game/GameContext.java b/src/main/java/emu/nebula/game/GameContext.java new file mode 100644 index 0000000..bbdf441 --- /dev/null +++ b/src/main/java/emu/nebula/game/GameContext.java @@ -0,0 +1,87 @@ +package emu.nebula.game; + +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.TimeUnit; + +import emu.nebula.game.player.PlayerModule; +import emu.nebula.net.GameSession; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; +import lombok.Getter; + +@Getter +public class GameContext { + private final Object2ObjectMap<String, GameSession> sessions; + + // Modules + private final PlayerModule playerModule; + + // Cleanup thread + private final Timer cleanupTimer; + + public GameContext() { + this.sessions = new Object2ObjectOpenHashMap<>(); + this.playerModule = new PlayerModule(this); + + this.cleanupTimer = new Timer(); + this.cleanupTimer.scheduleAtFixedRate(new CleanupTask(this), 0, TimeUnit.SECONDS.toMillis(60)); + } + + public synchronized GameSession getSessionByToken(String token) { + return sessions.get(token); + } + + public synchronized void addSession(GameSession session) { + this.sessions.put(session.getToken(), session); + } + + public synchronized void generateSessionToken(GameSession session) { + // Remove token + if (session.getToken() != null) { + this.sessions.remove(session.getToken()); + } + + // Generate token + String token = null; + + do { + token = session.generateToken(); + } while (this.getSessions().containsKey(token)); + + // Register session + this.sessions.put(session.getToken(), session); + } + + // TODO add timeout to config + public synchronized void cleanupInactiveSessions() { + var it = this.getSessions().entrySet().iterator(); + long timeout = System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(600); // 10 minutes + + while (it.hasNext()) { + var session = it.next().getValue(); + + if (timeout > session.getLastActiveTime()) { + // Remove from session map + it.remove(); + + // Clear player + session.clearPlayer(this); + } + } + } + + @Getter + public static class CleanupTask extends TimerTask { + private GameContext gameContext; + + public CleanupTask(GameContext gameContext) { + this.gameContext = gameContext; + } + + @Override + public void run() { + this.getGameContext().cleanupInactiveSessions(); + } + } +} diff --git a/src/main/java/emu/nebula/game/GameContextModule.java b/src/main/java/emu/nebula/game/GameContextModule.java new file mode 100644 index 0000000..f261b59 --- /dev/null +++ b/src/main/java/emu/nebula/game/GameContextModule.java @@ -0,0 +1,13 @@ +package emu.nebula.game; + +public abstract class GameContextModule { + private transient GameContext context; + + public GameContextModule(GameContext player) { + this.context = player; + } + + public GameContext getGameContext() { + return context; + } +} diff --git a/src/main/java/emu/nebula/game/account/Account.java b/src/main/java/emu/nebula/game/account/Account.java new file mode 100644 index 0000000..3a344ef --- /dev/null +++ b/src/main/java/emu/nebula/game/account/Account.java @@ -0,0 +1,167 @@ +package emu.nebula.game.account; + +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import dev.morphia.annotations.Indexed; +import emu.nebula.Nebula; +import emu.nebula.database.AccountDatabaseOnly; +import emu.nebula.util.Snowflake; +import lombok.Getter; + +@Getter +@AccountDatabaseOnly +@Entity(value = "accounts", useDiscriminator = false) +public class Account { + @Id private String uid; + + @Indexed + private String email; + private String code; + + private String nickname; + private String picture; + + @Indexed private String loginToken; + @Indexed private String gameToken; + + private Set<String> permissions; + + private int reservedPlayerUid; + private long createdAt; + + @Deprecated + public Account() { + // Morphia only + } + + public Account(String email, String password, int reservedUid) { + this.uid = Long.toString(Snowflake.newUid()); + this.email = email; + this.nickname = ""; + this.picture = ""; + this.permissions = new HashSet<>(); + this.reservedPlayerUid = reservedUid; + this.createdAt = System.currentTimeMillis() / 1000; + } + + public boolean verifyCode(String code) { + // TODO + return true; + } + + public void setNickname(String value) { + this.nickname = value; + } + + // Tokens + + public String generateLoginToken() { + this.loginToken = AccountHelper.createSessionKey(this.getUid()); + this.save(); + return this.loginToken; + } + + public String generateGameToken() { + this.gameToken = AccountHelper.createSessionKey(this.getUid()); + this.save(); + return this.gameToken; + } + + // Permissions + + public Set<String> getPermissions() { + if (this.permissions == null) { + this.permissions = new HashSet<>(); + this.save(); + } + return this.permissions; + } + + public boolean addPermission(String permission) { + if (this.getPermissions().contains(permission)) { + return false; + } + this.getPermissions().add(permission); + this.save(); + return true; + } + + public static boolean permissionMatchesWildcard(String wildcard, String[] permissionParts) { + String[] wildcardParts = wildcard.split("\\."); + if (permissionParts.length < wildcardParts.length) { // A longer wildcard can never match a shorter permission + return false; + } + + for (int i = 0; i < wildcardParts.length; i++) { + switch (wildcardParts[i]) { + case "**": // Recursing match + return true; + case "*": // Match only one layer + if (i >= (permissionParts.length-1)) { + return true; + } + break; + default: // This layer isn't a wildcard, it needs to match exactly + if (!wildcardParts[i].equals(permissionParts[i])) { + return false; + } + } + } + // At this point the wildcard will have matched every layer, but if it is shorter then the permission then this is not a match at this point (no **). + return wildcardParts.length == permissionParts.length; + } + + public boolean hasPermission(String permission) { + // Skip if permission isnt required + if (permission.isEmpty()) { + return true; + } + + // Default permissions + var defaultPermissions = Nebula.getConfig().getServerOptions().getDefaultPermissions(); + + if (defaultPermissions.contains("*")) { + return true; + } + + // Add default permissions if it doesn't exist + List<String> permissions = Stream.of(this.getPermissions(), defaultPermissions) + .flatMap(Collection::stream) + .distinct().toList(); + + if (permissions.contains(permission)) { + return true; + } + + String[] permissionParts = permission.split("\\."); + for (String p : permissions) { + if (p.startsWith("-") && permissionMatchesWildcard(p.substring(1), permissionParts)) return false; + if (permissionMatchesWildcard(p, permissionParts)) return true; + } + + return permissions.contains("*"); + } + + public boolean removePermission(String permission) { + boolean res = this.getPermissions().remove(permission); + if (res) this.save(); + return res; + } + + public void clearPermission() { + this.getPermissions().clear(); + this.save(); + } + + // Database + + public void save() { + Nebula.getAccountDatabase().save(this); + } +} diff --git a/src/main/java/emu/nebula/game/account/AccountHelper.java b/src/main/java/emu/nebula/game/account/AccountHelper.java new file mode 100644 index 0000000..6d6d25a --- /dev/null +++ b/src/main/java/emu/nebula/game/account/AccountHelper.java @@ -0,0 +1,71 @@ +package emu.nebula.game.account; + +import java.security.MessageDigest; +import java.security.SecureRandom; +import java.util.Base64; + +import emu.nebula.Nebula; + +/** + * Helper class for handling account related stuff + */ +public class AccountHelper { + + public static Account createAccount(String email, String password, int reservedUid) { + Account account = Nebula.getAccountDatabase().getObjectByField(Account.class, "email", email); + + if (account != null) { + return null; + } + + account = new Account(email, password, reservedUid); + account.save(); + + return account; + } + + public static Account getAccountByEmail(String email) { + if (email == null || email.isEmpty()) { + return null; + } + + return Nebula.getAccountDatabase().getObjectByField(Account.class, "email", email); + } + + public static Account getAccountByLoginToken(String token) { + if (token == null || token.isEmpty()) { + return null; + } + + return Nebula.getAccountDatabase().getObjectByField(Account.class, "loginToken", token); + } + + public static boolean deleteAccount(String username) { + Account account = Nebula.getAccountDatabase().getObjectByField(Account.class, "username", username); + + if (account == null) { + return false; + } + + // Delete the account first + return Nebula.getAccountDatabase().delete(account); + } + + // Simple way to create a unique session key + public static String createSessionKey(String accountUid) { + byte[] random = new byte[64]; + + SecureRandom secureRandom = new SecureRandom(); + secureRandom.nextBytes(random); + + String temp = accountUid + "." + System.currentTimeMillis() + "." + secureRandom.toString(); + + try { + MessageDigest md = MessageDigest.getInstance("SHA-512"); + byte[] bytes = md.digest(temp.getBytes()); + return Base64.getEncoder().encodeToString(bytes); + } catch (Exception e) { + return Base64.getEncoder().encodeToString(temp.getBytes()); + } + } +} diff --git a/src/main/java/emu/nebula/game/character/Character.java b/src/main/java/emu/nebula/game/character/Character.java new file mode 100644 index 0000000..0346d84 --- /dev/null +++ b/src/main/java/emu/nebula/game/character/Character.java @@ -0,0 +1,283 @@ +package emu.nebula.game.character; + +import org.bson.types.ObjectId; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import dev.morphia.annotations.Indexed; + +import emu.nebula.GameConstants; +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.data.resources.CharacterDef; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.inventory.ItemParamMap; +import emu.nebula.game.player.Player; +import emu.nebula.game.player.PlayerChangeInfo; +import emu.nebula.proto.Public.Char; +import emu.nebula.proto.Public.CharGemPreset; +import emu.nebula.proto.Public.CharGemSlot; +import emu.nebula.proto.PublicStarTower.StarTowerChar; +import emu.nebula.proto.PublicStarTower.StarTowerCharGem; + +import lombok.Getter; + +@Getter +@Entity(value = "characters", useDiscriminator = false) +public class Character implements GameDatabaseObject { + @Id + private ObjectId uid; + @Indexed + private int playerUid; + + private transient CharacterDef data; + private transient Player player; + + private int charId; + private int advance; + private int level; + private int exp; + private int skin; + private int[] skills; + private byte[] talents; + + private long createTime; + + @Deprecated // Morphia only! + public Character() { + + } + + public Character(Player player, int charId) { + this(player, GameData.getCharacterDataTable().get(charId)); + } + + public Character(Player player, CharacterDef data) { + this.player = player; + this.playerUid = player.getUid(); + this.charId = data.getId(); + this.data = data; + this.level = 1; + this.skin = data.getDefaultSkinId(); + this.skills = new int[] {1, 1, 1, 1, 1}; + this.talents = new byte[8]; + this.createTime = Nebula.getCurrentTime(); + } + + public void setPlayer(Player player) { + this.player = player; + } + + public void setData(CharacterDef data) { + if (this.data == null && data.getId() == this.getCharId()) { + this.data = data; + } + } + + public int getMaxGainableExp() { + if (this.getLevel() >= this.getMaxLevel()) { + return 0; + } + + int maxLevel = this.getMaxLevel(); + int max = 0; + + for (int i = this.getLevel() + 1; i <= maxLevel; i++) { + var data = GameData.getCharacterUpgradeDataTable().get(i); + + if (data != null) { + max += data.getExp(); + } + } + + return Math.max(max - this.getExp(), 0); + } + + public int getMaxExp() { + if (this.getLevel() >= this.getMaxLevel()) { + return 0; + } + + var data = GameData.getCharacterUpgradeDataTable().get(this.level + 1); + return data != null ? data.getExp() : 0; + } + + public int getMaxLevel() { + return 10 + (this.getAdvance() * 10); + } + + public void addExp(int amount) { + // Setup + int expRequired = this.getMaxExp(); + + // Add exp + this.exp += amount; + + // Check for level ups + while (this.exp >= expRequired && expRequired > 0) { + this.level += 1; + this.exp -= expRequired; + + expRequired = this.getMaxExp(); + } + + // Clamp exp + if (this.getLevel() >= this.getMaxLevel()) { + this.exp = 0; + } + + // Save to database + this.save(); + } + + // Handlers + + public PlayerChangeInfo upgrade(ItemParamMap params) { + // Calculate exp gained + int exp = 0; + + // Check if item is an exp item + for (var entry : params.getEntrySet()) { + var data = GameData.getCharItemExpDataTable().get(entry.getIntKey()); + if (data == null) return null; + + exp += data.getExpValue() * entry.getIntValue(); + } + + // Clamp exp gain + exp = Math.min(this.getMaxGainableExp(), exp); + + // Calculate gold required + params.add(GameConstants.GOLD_ITEM_ID, (int) Math.ceil(exp * 0.15D)); + + // Verify that the player has the items + if (!this.getPlayer().getInventory().verifyItems(params)) { + return null; + } + + // Remove items + var changes = this.getPlayer().getInventory().removeItems(params, null); + + // Add exp + this.addExp(exp); + + // Success + return changes.setSuccess(true); + } + + public PlayerChangeInfo advance() { + // TODO check player level to make sure they can advance this character + + // Get advance data + int advanceId = (this.getData().getAdvanceGroup() * 100) + (this.advance + 1); + var data = GameData.getCharacterAdvanceDataTable().get(advanceId); + + if (data == null) { + return null; + } + + // Verify that the player has the items + if (!this.getPlayer().getInventory().verifyItems(data.getMaterials())) { + return null; + } + + // Remove items + var changes = this.getPlayer().getInventory().removeItems(data.getMaterials(), null); + + // Add advance level + this.advance++; + + // Save to database + this.save(); + + // Success + return changes.setSuccess(true); + } + + public PlayerChangeInfo upgradeSkill(int index) { + // TODO check player level to make sure they can advance this character + + // Sanity check + if (index < 0 || index >= this.skills.length) { + return null; + } + + // Get advance data + int upgradeId = (this.getData().getSkillsUpgradeGroup(index) * 100) + (this.skills[index] + 1); + var data = GameData.getCharacterSkillUpgradeDataTable().get(upgradeId); + + if (data == null) { + return null; + } + + // Verify that the player has the items + if (!this.getPlayer().getInventory().verifyItems(data.getMaterials())) { + return null; + } + + // Remove items + var changes = this.getPlayer().getInventory().removeItems(data.getMaterials(), null); + + // Add skill level + this.skills[index]++; + + // Save to database + this.save(); + + // Success + return changes.setSuccess(true); + } + + // Proto + + public Char toProto() { + var proto = Char.newInstance() + .setTid(this.getCharId()) + .setLevel(this.getLevel()) + .setSkin(this.getSkin()) + .setAdvance(this.getAdvance()) + .setTalentNodes(this.getTalents()) + .addAllSkillLvs(this.getSkills()) + .setCreateTime(this.getCreateTime()); + + var gemPresets = proto.getMutableCharGemPresets() + .getMutableCharGemPresets(); + + for (int i = 0; i < 3; i++) { + var preset = CharGemPreset.newInstance() + .addAllSlotGem(-1, -1, -1); + + gemPresets.add(preset); + } + + for (int i = 1; i <= 3; i++) { + var slot = CharGemSlot.newInstance() + .setId(i); + + proto.addCharGemSlots(slot); + } + + proto.getMutableAffinityQuests(); + + return proto; + } + + public StarTowerChar toStarTowerProto() { + var proto = StarTowerChar.newInstance() + .setId(this.getCharId()) + .setAdvance(this.getAdvance()) + .setLevel(this.getLevel()) + .setTalentNodes(this.getTalents()) + .addAllSkillLvs(this.getSkills()); + + for (int i = 1; i <= 3; i++) { + var slot = StarTowerCharGem.newInstance() + .setSlotId(i) + .addAllAttributes(new int[] {0, 0, 0, 0}); + + proto.addGems(slot); + } + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/character/CharacterStorage.java b/src/main/java/emu/nebula/game/character/CharacterStorage.java new file mode 100644 index 0000000..ba1945e --- /dev/null +++ b/src/main/java/emu/nebula/game/character/CharacterStorage.java @@ -0,0 +1,151 @@ +package emu.nebula.game.character; + +import java.util.Collection; + +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.data.resources.CharacterDef; +import emu.nebula.data.resources.DiscDef; +import emu.nebula.game.player.PlayerManager; +import emu.nebula.game.player.Player; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import lombok.Getter; + +@Getter +public class CharacterStorage extends PlayerManager { + private final Int2ObjectMap<Character> characters; + private final Int2ObjectMap<GameDisc> discs; + + public CharacterStorage(Player player) { + super(player); + + this.characters = new Int2ObjectOpenHashMap<>(); + this.discs = new Int2ObjectOpenHashMap<>(); + } + + // Characters + + public Character getCharacterById(int id) { + if (id <= 0) { + return null; + } + + return this.characters.get(id); + } + + public boolean hasCharacter(int id) { + return this.characters.containsKey(id); + } + + public Character addCharacter(int charId) { + // Sanity check to make sure we dont have this character already + if (this.hasCharacter(charId)) { + return null; + } + + return this.addCharacter(GameData.getCharacterDataTable().get(charId)); + } + + private Character addCharacter(CharacterDef data) { + // Sanity check to make sure we dont have this character already + if (this.hasCharacter(data.getId())) { + return null; + } + + // Create character + var character = new Character(this.getPlayer(), data); + + // Save to database + character.save(); + + // Add to characters + this.characters.put(character.getCharId(), character); + return character; + } + + public Collection<Character> getCharacterCollection() { + return this.getCharacters().values(); + } + + // Discs + + public GameDisc getDiscById(int id) { + if (id <= 0) { + return null; + } + + return this.discs.get(id); + } + + public boolean hasDisc(int id) { + return this.discs.containsKey(id); + } + + public GameDisc addDisc(int discId) { + // Sanity check to make sure we dont have this character already + if (this.hasDisc(discId)) { + return null; + } + + return this.addDisc(GameData.getDiscDataTable().get(discId)); + } + + private GameDisc addDisc(DiscDef data) { + // Sanity check to make sure we dont have this character already + if (this.hasDisc(data.getId())) { + return null; + } + + // Create disc + var disc = new GameDisc(this.getPlayer(), data); + + // Save to database + disc.save(); + + // Add to discs + this.discs.put(disc.getDiscId(), disc); + return disc; + } + + public Collection<GameDisc> getDiscCollection() { + return this.getDiscs().values(); + } + + + // Database + + public void loadFromDatabase() { + var db = Nebula.getGameDatabase(); + + db.getObjects(Character.class, "playerUid", getPlayerUid()).forEach(character -> { + // Get data + var data = GameData.getCharacterDataTable().get(character.getCharId()); + + // Validate + if (data == null) { + return; + } + + character.setPlayer(this.getPlayer()); + character.setData(data); + + // Add to characters + this.characters.put(character.getCharId(), character); + }); + + + + db.getObjects(GameDisc.class, "playerUid", getPlayerUid()).forEach(disc -> { + // Get data + var data = GameData.getDiscDataTable().get(disc.getDiscId()); + if (data == null) return; + + disc.setPlayer(this.getPlayer()); + disc.setData(data); + + // Add + this.discs.put(disc.getDiscId(), disc); + }); + } +} diff --git a/src/main/java/emu/nebula/game/character/GameDisc.java b/src/main/java/emu/nebula/game/character/GameDisc.java new file mode 100644 index 0000000..a64d682 --- /dev/null +++ b/src/main/java/emu/nebula/game/character/GameDisc.java @@ -0,0 +1,216 @@ +package emu.nebula.game.character; + +import org.bson.types.ObjectId; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import dev.morphia.annotations.Indexed; +import emu.nebula.GameConstants; +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.data.resources.DiscDef; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.inventory.ItemParamMap; +import emu.nebula.game.player.Player; +import emu.nebula.game.player.PlayerChangeInfo; +import emu.nebula.proto.Public.Disc; +import emu.nebula.proto.PublicStarTower.StarTowerDisc; + +import lombok.Getter; + +@Getter +@Entity(value = "discs", useDiscriminator = false) +public class GameDisc implements GameDatabaseObject { + @Id + private ObjectId uid; + @Indexed + private int playerUid; + + private transient DiscDef data; + private transient Player player; + + private int discId; + private int level; + private int exp; + private int phase; + private int star; + + private long createTime; + + @Deprecated // Morphia only! + public GameDisc() { + + } + + public GameDisc(Player player, int discId) { + this(player, GameData.getDiscDataTable().get(discId)); + } + + public GameDisc(Player player, DiscDef data) { + this.player = player; + this.playerUid = player.getUid(); + this.data = data; + this.discId = data.getId(); + this.level = 1; + this.createTime = Nebula.getCurrentTime(); + } + + public void setPlayer(Player player) { + this.player = player; + } + + public void setData(DiscDef data) { + if (this.data == null && data.getId() == this.getDiscId()) { + this.data = data; + } + } + + public int getMaxGainableExp() { + if (this.getLevel() >= this.getMaxLevel()) { + return 0; + } + + int maxLevel = this.getMaxLevel(); + int max = 0; + + for (int i = this.getLevel() + 1; i <= maxLevel; i++) { + int dataId = (this.getData().getStrengthenGroupId() * 1000) + i; + var data = GameData.getDiscStrengthenDataTable().get(dataId); + + if (data != null) { + max += data.getExp(); + } + } + + return Math.max(max - this.getExp(), 0); + } + + public int getMaxExp() { + if (this.getLevel() >= this.getMaxLevel()) { + return 0; + } + + int dataId = (this.getData().getStrengthenGroupId() * 1000) + (this.level + 1); + var data = GameData.getDiscStrengthenDataTable().get(dataId); + return data != null ? data.getExp() : 0; + } + + public int getMaxLevel() { + return 10 + (this.getPhase() * 10); + } + + public void addExp(int amount) { + // Setup + int expRequired = this.getMaxExp(); + + // Add exp + this.exp += amount; + + // Check for level ups + while (this.exp >= expRequired && expRequired > 0) { + this.level += 1; + this.exp -= expRequired; + + expRequired = this.getMaxExp(); + } + + // Clamp exp + if (this.getLevel() >= this.getMaxLevel()) { + this.exp = 0; + } + + // Save to database + this.save(); + } + + // Handlers + + public PlayerChangeInfo upgrade(ItemParamMap params) { + // Calculate exp gained + int exp = 0; + + // Check if item is an exp item + for (var entry : params.getEntrySet()) { + var data = GameData.getDiscItemExpDataTable().get(entry.getIntKey()); + if (data == null) return null; + + exp += data.getExp() * entry.getIntValue(); + } + + // Clamp exp gain + exp = Math.min(this.getMaxGainableExp(), exp); + + // Calculate gold required + params.add(GameConstants.GOLD_ITEM_ID, (int) Math.ceil(exp * 0.25D)); + + // Verify that the player has the items + if (!this.getPlayer().getInventory().verifyItems(params)) { + return null; + } + + // Create change info + var changes = new PlayerChangeInfo(); + + // Remove items + this.getPlayer().getInventory().removeItems(params, changes); + + // Add exp + this.addExp(exp); + + // Success + return changes.setSuccess(true); + } + + public PlayerChangeInfo promote() { + // TODO check player level to make sure they can advance this disc + + // Get promote data + int phaseId = (this.getData().getPromoteGroupId() * 1000) + (this.phase + 1); + var data = GameData.getDiscPromoteDataTable().get(phaseId); + + if (data == null) { + return null; + } + + // Verify that the player has the items + if (!this.getPlayer().getInventory().verifyItems(data.getMaterials())) { + return null; + } + + // Remove items + var changes = this.getPlayer().getInventory().removeItems(data.getMaterials(), null); + + // Add phase level + this.phase++; + + // Save to database + this.save(); + + // Success + return changes.setSuccess(true); + } + + // Proto + + public Disc toProto() { + var proto = Disc.newInstance() + .setId(this.getDiscId()) + .setLevel(this.getLevel()) + .setExp(this.getExp()) + .setPhase(this.getPhase()) + .setStar(this.getStar()) + .setCreateTime(this.getCreateTime()); + + return proto; + } + + public StarTowerDisc toStarTowerProto() { + var proto = StarTowerDisc.newInstance() + .setId(this.getDiscId()) + .setLevel(this.getLevel()) + .setPhase(this.getPhase()) + .setStar(this.getStar()); + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/formation/Formation.java b/src/main/java/emu/nebula/game/formation/Formation.java new file mode 100644 index 0000000..71f1341 --- /dev/null +++ b/src/main/java/emu/nebula/game/formation/Formation.java @@ -0,0 +1,57 @@ +package emu.nebula.game.formation; + +import dev.morphia.annotations.Entity; +import emu.nebula.proto.Public.FormationInfo; +import lombok.Getter; + +@Getter +@Entity(useDiscriminator = false) +public class Formation { + private int num; + private int[] charIds; + private int[] discIds; + + @Deprecated + public Formation() { + + } + + public Formation(int num) { + this.num = num; + this.charIds = new int[3]; + this.discIds = new int[6]; + } + + public Formation(FormationInfo formation) { + this.num = formation.getNumber(); + this.charIds = formation.getCharIds().toArray(); + this.discIds = formation.getDiscIds().toArray(); + } + + public int getCharIdAt(int i) { + if (i < 0 || i >= this.charIds.length) { + return -1; + } + + return this.charIds[i]; + } + + public int getDiscIdAt(int i) { + if (i < 0 || i >= this.discIds.length) { + return -1; + } + + return this.discIds[i]; + } + + // Proto + + public FormationInfo toProto() { + var proto = FormationInfo.newInstance() + .setNumber(this.getNum()) + .addAllCharIds(this.getCharIds()) + .addAllDiscIds(this.getDiscIds()); + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/formation/FormationManager.java b/src/main/java/emu/nebula/game/formation/FormationManager.java new file mode 100644 index 0000000..c98772a --- /dev/null +++ b/src/main/java/emu/nebula/game/formation/FormationManager.java @@ -0,0 +1,82 @@ +package emu.nebula.game.formation; + +import emu.nebula.game.player.PlayerManager; + +import java.util.HashMap; +import java.util.Map; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import emu.nebula.GameConstants; +import emu.nebula.Nebula; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.player.Player; +import emu.nebula.proto.Public.FormationInfo; +import emu.nebula.proto.Public.TowerFormation; +import lombok.Getter; + +@Getter +@Entity(value = "formations", useDiscriminator = false) +public class FormationManager extends PlayerManager implements GameDatabaseObject { + @Id + private int uid; + + private Map<Integer, Formation> formations; + + @Deprecated // Morphia only + public FormationManager() { + + } + + public FormationManager(Player player) { + super(player); + this.uid = player.getUid(); + this.formations = new HashMap<>(); + + this.save(); + } + + public Formation getFormationById(int num) { + return this.formations.get(num); + } + + public boolean updateFormation(FormationInfo info) { + // Sanity check + if (info.getNumber() < 1 || info.getNumber() > GameConstants.MAX_FORMATIONS) { + return false; + } + + // More sanity + if (info.getCharIds().length() < 1 || info.getCharIds().length() > 3) { + return false; + } + + if (info.getDiscIds().length() < 3 || info.getDiscIds().length() > 6) { + return false; + } + + // Validate formation to make sure we have all the chars and discs + // TODO + + // Create formation + var formation = new Formation(info); + + // Add to formations map + this.formations.put(formation.getNum(), formation); + + // Save to db + Nebula.getGameDatabase().update(this, this.getPlayerUid(), "formations." + formation.getNum(), formation, true); + + // Success + return true; + } + + // Proto + + public TowerFormation toProto() { + var proto = TowerFormation.newInstance(); + + return proto; + } + +} diff --git a/src/main/java/emu/nebula/game/inventory/GameItem.java b/src/main/java/emu/nebula/game/inventory/GameItem.java new file mode 100644 index 0000000..7edbbb1 --- /dev/null +++ b/src/main/java/emu/nebula/game/inventory/GameItem.java @@ -0,0 +1,65 @@ +package emu.nebula.game.inventory; + +import org.bson.types.ObjectId; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import dev.morphia.annotations.Indexed; +import emu.nebula.Nebula; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.player.Player; +import emu.nebula.proto.Public.Item; +import emu.nebula.util.Utils; +import lombok.Getter; + +@Getter +@Entity(value = "items", useDiscriminator = false) +public class GameItem implements GameDatabaseObject { + @Id + private ObjectId uid; + @Indexed + private int playerUid; + + private int itemId; + private int count; + + @Deprecated + public GameItem() { + + } + + public GameItem(Player player, int id, int count) { + this.playerUid = player.getUid(); + this.itemId = id; + this.count = count; + } + + public int add(int amount) { + int oldCount = this.count; + this.count = Utils.safeAdd(this.count, amount, Integer.MAX_VALUE, 0); + return this.count - oldCount; + } + + // Database + + @Override + public void save() { + if (this.getCount() <= 0) { + if (this.getUid() != null) { + Nebula.getGameDatabase().delete(this); + } + } else { + Nebula.getGameDatabase().save(this); + } + } + + // Proto + + public Item toProto() { + var proto = Item.newInstance() + .setTid(this.getItemId()) + .setQty(this.getCount()); + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/inventory/GameResource.java b/src/main/java/emu/nebula/game/inventory/GameResource.java new file mode 100644 index 0000000..2568709 --- /dev/null +++ b/src/main/java/emu/nebula/game/inventory/GameResource.java @@ -0,0 +1,63 @@ +package emu.nebula.game.inventory; + +import org.bson.types.ObjectId; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import dev.morphia.annotations.Indexed; +import emu.nebula.Nebula; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.player.Player; +import emu.nebula.proto.Public.Res; +import emu.nebula.util.Utils; +import lombok.Getter; + +@Getter +@Entity(value = "resources", useDiscriminator = false) +public class GameResource implements GameDatabaseObject { + @Id + private ObjectId uid; + @Indexed + private int playerUid; + + public int resourceId; + public int count; + + @Deprecated // Morphia only + public GameResource() { + + } + + public GameResource(Player player, int id, int count) { + this.playerUid = player.getUid(); + this.resourceId = id; + this.count = count; + } + + public int add(int amount) { + int oldCount = this.count; + this.count = Utils.safeAdd(this.count, amount, Integer.MAX_VALUE, 0); + return this.count - oldCount; + } + + @Override + public void save() { + if (this.getCount() <= 0) { + if (this.getUid() != null) { + Nebula.getGameDatabase().delete(this); + } + } else { + Nebula.getGameDatabase().save(this); + } + } + + // Proto + + public Res toProto() { + var proto = Res.newInstance() + .setTid(this.getResourceId()) + .setQty(this.getCount()); + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/inventory/Inventory.java b/src/main/java/emu/nebula/game/inventory/Inventory.java new file mode 100644 index 0000000..b2682e1 --- /dev/null +++ b/src/main/java/emu/nebula/game/inventory/Inventory.java @@ -0,0 +1,310 @@ +package emu.nebula.game.inventory; + +import java.util.List; + +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.game.player.PlayerManager; +import emu.nebula.proto.Public.Item; +import emu.nebula.proto.Public.Res; +import emu.nebula.game.player.Player; +import emu.nebula.game.player.PlayerChangeInfo; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import lombok.Getter; + +@Getter +public class Inventory extends PlayerManager { + private final Int2ObjectMap<GameResource> resources; + private final Int2ObjectMap<GameItem> items; + + public Inventory(Player player) { + super(player); + + this.resources = new Int2ObjectOpenHashMap<>(); + this.items = new Int2ObjectOpenHashMap<>(); + } + + // Resources + + public synchronized int getResourceCount(int id) { + var res = this.resources.get(id); + return res != null ? res.getCount() : 0; + } + + // Items + + public synchronized int getItemCount(int id) { + var item = this.getItems().get(id); + return item != null ? item.getCount() : 0; + } + + // + + public synchronized PlayerChangeInfo addItem(int id, int count, PlayerChangeInfo changes) { + // Changes + if (changes == null) { + changes = new PlayerChangeInfo(); + } + + // Sanity + if (count == 0) { + return changes; + } + + // Get game data + var data = GameData.getItemDataTable().get(id); + if (data == null) { + return changes; + } + + // Set amount + int amount = count; + + // Add item + switch (data.getItemType()) { + case Res -> { + var res = this.resources.get(id); + int diff = 0; + + if (amount > 0) { + // Add resource + if (res == null) { + res = new GameResource(this.getPlayer(), id, amount); + this.resources.put(res.getResourceId(), res); + + diff = amount; + } else { + diff = res.add(amount); + } + + res.save(); + } else { + // Remove resource + if (res == null) { + break; + } + + diff = res.add(amount); + res.save(); + + if (res.getCount() < 0) { + this.resources.remove(id); + } + } + + if (diff != 0) { + var change = Res.newInstance() + .setTid(id) + .setQty(diff); + + changes.add(change); + } + } + case Item -> { + var item = this.items.get(id); + int diff = 0; + + if (amount > 0) { + // Add resource + if (item == null) { + item = new GameItem(this.getPlayer(), id, amount); + this.items.put(item.getItemId(), item); + + diff = amount; + } else { + diff = item.add(amount); + } + + item.save(); + } else { + // Remove resource + if (item == null) { + break; + } + + diff = item.add(amount); + item.save(); + + if (item.getCount() < 0) { + this.resources.remove(id); + } + } + + if (diff != 0) { + var change = Item.newInstance() + .setTid(id) + .setQty(diff); + + changes.add(change); + } + } + case Disc -> { + if (amount <= 0) { + break; + } + + var disc = getPlayer().getCharacters().addDisc(id); + + if (disc != null) { + changes.add(disc.toProto()); + } + } + case Char -> { + if (amount <= 0) { + break; + } + + var character = getPlayer().getCharacters().addCharacter(id); + + if (character != null) { + changes.add(character.toProto()); + } + } + case WorldRankExp -> { + this.getPlayer().addExp(amount, changes); + } + default -> { + // Not implemented + } + } + + // + return changes; + } + + @Deprecated + public synchronized PlayerChangeInfo addItems(List<ItemParam> params, PlayerChangeInfo changes) { + // Changes + if (changes == null) { + changes = new PlayerChangeInfo(); + } + + for (ItemParam param : params) { + this.addItem(param.getId(), param.getCount(), changes); + } + + return changes; + } + + public synchronized PlayerChangeInfo addItems(ItemParamMap params) { + return this.addItems(params, null); + } + + public synchronized PlayerChangeInfo addItems(ItemParamMap params, PlayerChangeInfo changes) { + // Changes + if (changes == null) { + changes = new PlayerChangeInfo(); + } + + for (var param : params.getEntrySet()) { + this.addItem(param.getIntKey(), param.getIntValue(), changes); + } + + return changes; + } + + public synchronized PlayerChangeInfo removeItem(int id, int count, PlayerChangeInfo changes) { + if (count > 0) { + count = -count; + } + + return this.addItem(id, count, changes); + } + + public synchronized PlayerChangeInfo removeItems(ItemParamMap params) { + return this.removeItems(params, null); + } + + public synchronized PlayerChangeInfo removeItems(ItemParamMap params, PlayerChangeInfo changes) { + // Changes + if (changes == null) { + changes = new PlayerChangeInfo(); + } + + for (var param : params.getEntrySet()) { + this.removeItem(param.getIntKey(), param.getIntValue(), changes); + } + + return changes; + } + + /** + * Checks if the player has enough quanity of this item + */ + public synchronized boolean verifyItem(int id, int count) { + // Sanity check + if (count == 0) { + return true; + } else if (count < 0) { + // Return false if we are trying to verify negative numbers + return false; + } + + // Get game data + var data = GameData.getItemDataTable().get(id); + if (data == null) { + return false; + } + + boolean result = switch (data.getItemType()) { + case Res -> { + yield this.getResourceCount(id) >= count; + } + case Item -> { + yield this.getItemCount(id) >= count; + } + case Disc -> { + yield getPlayer().getCharacters().hasDisc(id); + } + case Char -> { + yield getPlayer().getCharacters().hasCharacter(id); + } + default -> { + // Not implemented + yield false; + } + }; + + // + return result; + } + + public synchronized boolean verifyItems(ItemParamMap params) { + boolean hasItems = true; + + for (var param : params.getEntrySet()) { + hasItems = this.verifyItem(param.getIntKey(), param.getIntValue()); + + if (!hasItems) { + return hasItems; + } + } + + return hasItems; + } + + // Database + + public void loadFromDatabase() { + var db = Nebula.getGameDatabase(); + + db.getObjects(GameItem.class, "playerUid", getPlayerUid()).forEach(item -> { + // Get data + var data = GameData.getItemDataTable().get(item.getItemId()); + if (data == null) return; + + // Add + this.items.put(item.getItemId(), item); + }); + + db.getObjects(GameResource.class, "playerUid", getPlayerUid()).forEach(res -> { + // Get data + var data = GameData.getItemDataTable().get(res.getResourceId()); + if (data == null) return; + + // Add + this.resources.put(res.getResourceId(), res); + }); + } +} diff --git a/src/main/java/emu/nebula/game/inventory/ItemParam.java b/src/main/java/emu/nebula/game/inventory/ItemParam.java new file mode 100644 index 0000000..63c9783 --- /dev/null +++ b/src/main/java/emu/nebula/game/inventory/ItemParam.java @@ -0,0 +1,30 @@ +package emu.nebula.game.inventory; + +import dev.morphia.annotations.Entity; +import emu.nebula.proto.Public.ItemTpl; +import lombok.Getter; + +@Getter +@Entity(useDiscriminator = false) +public class ItemParam { + public int id; + public int count; + + @Deprecated // Morphia only + public ItemParam() { + + } + + public ItemParam(int id, int count) { + this.id = id; + this.count = count; + } + + public ItemTpl toProto() { + var proto = ItemTpl.newInstance() + .setTid(this.getId()) + .setQty(this.getCount()); + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/inventory/ItemParamMap.java b/src/main/java/emu/nebula/game/inventory/ItemParamMap.java new file mode 100644 index 0000000..caca6be --- /dev/null +++ b/src/main/java/emu/nebula/game/inventory/ItemParamMap.java @@ -0,0 +1,100 @@ +package emu.nebula.game.inventory; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Stream; + +import emu.nebula.proto.Public.ItemInfo; +import emu.nebula.proto.Public.ItemTpl; +import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; +import us.hebi.quickbuf.RepeatedMessage; + +public class ItemParamMap extends Int2IntOpenHashMap { + private static final long serialVersionUID = -4186524272780523459L; + + public FastEntrySet entries() { + return this.int2IntEntrySet(); + } + + @Override @Deprecated + public int addTo(int itemId, int count) { + return this.add(itemId, count); + } + + public int add(int itemId, int count) { + if (count == 0) { + return 0; + } + + return super.addTo(itemId, count); + } + + /** + * Adds all item params from the other map to this one + * @param map The other item param map + */ + public void add(ItemParamMap map) { + for (var entry : map.entries()) { + this.add(entry.getIntKey(), entry.getIntValue()); + } + } + + /** + * Returns a new ItemParamMap with item amounts multiplied + * @param mult Value to multiply all item amounts in this map by + * @return + */ + public ItemParamMap mulitply(int multiplier) { + var params = new ItemParamMap(); + + for (var entry : this.int2IntEntrySet()) { + params.put(entry.getIntKey(), entry.getIntValue() * multiplier); + } + + return params; + } + + // + + public FastEntrySet getEntrySet() { + return this.int2IntEntrySet(); + } + + public List<ItemParam> toList() { + List<ItemParam> list = new ArrayList<>(); + + for (var entry : this.int2IntEntrySet()) { + list.add(new ItemParam(entry.getIntKey(), entry.getIntValue())); + } + + return list; + } + + public Stream<ItemTpl> itemTemplateStream() { + return getEntrySet() + .stream() + .map(e -> ItemTpl.newInstance().setTid(e.getIntKey()).setQty(e.getIntValue())); + } + + // Proto + + public static ItemParamMap fromTemplates(RepeatedMessage<ItemTpl> items) { + var map = new ItemParamMap(); + + for (var template : items) { + map.add(template.getTid(), template.getQty()); + } + + return map; + } + + public static ItemParamMap fromItemInfos(RepeatedMessage<ItemInfo> items) { + var map = new ItemParamMap(); + + for (var template : items) { + map.add(template.getTid(), template.getQty()); + } + + return map; + } +} diff --git a/src/main/java/emu/nebula/game/inventory/ItemSubType.java b/src/main/java/emu/nebula/game/inventory/ItemSubType.java new file mode 100644 index 0000000..b786147 --- /dev/null +++ b/src/main/java/emu/nebula/game/inventory/ItemSubType.java @@ -0,0 +1,56 @@ +package emu.nebula.game.inventory; + +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import lombok.Getter; + +public enum ItemSubType { + Res (1), + Item (2), + Char (3), + Energy (4), + WorldRankExp (5), + CharShard (6), + Disc (8), + TalentStrengthen (9), + DiscStrengthen (12), + DiscPromote (13), + TreasureBox (17), + GearTreasureBox (18), + SubNoteSkill (19), + SkillStrengthen (24), + CharacterLimitBreak (25), + MonthlyCard (30), + EnergyItem (31), + ComCYO (32), + OutfitCYO (33), + RandomPackage (34), + Equipment (35), + FateCard (37), + EquipmentExp (38), + DiscLimitBreak (40), + Potential (41), + SpecificPotential (42), + Honor (43), + CharacterYO (44), + PlayHead (45), + CharacterSkin (46); + + @Getter + private final int value; + private final static Int2ObjectMap<ItemSubType> map = new Int2ObjectOpenHashMap<>(); + + static { + for (ItemSubType type : ItemSubType.values()) { + map.put(type.getValue(), type); + } + } + + private ItemSubType(int value) { + this.value = value; + } + + public static ItemSubType getByValue(int value) { + return map.get(value); + } +} diff --git a/src/main/java/emu/nebula/game/inventory/ItemType.java b/src/main/java/emu/nebula/game/inventory/ItemType.java new file mode 100644 index 0000000..5f23a4f --- /dev/null +++ b/src/main/java/emu/nebula/game/inventory/ItemType.java @@ -0,0 +1,39 @@ +package emu.nebula.game.inventory; + +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import lombok.Getter; + +public enum ItemType { + Res (1), + Item (2), + Char (3), + Energy (4), + WorldRankExp (5), + RogueItem (6), + Disc (7), + Equipment (8), + CharacterSkin (9), + MonthlyCard (10), + Title (11), + Honor (12), + HeadItem (13); + + @Getter + private final int value; + private final static Int2ObjectMap<ItemType> map = new Int2ObjectOpenHashMap<>(); + + static { + for (ItemType type : ItemType.values()) { + map.put(type.getValue(), type); + } + } + + private ItemType(int value) { + this.value = value; + } + + public static ItemType getByValue(int value) { + return map.get(value); + } +} diff --git a/src/main/java/emu/nebula/game/mail/GameMail.java b/src/main/java/emu/nebula/game/mail/GameMail.java new file mode 100644 index 0000000..510cce2 --- /dev/null +++ b/src/main/java/emu/nebula/game/mail/GameMail.java @@ -0,0 +1,86 @@ +package emu.nebula.game.mail; + +import java.util.concurrent.TimeUnit; + +import dev.morphia.annotations.Entity; +import emu.nebula.Nebula; +import emu.nebula.game.inventory.ItemParamMap; +import emu.nebula.proto.Public.Mail; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Entity(useDiscriminator = false) +public class GameMail { + private int id; + + private String author; + private String subject; + private String desc; + + private ItemParamMap attachments; + + @Setter private boolean read; + @Setter private boolean recv; + @Setter private boolean pin; + + private long flag; + private long time; + private long expiry; + + @Deprecated // Morphia only + public GameMail() { + + } + + public GameMail(String author, String subject, String desc) { + this.author = author; + this.subject = subject; + this.desc = desc; + this.time = Nebula.getCurrentTime(); + this.expiry = this.time + TimeUnit.DAYS.toSeconds(30); + } + + protected void setId(int id) { + if (this.id == 0) { + this.id = id; + } + } + + public boolean canRemove() { + return (this.isRead() || this.isRecv()) && !this.isPin() && (this.hasAttachments() && this.isRecv()); + } + + public boolean hasAttachments() { + return this.attachments != null; + } + + public void addAttachment(int itemId, int count) { + if (this.attachments == null) { + this.attachments = new ItemParamMap(); + } + + this.attachments.add(itemId, count); + } + + public Mail toProto() { + var proto = Mail.newInstance() + .setId(this.getId()) + .setAuthor(this.getAuthor()) + .setSubject(this.getSubject()) + .setDesc(this.getDesc()) + .setTime(this.getTime()) + .setRead(this.isRead()) + .setRecv(this.isRecv()) + .setPin(this.isPin()) + .setFlag(this.getFlag()) + .setDeadline(this.getExpiry()); + + if (this.getAttachments() != null) { + this.getAttachments().itemTemplateStream() + .forEach(proto::addAttachments); + } + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/mail/Mailbox.java b/src/main/java/emu/nebula/game/mail/Mailbox.java new file mode 100644 index 0000000..b6b1a78 --- /dev/null +++ b/src/main/java/emu/nebula/game/mail/Mailbox.java @@ -0,0 +1,197 @@ +package emu.nebula.game.mail; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; + +import emu.nebula.Nebula; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.player.Player; +import emu.nebula.game.player.PlayerChangeInfo; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; +import lombok.Getter; + +@Getter +@Entity(value = "mailbox", useDiscriminator = false) +public class Mailbox implements GameDatabaseObject, Iterable<GameMail> { + @Id + private int uid; + private int lastMailId; + + private List<GameMail> list; + + @Deprecated // Morphia only + public Mailbox() { + + } + + public Mailbox(Player player) { + this.uid = player.getUid(); + this.list = new ArrayList<>(); + this.save(); + } + + // TODO optimize to an O(n) algorithm like a map + public GameMail getMailById(int id) { + return this.getList().stream() + .filter(m -> m.getId() == id) + .findFirst() + .orElse(null); + } + + public void sendMail(GameMail mail) { + // Set mail id + mail.setId(++this.lastMailId); + + // Add to mail list + this.list.add(mail); + + // Save to database + Nebula.getGameDatabase().update(this, getUid(), "lastMailId", this.getLastMailId()); + Nebula.getGameDatabase().addToList(this, getUid(), "list", mail); + } + + public boolean readMail(int id, long flag) { + // Get mail + var mail = this.getMailById(id); + + if (mail == null) { + return false; + } + + // Set read + mail.setRead(true); + + // Update in database + Nebula.getGameDatabase().updateNested(this, getUid(), "list.id", id, "list.$.read", true); + + // Success + return true; + } + + public GameMail pinMail(int id, long flag, boolean pin) { + // Get mail + var mail = this.getMailById(id); + + if (mail == null) { + return null; + } + + // Set pin + mail.setPin(pin); + + // Update in database + Nebula.getGameDatabase().updateNested(this, getUid(), "list.id", id, "list.$.pin", true); + + // Success + return mail; + } + + public PlayerChangeInfo recvMail(Player player, int id) { + // Get mails that we want to claim + List<GameMail> mails = null; + + if (id == 0) { + // Claim all + mails = this.getList() + .stream() + .filter(mail -> !mail.isRecv() && mail.hasAttachments()) + .toList(); + } else { + // Claim one + var mail = this.getMailById(id); + + if (mail != null && !mail.isRecv() && mail.hasAttachments()) { + mails = List.of(mail); + } + } + + // Create change info + var changes = new PlayerChangeInfo(); + + // Sanity + if (mails == null || mails.isEmpty()) { + return changes; + } + + // Recieved mail id list + var recvMails = new IntArrayList(); + + // Recv mails + for (var mail : mails) { + // Add attachments to player + player.getInventory().addItems(mail.getAttachments(), changes); + + // Set claimed flag + mail.setRecv(true); + + // Add to recvied mail list + recvMails.add(mail.getId()); + + // Update in database + Nebula.getGameDatabase().updateNested(this, getUid(), "list.id", mail.getId(), "list.$.recv", true); + } + + // Set extra change data + changes.setExtraData(recvMails); + + // Success + return changes.setSuccess(true); + } + + public IntList removeMail(Player player, int id) { + // Get mails that we want to claim + Set<GameMail> toRemove = null; + + if (id == 0) { + // Claim all + toRemove = this.getList() + .stream() + .filter(mail -> mail.canRemove()) + .collect(Collectors.toSet()); + } else { + // Claim one + var mail = this.getMailById(id); + + if (mail != null && mail.canRemove()) { + toRemove = Set.of(mail); + } + } + + // Recieved mail id list + var removed = new IntArrayList(); + + // Sanity check + if (toRemove == null || toRemove.isEmpty()) { + return removed; + } + + // Remove + var it = this.getList().iterator(); + while (it.hasNext()) { + var mail = it.next(); + + if (toRemove.contains(mail)) { + removed.add(mail.getId()); + it.remove(); + } + } + + // Save + this.save(); + + // Success + return removed; + } + + @Override + public Iterator<GameMail> iterator() { + return this.getList().iterator(); + } +} diff --git a/src/main/java/emu/nebula/game/player/Player.java b/src/main/java/emu/nebula/game/player/Player.java new file mode 100644 index 0000000..c20878e --- /dev/null +++ b/src/main/java/emu/nebula/game/player/Player.java @@ -0,0 +1,358 @@ +package emu.nebula.game.player; + +import java.util.HashSet; +import java.util.Set; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import dev.morphia.annotations.Indexed; + +import emu.nebula.GameConstants; +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.account.Account; +import emu.nebula.game.character.CharacterStorage; +import emu.nebula.game.formation.FormationManager; +import emu.nebula.game.inventory.Inventory; +import emu.nebula.game.mail.Mailbox; +import emu.nebula.game.tower.StarTowerManager; +import emu.nebula.net.GameSession; +import emu.nebula.proto.PlayerData.PlayerInfo; +import emu.nebula.proto.Public.NewbieInfo; +import emu.nebula.proto.Public.QuestType; +import emu.nebula.proto.Public.WorldClass; + +import it.unimi.dsi.fastutil.ints.IntOpenHashSet; +import it.unimi.dsi.fastutil.ints.IntSet; + +import lombok.Getter; + +@Getter +@Entity(value = "players", useDiscriminator = false) +public class Player implements GameDatabaseObject { + @Id private int uid; + @Indexed private String accountUid; + + private transient Account account; + private transient Set<GameSession> sessions; + + // Details + private String name; + private boolean gender; + private int headIcon; + private int skinId; + private int titlePrefix; + private int titleSuffix; + private int level; + private int exp; + + private int energy; + + private IntSet boards; + private IntSet titles; + + private long createTime; + + // Managers + private final transient CharacterStorage characters; + private final transient Inventory inventory; + + // Referenced data + private transient FormationManager formations; + private transient Mailbox mailbox; + private transient StarTowerManager starTowerManager; + + @Deprecated // Morphia only + public Player() { + this.sessions = new HashSet<>(); + this.characters = new CharacterStorage(this); + this.inventory = new Inventory(this); + } + + public Player(Account account, String name, boolean gender) { + this(); + + // Set uid first + if (account.getReservedPlayerUid() > 0) { + this.uid = account.getReservedPlayerUid(); + } else { + this.uid = Nebula.getGameDatabase().getNextObjectId(Player.class); + } + + // Set basic info + this.accountUid = account.getUid(); + this.name = name; + this.gender = gender; + this.headIcon = 101; + this.skinId = 10301; + this.titlePrefix = 1; + this.titleSuffix = 2; + this.level = 1; + this.boards = new IntOpenHashSet(); + this.titles = new IntOpenHashSet(); + this.createTime = Nebula.getCurrentTime(); + + // Add starter characters + this.getCharacters().addCharacter(103); + this.getCharacters().addCharacter(112); + this.getCharacters().addCharacter(113); + + // Add starter discs + this.getCharacters().addDisc(211001); + this.getCharacters().addDisc(211005); + this.getCharacters().addDisc(211007); + this.getCharacters().addDisc(211008); + + // Add titles + this.getTitles().add(this.getTitlePrefix()); + this.getTitles().add(this.getTitleSuffix()); + + // Add board ids + this.getBoards().add(410301); + } + + public Account getAccount() { + if (this.account == null) { + this.account = Nebula.getAccountDatabase().getObjectByField(Account.class, "_id", this.getAccountUid()); + } + + return this.account; + } + + public void addSession(GameSession session) { + synchronized (this.sessions) { + this.sessions.add(session); + } + } + + public void removeSession(GameSession session) { + synchronized (this.sessions) { + this.sessions.remove(session); + } + } + + public boolean hasSessions() { + synchronized (this.sessions) { + return !this.sessions.isEmpty(); + } + } + + public boolean getGender() { + return this.gender; + } + + public boolean editName(String newName) { + // Sanity check + if (newName == null || newName.isEmpty() || newName.equals(this.getName())) { + return false; + } + + // Limit name length + if (newName.length() > 20) { + newName = newName.substring(0, 19); + } + + // Set name + this.name = newName; + + // Update in database + Nebula.getGameDatabase().update(this, this.getUid(), "name", this.getName()); + + // Success + return true; + } + + public void editGender() { + // Set name + this.gender = !this.gender; + + // Update in database + Nebula.getGameDatabase().update(this, this.getUid(), "gender", this.getGender()); + } + + public void setNewbieInfo(int groupId, int stepId) { + // TODO + } + + public int getMaxExp() { + var data = GameData.getWorldClassDataTable().get(this.level + 1); + return data != null ? data.getExp() : 0; + } + + public PlayerChangeInfo addExp(int amount, PlayerChangeInfo changes) { + // Check if changes is null + if (changes == null) { + changes = new PlayerChangeInfo(); + } + + // Sanity + if (amount <= 0) { + return changes; + } + + // Setup + int oldLevel = this.getLevel(); + int oldExp = this.getExp(); + int expRequired = this.getMaxExp(); + + // Add exp + this.exp += amount; + + // Check for level ups + while (this.exp >= expRequired && expRequired > 0) { + this.level += 1; + this.exp -= expRequired; + + expRequired = this.getMaxExp(); + } + + // Save to database + Nebula.getGameDatabase().update( + this, + this.getUid(), + "level", + this.getLevel(), + "exp", + this.getExp() + ); + + // Calculate changes + var proto = WorldClass.newInstance() + .setAddClass(this.getLevel() - oldLevel) + .setExpChange(this.getExp() - oldExp); + + changes.add(proto); + + return changes; + } + + public void sendMessage(String string) { + // Empty + } + + // Login + + public void onLoad() { + // Load from database + this.getCharacters().loadFromDatabase(); + this.getInventory().loadFromDatabase(); + + // Load referenced classes + this.formations = Nebula.getGameDatabase().getObjectByField(FormationManager.class, "_id", this.getUid()); + if (this.formations == null) { + this.formations = new FormationManager(this); + } else { + this.formations.setPlayer(this); + } + + this.mailbox = Nebula.getGameDatabase().getObjectByField(Mailbox.class, "_id", this.getUid()); + if (this.mailbox == null) { + this.mailbox = new Mailbox(this); + } + + this.starTowerManager = Nebula.getGameDatabase().getObjectByField(StarTowerManager.class, "_id", this.getUid()); + if (this.starTowerManager == null) { + this.starTowerManager = new StarTowerManager(this); + } else { + this.starTowerManager.setPlayer(this); + } + } + + // Proto + + public PlayerInfo toProto() { + PlayerInfo proto = PlayerInfo.newInstance(); + + var acc = proto.getMutableAcc() + .setNickName(this.getName()) + .setGender(this.getGender()) + .setId(this.getUid()) + .setHeadIcon(this.getHeadIcon()) + .setSkinId(this.getSkinId()) + .setTitlePrefix(this.getTitlePrefix()) + .setTitleSuffix(this.getTitleSuffix()) + .setCreateTime(this.getCreateTime()); + + proto.getMutableWorldClass() + .setStage(3) + .setCur(this.getLevel()) + .setLastExp(this.getExp()); + + proto.getMutableEnergy() + .getMutableEnergy() + .setUpdateTime(Nebula.getCurrentTime()) + .setNextDuration(60) + .setPrimary(240) + .setIsPrimary(true); + + // Add characters/discs/res/items + for (var character : getCharacters().getCharacterCollection()) { + proto.addChars(character.toProto()); + } + + for (var disc : getCharacters().getDiscCollection()) { + proto.addDiscs(disc.toProto()); + } + + for (var item : getInventory().getItems().values()) { + proto.addItems(item.toProto()); + } + + for (var res : getInventory().getResources().values()) { + proto.addRes(res.toProto()); + } + + // Formations + for (var f : this.getFormations().getFormations().values()) { + proto.getMutableFormation().addInfo(f.toProto()); + } + + // Set state + var state = proto.getMutableState() + .setStorySet(true); + + state.getMutableMail(); + state.getMutableBattlePass(); + state.getMutableWorldClassReward(); + state.getMutableFriendEnergy(); + state.getMutableMallPackage(); + state.getMutableAchievement(); + state.getMutableTravelerDuelQuest() + .setType(QuestType.TravelerDuel); + state.getMutableTravelerDuelChallengeQuest() + .setType(QuestType.TravelerDuelChallenge); + state.getMutableStarTower(); + state.getMutableStarTowerBook(); + state.getMutableScoreBoss(); + state.getMutableCharAffinityRewards(); + + // Force complete tutorials + for (var guide : GameData.getGuideGroupDataTable()) { + var info = NewbieInfo.newInstance() + .setGroupId(guide.getId()) + .setStepId(-1); + + acc.addNewbies(info); + } + + acc.addNewbies(NewbieInfo.newInstance().setGroupId(GameConstants.INTRO_GUIDE_ID).setStepId(-1)); + + // + proto.addBoard(410301); + proto.setServerTs(Nebula.getCurrentTime()); + + // Extra + proto.setAchievements(new byte[64]); + + proto.getMutableVampireSurvivorRecord() + .getMutableSeason(); + + proto.getMutableQuests(); + proto.getMutableAgent(); + proto.getMutablePhone(); + proto.getMutableStory(); + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/player/PlayerChangeInfo.java b/src/main/java/emu/nebula/game/player/PlayerChangeInfo.java new file mode 100644 index 0000000..2060ba8 --- /dev/null +++ b/src/main/java/emu/nebula/game/player/PlayerChangeInfo.java @@ -0,0 +1,49 @@ +package emu.nebula.game.player; + +import java.util.ArrayList; +import java.util.List; + +import emu.nebula.GameConstants; +import emu.nebula.proto.AnyOuterClass.Any; +import emu.nebula.proto.Public.ChangeInfo; +import lombok.Getter; +import lombok.Setter; +import us.hebi.quickbuf.ProtoMessage; + +@Getter +public class PlayerChangeInfo { + private boolean success; + private List<Any> list; + + @Setter + private Object extraData; + + public PlayerChangeInfo() { + this.list = new ArrayList<>(); + } + + public PlayerChangeInfo setSuccess(boolean success) { + this.success = success; + return this; + } + + public void add(ProtoMessage<?> proto) { + var any = Any.newInstance() + .setTypeUrl(GameConstants.PROTO_BASE_TYPE_URL + proto.getClass().getSimpleName()) + .setValue(proto.toByteArray()); + + this.list.add(any); + } + + // Proto + + public ChangeInfo toProto() { + var proto = ChangeInfo.newInstance(); + + for (var any : this.getList()) { + proto.addProps(any); + } + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/player/PlayerManager.java b/src/main/java/emu/nebula/game/player/PlayerManager.java new file mode 100644 index 0000000..065d0b6 --- /dev/null +++ b/src/main/java/emu/nebula/game/player/PlayerManager.java @@ -0,0 +1,27 @@ +package emu.nebula.game.player; + +public abstract class PlayerManager { + private transient Player player; + + public PlayerManager() { + + } + + public PlayerManager(Player player) { + this.player = player; + } + + public Player getPlayer() { + return this.player; + } + + public void setPlayer(Player player) { + if (this.player == null) { + this.player = player; + } + } + + public int getPlayerUid() { + return this.getPlayer().getUid(); + } +} diff --git a/src/main/java/emu/nebula/game/player/PlayerModule.java b/src/main/java/emu/nebula/game/player/PlayerModule.java new file mode 100644 index 0000000..8cdabbb --- /dev/null +++ b/src/main/java/emu/nebula/game/player/PlayerModule.java @@ -0,0 +1,116 @@ +package emu.nebula.game.player; + +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +import emu.nebula.Nebula; +import emu.nebula.game.GameContext; +import emu.nebula.game.GameContextModule; +import emu.nebula.game.account.Account; +import emu.nebula.net.GameSession; + +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; + +public class PlayerModule extends GameContextModule { + private final Int2ObjectMap<Player> cachedPlayers; + private final Object2ObjectMap<String, Player> cachedPlayersByAccount; + + public PlayerModule(GameContext gameContext) { + super(gameContext); + + this.cachedPlayers = new Int2ObjectOpenHashMap<>(); + this.cachedPlayersByAccount = new Object2ObjectOpenHashMap<>(); + } + + public Int2ObjectMap<Player> getCachedPlayers() { + return cachedPlayers; + } + + private void addToCache(Player player) { + this.cachedPlayers.put(player.getUid(), player); + this.cachedPlayersByAccount.put(player.getAccountUid(), player); + } + + public void removeFromCache(Player player) { + this.cachedPlayers.remove(player.getUid()); + this.cachedPlayersByAccount.remove(player.getAccountUid()); + } + + /** + * Returns a player object that has been previously cached. Returns null if the player isnt in the cache. + * @param uid User id of the player + * @return + */ + public synchronized Player getCachedPlayerByUid(int uid) { + return getCachedPlayers().get(uid); + } + + /** + * Returns a player object with the given account. Returns null if the player doesnt exist. + * @param uid User id of the player + * @return + */ + public synchronized Player getPlayerByAccount(Account account) { + // Get player from cache + Player player = this.cachedPlayersByAccount.get(account.getUid()); + + if (player == null) { + // Retrieve player object from database if its not there + player = Nebula.getGameDatabase().getObjectByField(Player.class, "accountUid", account.getUid()); + + if (player != null) { + // Load player + player.onLoad(); + + // Put in cache + this.addToCache(player); + } + } + + return player; + } + + /** + * Creates a player with the specified user id. + * @param userId + * @return + */ + public synchronized Player createPlayer(GameSession session, String name, boolean gender) { + // Make sure player doesnt already exist + if (Nebula.getGameDatabase().checkIfObjectExists(Player.class, "accountUid", session.getAccount().getUid())) { + return null; + } + + // Limit name length + if (name.length() > 20) { + name = name.substring(0, 19); + } + + // Create player and save to db + var player = new Player(session.getAccount(), name, gender); + player.onLoad(); + player.save(); + + // Put in cache + this.addToCache(player); + + // Set player for session + session.setPlayer(player); + + return player; + } + + /** + * Returns a list of recent players that have logged on (for followers) + * @param player Player that requested this + */ + public synchronized List<Player> getRandomPlayerList(Player player) { + List<Player> list = getCachedPlayers().values().stream().filter(p -> p != player).collect(Collectors.toList()); + Collections.shuffle(list); + return list.stream().limit(15).toList(); + } +} diff --git a/src/main/java/emu/nebula/game/story/StoryManager.java b/src/main/java/emu/nebula/game/story/StoryManager.java new file mode 100644 index 0000000..8553f8b --- /dev/null +++ b/src/main/java/emu/nebula/game/story/StoryManager.java @@ -0,0 +1,12 @@ +package emu.nebula.game.story; + +import dev.morphia.annotations.Entity; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.player.PlayerManager; +import lombok.Getter; + +@Getter +@Entity(value = "story", useDiscriminator = false) +public class StoryManager extends PlayerManager implements GameDatabaseObject { + +} diff --git a/src/main/java/emu/nebula/game/tower/CaseType.java b/src/main/java/emu/nebula/game/tower/CaseType.java new file mode 100644 index 0000000..1826cdc --- /dev/null +++ b/src/main/java/emu/nebula/game/tower/CaseType.java @@ -0,0 +1,39 @@ +package emu.nebula.game.tower; + +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import lombok.Getter; + +public enum CaseType { + Battle (1), + OpenDoor (2), + PotentialSelect (3), + FateCardSelect (4), + NoteSelect (5), + NpcEvent (6), + SelectSpecialPotential (7), + RecoveryHP (8), + NpcRecoveryHP (9), + Hawker (10), + StrengthenMachine (11), + DoorDanger (12), + SyncHP (13); + + @Getter + private final int value; + private final static Int2ObjectMap<CaseType> map = new Int2ObjectOpenHashMap<>(); + + static { + for (CaseType type : CaseType.values()) { + map.put(type.getValue(), type); + } + } + + private CaseType(int value) { + this.value = value; + } + + public static CaseType getByValue(int value) { + return map.get(value); + } +} diff --git a/src/main/java/emu/nebula/game/tower/StarTowerCase.java b/src/main/java/emu/nebula/game/tower/StarTowerCase.java new file mode 100644 index 0000000..93984e3 --- /dev/null +++ b/src/main/java/emu/nebula/game/tower/StarTowerCase.java @@ -0,0 +1,55 @@ +package emu.nebula.game.tower; + +import emu.nebula.proto.PublicStarTower.StarTowerRoomCase; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class StarTowerCase { + private int id; + + @Setter(AccessLevel.NONE) + private CaseType type; + + // Extra data + private int teamLevel; + + private int floorId; + + // Select + private int[] ids; + + public StarTowerCase(CaseType type) { + this.type = type; + } + + public StarTowerRoomCase toProto() { + var proto = StarTowerRoomCase.newInstance() + .setId(this.getId()); + + switch (this.type) { + case Battle -> { + proto.getMutableBattleCase(); + } + case OpenDoor -> { + proto.getMutableDoorCase(); + } + case SyncHP -> { + proto.getMutableSyncHPCase(); + } + case SelectSpecialPotential -> { + proto.getMutableSelectSpecialPotentialCase(); + } + case PotentialSelect -> { + proto.getMutableSelectPotentialCase(); + } + default -> { + + } + } + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/tower/StarTowerInstance.java b/src/main/java/emu/nebula/game/tower/StarTowerInstance.java new file mode 100644 index 0000000..0884a8a --- /dev/null +++ b/src/main/java/emu/nebula/game/tower/StarTowerInstance.java @@ -0,0 +1,256 @@ +package emu.nebula.game.tower; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import dev.morphia.annotations.Entity; +import emu.nebula.data.resources.StarTowerDef; +import emu.nebula.game.formation.Formation; +import emu.nebula.game.player.Player; +import emu.nebula.proto.PublicStarTower.StarTowerChar; +import emu.nebula.proto.PublicStarTower.StarTowerDisc; +import emu.nebula.proto.PublicStarTower.StarTowerInfo; +import emu.nebula.proto.PublicStarTower.StarTowerRoomCase; +import emu.nebula.proto.StarTowerApply.StarTowerApplyReq; +import emu.nebula.proto.StarTowerInteract.StarTowerInteractReq; +import emu.nebula.proto.StarTowerInteract.StarTowerInteractResp; +import emu.nebula.util.Snowflake; +import emu.nebula.util.Utils; +import it.unimi.dsi.fastutil.ints.Int2IntMap; +import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; +import lombok.Getter; +import lombok.SneakyThrows; + +@Getter +@Entity(useDiscriminator = false) +public class StarTowerInstance { + private transient StarTowerManager manager; + private transient StarTowerDef data; + + // Tower id + private int id; + + // Room + private int floor; + private int mapId; + private int mapTableId; + private String mapParam; + private int paramId; + + // Team + private int formationId; + private int buildId; + private int teamLevel; + private int teamExp; + private int charHp; + private int battleTime; + private List<StarTowerChar> chars; + private List<StarTowerDisc> discs; + + private int lastCaseId = 0; + private List<StarTowerCase> cases; + + private Int2IntMap items; + + @Deprecated // Morphia only + public StarTowerInstance() { + + } + + public StarTowerInstance(StarTowerManager manager, StarTowerDef data, Formation formation, StarTowerApplyReq req) { + this.manager = manager; + this.data = data; + + this.id = req.getId(); + + this.mapId = req.getMapId(); + this.mapTableId = req.getMapTableId(); + this.mapParam = req.getMapParam(); + this.paramId = req.getParamId(); + + this.formationId = req.getFormationId(); + this.buildId = Snowflake.newUid(); + this.teamLevel = 1; + this.floor = 1; + this.charHp = -1; + this.chars = new ArrayList<>(); + this.discs = new ArrayList<>(); + + this.cases = new ArrayList<>(); + this.items = new Int2IntOpenHashMap(); + + // Init formation + for (int i = 0; i < 3; i++) { + int id = formation.getCharIdAt(i); + var character = getPlayer().getCharacters().getCharacterById(id); + + if (character != null) { + chars.add(character.toStarTowerProto()); + } else { + chars.add(StarTowerChar.newInstance()); + } + } + + for (int i = 0; i < 6; i++) { + int id = formation.getDiscIdAt(i); + var disc = getPlayer().getCharacters().getDiscById(id); + + if (disc != null) { + discs.add(disc.toStarTowerProto()); + } else { + discs.add(StarTowerDisc.newInstance()); + } + } + + // Add cases + this.addCase(new StarTowerCase(CaseType.Battle)); + this.addCase(new StarTowerCase(CaseType.SyncHP)); + + + var doorCase = this.addCase(new StarTowerCase(CaseType.OpenDoor)); + doorCase.setFloorId(this.getFloor() + 1); + + } + + public Player getPlayer() { + return this.manager.getPlayer(); + } + + public StarTowerCase addCase(StarTowerCase towerCase) { + return this.addCase(null, towerCase); + } + + public StarTowerCase addCase(StarTowerInteractResp rsp, StarTowerCase towerCase) { + // Add to cases list + this.cases.add(towerCase); + + // Increment id + towerCase.setId(++this.lastCaseId); + + // Set proto + if (rsp != null) { + rsp.getMutableCases().add(towerCase.toProto()); + } + + return towerCase; + } + + public StarTowerInteractResp handleInteract(StarTowerInteractReq req) { + var rsp = StarTowerInteractResp.newInstance() + .setId(req.getId()); + + if (req.hasBattleEndReq()) { + this.onBattleEnd(req, rsp); + } else if (req.hasRecoveryHPReq()) { + var proto = req.getRecoveryHPReq(); + } else if (req.hasSelectReq()) { + + } else if (req.hasEnterReq()) { + this.onEnterReq(req, rsp); + } + + // Set data protos + rsp.getMutableData(); + rsp.getMutableChange(); + //rsp.getMutableNextPackage(); + + return rsp; + } + + // Interact events + + @SneakyThrows + public void onBattleEnd(StarTowerInteractReq req, StarTowerInteractResp rsp) { + var proto = req.getBattleEndReq(); + + if (proto.hasVictory()) { + // Add team level + this.teamLevel++; + + // Add clear time + this.battleTime += proto.getVictory().getTime(); + + // Handle victory + rsp.getMutableBattleEndResp() + .getMutableVictory() + .setLv(this.getTeamLevel()) + .setBattleTime(this.getBattleTime()); + + // Add potential selector TODO + } else { + // Handle defeat + } + } + + public void onSelect(StarTowerInteractReq req, StarTowerInteractResp rsp) { + + } + + public void onEnterReq(StarTowerInteractReq req, StarTowerInteractResp rsp) { + var proto = req.getEnterReq(); + + // Set + this.floor = this.floor++; + this.mapId = proto.getMapId(); + this.mapTableId = proto.getMapTableId(); + + // Clear cases TODO + this.lastCaseId = 0; + this.cases.clear(); + + // Add cases + var syncHpCase = this.addCase(new StarTowerCase(CaseType.SyncHP)); + var doorCase = this.addCase(new StarTowerCase(CaseType.OpenDoor)); + doorCase.setFloorId(this.getFloor() + 1); + + // Proto + var room = rsp.getMutableEnterResp().getMutableRoom(); + + room.getMutableData() + .setMapId(this.getMapId()) + .setMapTableId(this.getMapTableId()) + .setFloor(this.getFloor()); + + room.addAllCases(syncHpCase.toProto(), doorCase.toProto()); + } + + public void onRecoveryHP(StarTowerInteractReq req, StarTowerInteractResp rsp) { + // Add case + this.addCase(rsp, new StarTowerCase(CaseType.RecoveryHP)); + } + + // Proto + + public StarTowerInfo toProto() { + var proto = StarTowerInfo.newInstance(); + + proto.getMutableMeta() + .setId(this.getId()) + .setCharHp(this.getCharHp()) + .setTeamLevel(this.getTeamLevel()) + .setNPCInteractions(1) + .setBuildId(this.getBuildId()); + + this.getChars().forEach(proto.getMutableMeta()::addChars); + this.getDiscs().forEach(proto.getMutableMeta()::addDiscs); + + proto.getMutableRoom().getMutableData() + .setFloor(this.getFloor()) + .setMapId(this.getMapId()) + .setMapTableId(this.getMapTableId()) + .setMapParam(this.getMapParam()) + .setParamId(this.getParamId()); + + // Cases + for (var starTowerCase : this.getCases()) { + proto.getMutableRoom().addCases(starTowerCase.toProto()); + } + + // TODO + proto.getMutableBag(); + + return proto; + } +} diff --git a/src/main/java/emu/nebula/game/tower/StarTowerManager.java b/src/main/java/emu/nebula/game/tower/StarTowerManager.java new file mode 100644 index 0000000..abc6289 --- /dev/null +++ b/src/main/java/emu/nebula/game/tower/StarTowerManager.java @@ -0,0 +1,51 @@ +package emu.nebula.game.tower; + +import dev.morphia.annotations.Entity; +import dev.morphia.annotations.Id; +import emu.nebula.data.GameData; +import emu.nebula.database.GameDatabaseObject; +import emu.nebula.game.player.Player; +import emu.nebula.game.player.PlayerManager; +import emu.nebula.proto.StarTowerApply.StarTowerApplyReq; +import lombok.Getter; + +@Getter +@Entity(value = "star_tower", useDiscriminator = false) +public class StarTowerManager extends PlayerManager implements GameDatabaseObject { + @Id + private int uid; + + private transient StarTowerInstance instance; + + @Deprecated // Morphia only + public StarTowerManager() { + + } + + public StarTowerManager(Player player) { + super(player); + this.uid = player.getUid(); + + this.save(); + } + + public StarTowerInstance apply(StarTowerApplyReq req) { + // Sanity checks + var data = GameData.getStarTowerDataTable().get(req.getId()); + if (data == null) { + return null; + } + + // Get formation + var formation = getPlayer().getFormations().getFormationById(req.getFormationId()); + if (formation == null) { + return null; + } + + // Create instance + this.instance = new StarTowerInstance(this, data, formation, req); + + // Success + return this.instance; + } +} diff --git a/src/main/java/emu/nebula/net/GameSession.java b/src/main/java/emu/nebula/net/GameSession.java new file mode 100644 index 0000000..c99fea8 --- /dev/null +++ b/src/main/java/emu/nebula/net/GameSession.java @@ -0,0 +1,128 @@ +package emu.nebula.net; + +import java.security.MessageDigest; +import java.util.Base64; + +import org.bouncycastle.crypto.params.ECPrivateKeyParameters; +import org.bouncycastle.crypto.params.ECPublicKeyParameters; + +import emu.nebula.Nebula; +import emu.nebula.game.GameContext; +import emu.nebula.game.account.Account; +import emu.nebula.game.account.AccountHelper; +import emu.nebula.game.player.Player; +import emu.nebula.util.AeadHelper; +import lombok.Getter; +import us.hebi.quickbuf.RepeatedByte; + +@Getter +public class GameSession { + private String token; + private Account account; + private Player player; + + // Crypto + private byte[] clientPublicKey; + private byte[] serverPublicKey; + private byte[] serverPrivateKey; + private byte[] key; + + // + private long lastActiveTime; + + public GameSession() { + this.updateLastActiveTime(); + } + + public void setPlayer(Player player) { + this.player = player; + this.player.addSession(this); + } + + public void clearPlayer(GameContext context) { + // Sanity check + if (this.player == null) { + return; + } + + // Clear player + var player = this.player; + this.player = null; + + // Remove session from player + player.removeSession(this); + + // Clean up from player module + if (!player.hasSessions()) { + context.getPlayerModule().removeFromCache(player); + } + } + + public boolean hasPlayer() { + return this.player != null; + } + + public void setClientKey(RepeatedByte key) { + this.clientPublicKey = key.toArray(); + } + + public void generateServerKey() { + var pair = AeadHelper.generateECDHKEyPair(); + + this.serverPrivateKey = ((ECPrivateKeyParameters) pair.getPrivate()).getD().toByteArray(); + this.serverPublicKey = ((ECPublicKeyParameters) pair.getPublic()).getQ().getEncoded(false); + } + + public void calculateKey() { + this.key = AeadHelper.generateKey(clientPublicKey, serverPublicKey, serverPrivateKey); + } + + public String generateToken() { + String temp = System.currentTimeMillis() + ":" + AeadHelper.generateBytes(64).toString(); + + try { + MessageDigest md = MessageDigest.getInstance("SHA-512"); + byte[] bytes = md.digest(temp.getBytes()); + + this.token = Base64.getEncoder().encodeToString(bytes); + } catch (Exception e) { + this.token = Base64.getEncoder().encodeToString(temp.getBytes()); + } + + return this.token; + } + + public boolean login(String loginToken) { + // Sanity check + if (this.account != null) { + return false; + } + + // Get account + this.account = AccountHelper.getAccountByLoginToken(loginToken); + + if (account == null) { + return false; + } + + // Note: We should cache players in case multiple sessions try to login to the same player at the time + // Get player by account + var player = Nebula.getGameContext().getPlayerModule().getPlayerByAccount(account); + + // Skip intro + if (player == null && Nebula.getConfig().getServerOptions().skipIntro) { + player = Nebula.getGameContext().getPlayerModule().createPlayer(this, "Test", false); + } + + // Set player + if (player != null) { + this.setPlayer(player); + } + + return true; + } + + public void updateLastActiveTime() { + this.lastActiveTime = System.currentTimeMillis(); + } +} diff --git a/src/main/java/emu/nebula/net/HandlerId.java b/src/main/java/emu/nebula/net/HandlerId.java new file mode 100644 index 0000000..615af05 --- /dev/null +++ b/src/main/java/emu/nebula/net/HandlerId.java @@ -0,0 +1,10 @@ +package emu.nebula.net; + +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; + +@Retention(RUNTIME) +public @interface HandlerId { + public int value(); +} diff --git a/src/main/java/emu/nebula/net/NetHandler.java b/src/main/java/emu/nebula/net/NetHandler.java new file mode 100644 index 0000000..fa2bf1d --- /dev/null +++ b/src/main/java/emu/nebula/net/NetHandler.java @@ -0,0 +1,67 @@ +package emu.nebula.net; + +import lombok.SneakyThrows; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; + +public abstract class NetHandler { + + public boolean requireSession() { + return true; + } + + public boolean requirePlayer() { + return true; + } + + public byte[] encodeMsg(int msgId, byte[] packet) { + // Create data array + byte[] data = new byte[packet.length + 2]; + + // Encode msgId + short id = (short) msgId; + data[0] = (byte) (id >> 8); + data[1] = (byte) id; + + // Copy packet to data array + System.arraycopy(packet, 0, data, 2, packet.length); + + // Complete + return data; + } + + @SneakyThrows + public byte[] encodeMsg(int msgId, ProtoMessage<?> proto) { + // Create data array + byte[] data = new byte[proto.getCachedSize() + 2]; + + // Encode msgId + short id = (short) msgId; + data[0] = (byte) (id >> 8); + data[1] = (byte) id; + + // Create proto sink + var output = ProtoSink.newInstance(data, 2, proto.getCachedSize()); + + // Copy packet to data array + proto.writeTo(output); + + // Complete + return data; + } + + public byte[] encodeMsg(int msgId) { + // Create data array + byte[] data = new byte[2]; + + // Encode msgId + short id = (short) msgId; + data[0] = (byte) (id >> 8); + data[1] = (byte) id; + + return data; + } + + public abstract byte[] handle(GameSession session, byte[] message) throws Exception; + +} diff --git a/src/main/java/emu/nebula/net/NetMsgId.java b/src/main/java/emu/nebula/net/NetMsgId.java new file mode 100644 index 0000000..fd020c9 --- /dev/null +++ b/src/main/java/emu/nebula/net/NetMsgId.java @@ -0,0 +1,780 @@ +package emu.nebula.net; + +public class NetMsgId { + public static final int none = 0; + + public static final int clear_all_activity_levels_notify = -10046; // 一键通关当前所有活动关卡 + public static final int clear_all_activity_avg_notify = -10045; // 一键通关当前所有活动剧情 + public static final int vs_add_fate_card_notify = -10044; // 返回添加命运卡达到要求额外赠送卡片信息 + public static final int char_gems_import_notify = -10043; // 导入角色宝石(纹章)槽位和预设数据 + public static final int char_gems_export_notify = -10042; // 返回角色宝石(纹章)的槽位和预设数据 + public static final int clear_all_char_gem_instance_notify = -10040; // 一键通关角色宝石(纹章)副本 + public static final int change_npc_affinity_notify = -10039; // 修改NPC好感度 + public static final int tower_change_sub_note_skill_notify = -10038; // 修改星塔属性音符数量 + public static final int world_class_quest_complete_notify = -10037; // 当前世界等级阶段的任务 + public static final int score_boss_level_reset_notify = -10036; // 积分boss关卡重置通知 + public static final int score_boss_star_reward_reset_notify = -10035; // 积分boss星级奖励重置通知 + public static final int char_up_change_notify = -10034; // 角色数据变更 + public static final int tower_growth_node_change_notify = -10033; // 星塔养成节点变化通知 + public static final int st_harmony_skill_notify = -10032; // 共鸣技能新增 + public static final int clear_all_story_notify = -10031; // 一键通关故事并获得所有证据 + public static final int story_complete_notify = -10030; // 通关指定的故事并获取证据 + public static final int infinity_tower_skip_floor_notify = -10029; // 无尽之塔跳层 + public static final int infinity_tower_all_infos_notify = -10028; // 全通所有无尽之塔 + public static final int clear_all_equipment_instance_notify = -10027; // 全通所有装备副本 + public static final int st_import_build_notify = -10026; // 返回星塔build导入的build信息 + public static final int st_export_build_notify = -10025; // 返回星塔build的json序列化字符串 + public static final int st_add_new_case_notify = -10024; // 返回操作添加的新case + public static final int st_add_team_exp_notify = -10023; // 队伍等级经验最终值及当前未处理的所有case + public static final int st_skip_floor_notify = -10022; // 星塔跳层 + public static final int st_clear_all_star_tower_notify = -10021; // 全通所有星塔(返回通关星塔ID列表) + public static final int st_items_change_notify = -10020; // 星塔道具变化通知 + public static final int char_affinity_final_notify = -10019; // 添加角色好感度 + public static final int clear_all_skill_instance_notify = -10018; // 全通所有技能素材本 + public static final int disc_reset_notify = -10017; // 星盘信息通知 + public static final int clear_all_traveler_due_notify = -10016; // 全通所有旅人对决 + public static final int clear_all_region_boss_level_notify = -10015; // 全通所有强敌讨伐 + public static final int clear_all_week_boss_notify = -10014; // 一键通关所有周长Boss本 + public static final int clear_all_daily_instance_notify = -10013; // 一键通关所有日常副本 + public static final int refresh_agent_notify = -10012; // 一键刷新正在进行中的委托 + public static final int star_tower_sub_note_skill_info_notify = -10011; // 星塔属性音符技能随机分布数据 + public static final int vampire_survivor_talent_node_notify = -10010; // 修改后的天赋节点最终信息值 + public static final int add_vampire_season_score_notify = -10009; // 增加吸血鬼模式副本赛季积分 返回当前总分 + public static final int clear_all_vampire_survivor_notify = -10008; // 一键通关所有吸血鬼模式副本 + public static final int region_boss_level_final_notify = -10007; // 地区boss关卡最终数据通知 + public static final int chars_final_notify = -10006; // 角色列表最终数据通知 + public static final int world_class_number_notify = -10005; // 世界等级最终值通知 + public static final int char_change_notify = -10004; // 角色数据变化通知 + public static final int char_reset_notify = -10003; // 角色信息通知 + public static final int items_change_notify = -10001; // 道具变化通知 + public static final int sudo_failed_ack = -3; // 请求失败 + public static final int sudo_succeed_ack = -2; // 成功,响应会走notify附加数据流程 + public static final int sudo_req = -1; // 客户端内置GM命令请求 + public static final int ike_req = 1; // internet key exchange + public static final int ike_succeed_ack = 2; // 成功,返回服务器方的秘钥,之后每次请求都需要将Token写入header X-Token段,服务器以此识别用户 + public static final int ike_failed_ack = 3; // 失败 + public static final int player_login_req = 4; // 登录 + public static final int player_login_succeed_ack = 5; // 成功,将返回的新token,替换之前ike阶段的token,放置于header X-Token段,服务器以此识别用户 + public static final int player_login_failed_ack = 6; // 失败 + public static final int player_data_req = 1001; // 获取用户全量数据 + public static final int player_data_succeed_ack = 1002; // 成功,如果是新账号,会返回player_new_notify协议 + public static final int player_data_failed_ack = 1003; // 请求失败 + public static final int player_reg_req = 1004; // 注册角色 + public static final int player_reg_failed_ack = 1005; // 注册失败 返回错误,反之,成功会调用player_data_succeed_ack + public static final int player_name_edit_req = 1006; // 请求修改昵称 + public static final int player_name_edit_succeed_ack = 1007; // 请求修改昵称成功 + public static final int player_name_edit_failed_ack = 1008; // 请求修改昵称失败 + public static final int player_head_icon_set_req = 1009; // 请求设置头像 + public static final int player_head_icon_set_succeed_ack = 1010; // 设置头像成功 + public static final int player_head_icon_set_failed_ack = 1011; // 设置头像失败 + public static final int player_ping_req = 1012; // 心跳 + public static final int player_ping_succeed_ack = 1013; // 心跳回馈 + public static final int player_ping_failed_ack = 1014; // 不会返回失败 + public static final int player_learn_req = 1015; // 新手教学@提交教学信息 + public static final int player_learn_succeed_ack = 1016; // 教学步骤记录成功 + public static final int player_learn_failed_ack = 1017; // 教学记录失败 + public static final int player_destroy_req = 1018; // 获取注销账号数据NotifyUrl + public static final int player_destroy_succeed_ack = 1019; // 生成注销回调地址以提交到sdk server + public static final int player_destroy_failed_ack = 1020; // 获取失败 + public static final int player_board_set_req = 1021; // 请求设置看板 + public static final int player_board_set_succeed_ack = 1022; // 设置看板成功 + public static final int player_board_set_failed_ack = 1023; // 设置看板失败 + public static final int player_world_class_reward_receive_req = 1024; // 请求领取世界等级奖励 + public static final int player_world_class_reward_receive_succeed_ack = 1025; // 请求领取世界等级奖励成功 + public static final int player_world_class_reward_receive_failed_ack = 1026; // 请求领取世界等级奖励失败 + public static final int player_signature_edit_req = 1027; // 请求修改签名 + public static final int player_signature_edit_succeed_ack = 1028; // 请求修改签名成功 + public static final int player_signature_edit_failed_ack = 1029; // 请求修改签名失败 + public static final int player_title_edit_req = 1030; // 请求修改头衔 + public static final int player_title_edit_succeed_ack = 1031; // 请求修改头衔成功 + public static final int player_title_edit_failed_ack = 1032; // 请求修改头衔失败 + public static final int player_chars_show_req = 1033; // 请求展示角色 + public static final int player_chars_show_succeed_ack = 1034; // 请求展示角色成功 + public static final int player_chars_show_failed_ack = 1035; // 请求展示角色失败 + public static final int player_skin_show_req = 1036; // 请求展示皮肤 + public static final int player_skin_show_succeed_ack = 1037; // 请求展示皮肤成功 + public static final int player_skin_show_failed_ack = 1038; // 请求展示皮肤失败 + public static final int player_gender_edit_req = 1039; // 请求切换性别 + public static final int player_gender_edit_succeed_ack = 1040; // 切换性别成功 + public static final int player_gender_edit_failed_ack = 1041; // 切换性别失败 + public static final int player_survey_req = 1042; // 申请发起调查问卷@填写问卷ID + public static final int player_survey_succeed_ack = 1043; // 返回第三方问卷ID和回调通知地址 + public static final int player_survey_failed_ack = 1044; // 申请失败,比如过期,已经完成过 + public static final int player_exit_req = 1045; // 退出游戏 + public static final int player_exit_succeed_ack = 1046; // 退出成功 + public static final int player_exit_failed_ack = 1047; // 退出失败 + public static final int player_honor_edit_req = 1048; // 荣誉称号最新的列表 + public static final int player_honor_edit_succeed_ack = 1049; // 修改成功 + public static final int player_honor_edit_failed_ack = 1050; // 修改失败 + public static final int player_world_class_advance_req = 1051; // 请求领取世界等级阶段奖励 + public static final int player_world_class_advance_succeed_ack = 1052; // 请求领取世界等级奖励成功(等级和经验变化由changeInfo携带) + public static final int player_world_class_advance_failed_ack = 1053; // 请求领取世界 + public static final int player_music_set_req = 1054; // 设置首页音乐(星盘ID) + public static final int player_music_set_succeed_ack = 1055; // 设置音乐成功 + public static final int player_music_set_failed_ack = 1056; // 设置音乐失败 + public static final int player_head_icon_info_req = 1057; // 获取所有头像列表 + public static final int player_head_icon_info_succeed_ack = 1058; // 获取头像成功 + public static final int player_head_icon_info_failed_ack = 1059; // 获取头像失败 + public static final int item_use_req = 1101; // 道具使用 + public static final int item_use_succeed_ack = 1102; // 道具使用成功,返回ChangeInfo + public static final int item_use_failed_ack = 1103; // 道具使用失败,返回错误信息 + public static final int gem_convert_req = 1104; // 砖石转换@传入钻石数量,兑换心相碎片,默认规则(免费钻不够使用付费钻) + public static final int gem_convert_succeed_ack = 1105; // 兑换成功 + public static final int gem_convert_failed_ack = 1106; // 兑换失败 + public static final int item_product_req = 1107; // 材料合成 + public static final int item_product_succeed_ack = 1108; // 材料合成成功 + public static final int item_product_failed_ack = 1109; // 材料合成失败 + public static final int fragments_convert_req = 1110; // 所有角色溢出碎片兑换 + public static final int fragments_convert_succeed_ack = 1111; // 兑换成功 + public static final int fragments_convert_failed_ack = 1112; // 兑换失败 + public static final int daily_shop_reward_receive_req = 1113; // 领取商店每日免费赠礼 + public static final int daily_shop_reward_receive_succeed_ack = 1114; // 领取成功 + public static final int daily_shop_reward_receive_failed_ack = 1115; // 领取失败 + public static final int item_quick_growth_req = 1116; // 道具快速养成 + public static final int item_quick_growth_succeed_ack = 1117; // 养成成功 + public static final int item_quick_growth_failed_ack = 1118; // 养成失败 + public static final int friend_list_get_req = 1201; // 请求获取好友/好友申请列表 + public static final int friend_list_get_succeed_ack = 1202; // 获取好友/好友申请列表成功 + public static final int friend_list_get_failed_ack = 1203; // 获取好友/好友申请列表失败 + public static final int friend_uid_search_req = 1204; // 请求通过UId搜索用户信息 + public static final int friend_uid_search_succeed_ack = 1205; // 通过UId搜索用户信息成功 + public static final int friend_uid_search_failed_ack = 1206; // 通过UId搜索用户信息失败 + public static final int friend_name_search_req = 1207; // 搜索用户信息@传入用户昵称 + public static final int friend_name_search_succeed_ack = 1208; // 通过用户昵称搜索用户信息成功 + public static final int friend_name_search_failed_ack = 1209; // 通过用户昵称搜索用户信息失败 + public static final int friend_add_req = 1210; // 请求申请添加好友 + public static final int friend_add_succeed_ack = 1211; // 申请添加好友成功 + public static final int friend_add_failed_ack = 1212; // 申请添加好友失败 + public static final int friend_add_agree_req = 1213; // 同意添加好友请求 + public static final int friend_add_agree_succeed_ack = 1214; // 同意添加好友成功 + public static final int friend_add_agree_failed_ack = 1215; // 同意添加好友失败 + public static final int friend_all_agree_req = 1216; // 请求一键添加好友 + public static final int friend_all_agree_succeed_ack = 1217; // 一键添加好友成功 + public static final int friend_all_agree_failed_ack = 1218; // 一键添加好友失败 + public static final int friend_delete_req = 1219; // 请求删除好友 + public static final int friend_delete_succeed_ack = 1220; // 删除好友成功 + public static final int friend_delete_failed_ack = 1221; // 删除好友失败 + public static final int friend_invites_delete_req = 1222; // 请求删除好友申请 + public static final int friend_invites_delete_succeed_ack = 1223; // 删除好友申请成功 + public static final int friend_invites_delete_failed_ack = 1224; // 删除好友申请失败 + public static final int friend_star_set_req = 1225; // 请求设置星级好友 + public static final int friend_star_set_succeed_ack = 1226; // 请求设置星级好友成功 + public static final int friend_star_set_failed_ack = 1227; // 请求设置星级好友失败 + public static final int friend_receive_energy_req = 1228; // 请求领取好友赠送体力 + public static final int friend_receive_energy_succeed_ack = 1229; // 请求领取好友赠送体力成功 + public static final int friend_receive_energy_failed_ack = 1230; // 请求领取好友赠送体力失败 + public static final int friend_send_energy_req = 1231; // 请求赠送好友体力 + public static final int friend_send_energy_succeed_ack = 1232; // 请求赠送好友体力成功 + public static final int friend_send_energy_failed_ack = 1233; // 请求赠送好友体力失败 + public static final int friend_recommendation_get_req = 1234; // 请求好友推荐列表 + public static final int friend_recommendation_get_succeed_ack = 1235; // 请求好友推荐列表成功 + public static final int friend_recommendation_get_failed_ack = 1236; // 请求好友推荐列表失败 + public static final int tower_growth_detail_req = 1301; // 获取星塔养成详细信息 + public static final int tower_growth_detail_succeed_ack = 1302; // 获取成功 + public static final int tower_growth_detail_failed_ack = 1303; // 获取信息失败,返回错误 + public static final int tower_growth_node_unlock_req = 1304; // 星塔天赋解锁@传入节点ID,解锁对应的养成节点 + public static final int tower_growth_node_unlock_succeed_ack = 1305; // 解锁成功 + public static final int tower_growth_node_unlock_failed_ack = 1306; // 解锁失败,返回错误信息 + public static final int tower_growth_group_node_unlock_req = 1307; // 星塔天赋组解锁@传入节点组ID,根据材料解锁所有能解锁的节点 + public static final int tower_growth_group_node_unlock_succeed_ack = 1308; // 解锁成功 + public static final int tower_growth_group_node_unlock_failed_ack = 1309; // 解锁失败,返回错误信息 + public static final int player_formation_req = 2001; // 设置编队 + public static final int player_formation_succeed_ack = 2002; // 设置编队成功 + public static final int player_formation_failed_ack = 2003; // 设置编队失败 + public static final int char_upgrade_req = 2301; // 角色升级 + public static final int char_upgrade_succeed_ack = 2302; // 角色升级成功 + public static final int char_upgrade_failed_ack = 2303; // 角色升级失败 + public static final int char_advance_req = 2304; // 角色进阶@传入角色ID + public static final int char_advance_succeed_ack = 2305; // 进阶成功 + public static final int char_advance_failed_ack = 2306; // 进阶失败 + public static final int char_skill_upgrade_req = 2307; // 角色技能升级 + public static final int char_skill_upgrade_succeed_ack = 2308; // 升级成功 + public static final int char_skill_upgrade_failed_ack = 2309; // 升级失败 + public static final int char_advance_reward_receive_req = 2313; // 请求领取角色进阶奖励 + public static final int char_advance_reward_receive_succeed_ack = 2314; // 请求领取角色进阶奖励成功 + public static final int char_advance_reward_receive_failed_ack = 2315; // 请求领取角色进阶奖励失败 + public static final int char_skin_set_req = 2316; // 设置角色皮肤 + public static final int char_skin_set_succeed_ack = 2317; // 设置成功 + public static final int char_skin_set_failed_ack = 2318; // 设置失败 + public static final int char_affinity_quest_reward_receive_req = 2322; // 请求领取角色好感度任务奖励 + public static final int char_affinity_quest_reward_receive_succeed_ack = 2323; // 请求领取角色好感度任务成功 + public static final int char_affinity_quest_reward_receive_failed_ack = 2324; // 请求领取角色好感度任务失败 + public static final int char_recruitment_req = 2325; // 招募角色@传入角色ID + public static final int char_recruitment_succeed_ack = 2326; // 招募成功 + public static final int char_recruitment_failed_ack = 2327; // 招募失败 + public static final int char_affinity_gift_send_req = 2328; // 请求赠送好感度礼物 + public static final int char_affinity_gift_send_succeed_ack = 2329; // 请求赠送好感度礼物成功 + public static final int char_affinity_gift_send_failed_ack = 2330; // 请求赠送好感度礼物失败 + public static final int char_dating_landmark_select_req = 2401; // 选择地点邀约角色 + public static final int char_dating_landmark_select_succeed_ack = 2402; // 选择地点邀约角色成功 + public static final int char_dating_landmark_select_failed_ack = 2403; // 选择地点邀约角色失败 + public static final int char_dating_gift_send_req = 2404; // 请求邀约赠礼 + public static final int char_dating_gift_send_succeed_ack = 2405; // 请求邀约赠礼成功 + public static final int char_dating_gift_send_failed_ack = 2406; // 请求邀约赠礼失败 + public static final int char_dating_event_reward_receive_req = 2407; // 请求领取特殊事件奖励 + public static final int char_dating_event_reward_receive_succeed_ack = 2408; // 请求领取特殊事件奖励成功 + public static final int char_dating_event_reward_receive_failed_ack = 2409; // 请求领取特殊事件奖励失败 + public static final int char_archive_reward_receive_req = 2410; // 请求领取角色档案奖励 + public static final int char_archive_reward_receive_succeed_ack = 2411; // 请求领取角色档案奖励成功 + public static final int char_archive_reward_receive_failed_ack = 2412; // 请求领取角色档案奖励失败 + public static final int char_dating_branch_a_select_req = 2413; // 选择分支A选项 + public static final int char_dating_branch_a_select_succeed_ack = 2414; // 选择分支A选项成功 + public static final int char_dating_branch_a_select_failed_ack = 2415; // 选择分支A选项失败 + public static final int char_dating_branch_b_select_req = 2416; // 选择分支B选项 + public static final int char_dating_branch_b_select_succeed_ack = 2417; // 选择分支B选项成功 + public static final int char_dating_branch_b_select_failed_ack = 2418; // 选择分支B选项失败 + public static final int char_gem_generate_req = 2501; // 角色宝石生成 + public static final int char_gem_generate_succeed_ack = 2502; // 生成成功 + public static final int char_gem_generate_failed_ack = 2503; // 生成失败 + public static final int char_gem_refresh_req = 2504; // 角色宝石刷新 + public static final int char_gem_refresh_succeed_ack = 2505; // 刷新成功 + public static final int char_gem_refresh_failed_ack = 2506; // 刷新失败 + public static final int char_gem_replace_attribute_req = 2507; // 角色宝石属性替换 + public static final int char_gem_replace_attribute_succeed_ack = 2508; // 替换成功 + public static final int char_gem_replace_attribute_failed_ack = 2509; // 替换失败 + public static final int char_gem_update_gem_lock_status_req = 2510; // 更新角色宝石锁定状态 + public static final int char_gem_update_gem_lock_status_succeed_ack = 2511; // 更新成功 + public static final int char_gem_update_gem_lock_status_failed_ack = 2512; // 更新失败 + public static final int char_gem_use_preset_req = 2513; // 角色使用预设 + public static final int char_gem_use_preset_succeed_ack = 2514; // 使用成功 + public static final int char_gem_use_preset_failed_ack = 2515; // 使用失败 + public static final int char_gem_rename_preset_req = 2516; // 角色预设重命名 + public static final int char_gem_rename_preset_succeed_ack = 2517; // 重命名成功 + public static final int char_gem_rename_preset_failed_ack = 2518; // 重命名失败 + public static final int char_gem_equip_gem_req = 2519; // 角色宝石装备宝石 + public static final int char_gem_equip_gem_succeed_ack = 2520; // 装备成功 + public static final int char_gem_equip_gem_failed_ack = 2521; // 装备失败 + public static final int disc_strengthen_req = 3119; // 星盘强化 + public static final int disc_strengthen_succeed_ack = 3120; // 星盘强化成功 + public static final int disc_strengthen_failed_ack = 3121; // 星盘强化失败 + public static final int disc_promote_req = 3122; // 星盘升阶 + public static final int disc_promote_succeed_ack = 3123; // 星盘升阶成功 + public static final int disc_promote_failed_ack = 3124; // 星盘升阶失败 + public static final int disc_limit_break_req = 3125; // 星盘突破 + public static final int disc_limit_break_succeed_ack = 3126; // 星盘突破成功 + public static final int disc_limit_break_failed_ack = 3127; // 星盘突破失败 + public static final int disc_read_reward_receive_req = 3128; // 请求领取星盘阅读奖励 + public static final int disc_read_reward_receive_succeed_ack = 3129; // 请求领取星盘阅读奖励成功 + public static final int disc_read_reward_receive_failed_ack = 3130; // 请求领取星盘阅读奖励失败 + public static final int agent_apply_req = 3301; // 请求派遣委托 + public static final int agent_apply_succeed_ack = 3302; // 请求派遣委托成功 + public static final int agent_apply_failed_ack = 3303; // 请求派遣委托失败 + public static final int agent_give_up_req = 3304; // 请求放弃派遣委托 + public static final int agent_give_up_succeed_ack = 3305; // 请求放弃派遣委托成功 + public static final int agent_give_up_failed_ack = 3306; // 请求放弃派遣委托失败 + public static final int agent_reward_receive_req = 3307; // 请求领取派遣委托奖励 + public static final int agent_reward_receive_succeed_ack = 3308; // 请求领取派遣委托奖励成功 + public static final int agent_reward_receive_failed_ack = 3309; // 请求领取派遣委托奖励失败 + public static final int quest_tour_guide_reward_receive_req = 4201; // 领取手册任务奖励@value表示任务ID,0表示一键领取 + public static final int quest_tour_guide_reward_receive_succeed_ack = 4202; // 获取成功 + public static final int quest_tour_guide_reward_receive_failed_ack = 4203; // 获取失败 + public static final int quest_daily_reward_receive_req = 4204; // 领取日常任务奖励@value表示任务ID,0表示一键领取 + public static final int quest_daily_reward_receive_succeed_ack = 4205; // 获取成功 + public static final int quest_daily_reward_receive_failed_ack = 4206; // 获取失败 + public static final int dictionary_reward_receive_req = 4207; // 领取词条奖励 + public static final int dictionary_reward_receive_succeed_ack = 4208; // 获取成功 + public static final int dictionary_reward_receive_failed_ack = 4209; // 获取失败 + public static final int quest_tower_reward_receive_req = 4210; // 领取星塔任务奖励@value表示任务ID,0表示一键领取 + public static final int quest_tower_reward_receive_succeed_ack = 4211; // 获取成功 + public static final int quest_tower_reward_receive_failed_ack = 4212; // 获取失败 + public static final int quest_daily_active_reward_receive_req = 4213; // 领取日常任务活跃奖励 + public static final int quest_daily_active_reward_receive_succeed_ack = 4214; // 领取日常任务活跃奖励成功 + public static final int quest_daily_active_reward_receive_failed_ack = 4215; // 领取日常任务活跃奖励失败 + public static final int quest_tour_guide_group_reward_receive_req = 4216; // 领取任务组奖励 + public static final int quest_tour_guide_group_reward_receive_succeed_ack = 4217; // 获取成功 + public static final int quest_tour_guide_group_reward_receive_failed_ack = 4218; // 获取失败 + public static final int activity_task_reward_receive_req = 4301; // 请求领取活动任务完成奖励 + public static final int activity_task_reward_receive_succeed_ack = 4302; // 请求领取活动任务完成奖励成功 + public static final int activity_task_reward_receive_failed_ack = 4303; // 请求领取活动任务完成奖励失败 + public static final int activity_task_group_reward_receive_req = 4304; // 请求领取活动任务组完成奖励 + public static final int activity_task_group_reward_receive_succeed_ack = 4305; // 请求领取活动任务组完成奖励成功 + public static final int activity_task_group_reward_receive_failed_ack = 4306; // 请求领取活动任务组完成奖励失败 + public static final int achievement_reward_receive_req = 4401; // 领取成就奖励 + public static final int achievement_reward_receive_succeed_ack = 4402; // 获取成功 + public static final int achievement_reward_receive_failed_ack = 4403; // 获取失败 + public static final int achievement_info_req = 4404; // 获取成就数据 + public static final int achievement_info_succeed_ack = 4405; // 获取成功 + public static final int achievement_info_failed_ack = 4406; // 获取失败 + public static final int infinity_tower_info_req = 4501; // 申请无尽塔关卡数据 + public static final int infinity_tower_info_succeed_ack = 4502; // 申请无尽塔关卡数据成功 + public static final int infinity_tower_info_failed_ack = 4503; // 申请无尽塔关卡数据失败 + public static final int infinity_tower_apply_req = 4504; // 申请进入无尽塔关卡 + public static final int infinity_tower_apply_succeed_ack = 4505; // 申请进入无尽塔关卡成功 + public static final int infinity_tower_apply_failed_ack = 4506; // 申请进入无尽塔关卡失败 + public static final int infinity_tower_settle_req = 4507; // 申请结算无尽塔关卡 + public static final int infinity_tower_settle_succeed_ack = 4508; // 申请结算无尽塔成功 非0表示可以继续挑战关卡ID(失败当前关卡ID,成功下一个关卡ID),无需再发申请 + public static final int infinity_tower_settle_failed_ack = 4509; // 申请结算无尽塔失败 + public static final int infinity_tower_daily_reward_receive_req = 4510; // 请求领取无尽塔每日奖励 + public static final int infinity_tower_daily_reward_receive_succeed_ack = 4511; // 请求领取无尽塔每日奖励成功 + public static final int infinity_tower_daily_reward_receive_failed_ack = 4512; // 请求领取无尽塔每日奖励失败 + public static final int infinity_tower_plot_reward_receive_req = 4513; // 请求领取无尽塔剧情奖励 + public static final int infinity_tower_plot_reward_receive_succeed_ack = 4514; // 请求领取无尽塔剧情奖励成功 + public static final int infinity_tower_plot_reward_receive_failed_ack = 4515; // 请求领取无尽塔剧情奖励失败 + public static final int star_tower_apply_req = 4601; // 申请探索星塔 + public static final int star_tower_apply_succeed_ack = 4602; // 申请成功返回 + public static final int star_tower_apply_failed_ack = 4603; // 申请失败 + public static final int star_tower_interact_req = 4607; // 星塔交互请求 + public static final int star_tower_interact_succeed_ack = 4608; // 交互请求成功 + public static final int star_tower_interact_failed_ack = 4609; // 申请失败 + public static final int star_tower_info_req = 4610; // 重连获取星塔信息 + public static final int star_tower_info_succeed_ack = 4611; // 获取星塔信息成功 + public static final int star_tower_info_failed_ack = 4612; // 获取星塔信息失败 + public static final int star_tower_give_up_req = 4613; // 放弃星塔 + public static final int star_tower_give_up_succeed_ack = 4614; // 放弃星塔成功 + public static final int star_tower_give_up_failed_ack = 4615; // 放弃星塔失败 + public static final int star_tower_build_whether_save_req = 4701; // 请求是否保存星塔build + public static final int star_tower_build_whether_save_succeed_ack = 4702; // 请求是否保存星塔build返回 + public static final int star_tower_build_whether_save_failed_ack = 4703; // 请求是否保存星塔build失败 + public static final int star_tower_build_brief_list_get_req = 4704; // 请求星塔build简要信息列表 + public static final int star_tower_build_brief_list_get_succeed_ack = 4705; // 请求星塔build简要信息列表返回 + public static final int star_tower_build_brief_list_get_failed_ack = 4706; // 请求星塔build简要信息列表失败 + public static final int star_tower_build_detail_get_req = 4707; // 请求星塔build详细信息列表 + public static final int star_tower_build_detail_get_succeed_ack = 4708; // 请求星塔build详细信息列表返回 + public static final int star_tower_build_detail_get_failed_ack = 4709; // 请求遗迹build详细信息列表失败 + public static final int star_tower_build_delete_req = 4710; // 请求解散星塔build + public static final int star_tower_build_delete_succeed_ack = 4711; // 请求解散星塔build返回 + public static final int star_tower_build_delete_failed_ack = 4712; // 请求解散星塔build失败 + public static final int star_tower_build_name_set_req = 4713; // 请求设置星塔build名 + public static final int star_tower_build_name_set_succeed_ack = 4714; // 请求设置星塔build名返回 + public static final int star_tower_build_name_set_failed_ack = 4715; // 请求设置星塔build名失败 + public static final int star_tower_build_lock_unlock_req = 4716; // 请求星塔build加解锁 + public static final int star_tower_build_lock_unlock_succeed_ack = 4717; // 请求星塔build加解锁返回 + public static final int star_tower_build_lock_unlock_failed_ack = 4718; // 请求星塔build加解锁失败 + public static final int star_tower_build_preference_set_req = 4719; // 请求设置星塔build偏好 + public static final int star_tower_build_preference_set_succeed_ack = 4720; // 请求设置星塔build偏好返回 + public static final int star_tower_build_preference_set_failed_ack = 4721; // 请求设置星塔build偏好失败 + public static final int star_tower_book_potential_brief_list_get_req = 4901; // 请求星塔图鉴角色潜能简要信息 + public static final int star_tower_book_potential_brief_list_get_succeed_ack = 4902; // 请求星塔图鉴角色潜能简要信息成功 + public static final int star_tower_book_potential_brief_list_get_failed_ack = 4903; // 请求星塔图鉴角色潜能简要信息失败 + public static final int star_tower_book_char_potential_get_req = 4904; // 请求星塔图鉴角色潜能信息 + public static final int star_tower_book_char_potential_get_succeed_ack = 4905; // 请求星塔图鉴角色潜能信息成功 + public static final int star_tower_book_char_potential_get_failed_ack = 4906; // 请求星塔图鉴角色潜能信息失败 + public static final int star_tower_book_potential_reward_receive_req = 4907; // 请求领取星塔图鉴角色潜能奖励 + public static final int star_tower_book_potential_reward_receive_succeed_ack = 4908; // 请求领取星塔图鉴角色潜能奖励成功 + public static final int star_tower_book_potential_reward_receive_failed_ack = 4909; // 请求领取星塔图鉴角色潜能奖励失败 + public static final int star_tower_book_event_reward_receive_req = 4913; // 请求领取星塔图鉴角色潜能奖励 + public static final int star_tower_book_event_reward_receive_succeed_ack = 4914; // 请求领取星塔图鉴角色潜能奖励成功 + public static final int star_tower_book_event_reward_receive_failed_ack = 4915; // 请求领取星塔图鉴角色潜能奖励失败 + public static final int npc_affinity_book_get_req = 4916; // 请求NPC好感度图鉴信息 + public static final int npc_affinity_book_get_succeed_ack = 4917; // 请求NPC好感度图鉴信息成功 + public static final int npc_affinity_book_get_failed_ack = 4918; // 请求NPC好感度图鉴信息失败 + public static final int npc_affinity_plot_reward_receive_req = 4919; // 请求领取好感度剧情奖励 + public static final int npc_affinity_plot_reward_receive_succeed_ack = 4920; // 请求领取好感度剧情奖励成功 + public static final int npc_affinity_plot_reward_receive_failed_ack = 4921; // 请求领取好感度剧情奖励失败 + public static final int resident_shop_get_req = 5010; // 请求常驻商店信息 + public static final int resident_shop_get_succeed_ack = 5011; // 请求常驻商店信息成功 + public static final int resident_shop_get_failed_ack = 5012; // 请求常驻商店信息失败 + public static final int resident_shop_purchase_req = 5013; // 请求常驻商店购买物品 + public static final int resident_shop_purchase_succeed_ack = 5014; // 请求常驻商店购买物品成功 + public static final int resident_shop_purchase_failed_ack = 5015; // 请求常驻商店购买物品失败 + public static final int mall_gem_list_req = 5101; // 获取钻石商城产品列表 + public static final int mall_gem_list_succeed_ack = 5102; // 获取成功的列表 + public static final int mall_gem_list_failed_ack = 5103; // 获取失败 + public static final int mall_gem_order_req = 5104; // 下单购买商品 + public static final int mall_gem_order_succeed_ack = 5105; // 下单成功 + public static final int mall_gem_order_failed_ack = 5106; // 下单失败 + public static final int mall_order_cancel_req = 5107; // 取消某个尚未支付的订单 + public static final int mall_order_cancel_succeed_ack = 5108; // 取消成功 + public static final int mall_order_cancel_failed_ack = 5109; // 取消失败 + public static final int mall_order_collect_req = 5110; // 领取某个支付成功的订单的奖励 + public static final int mall_order_collect_succeed_ack = 5111; // 返回成功,请根据具体状态处理 + public static final int mall_order_collect_failed_ack = 5112; // 领取失败 + public static final int mall_monthlyCard_list_req = 5113; // 获取月卡商城产品列表 + public static final int mall_monthlyCard_list_succeed_ack = 5114; // 获取成功的列表 + public static final int mall_monthlyCard_list_failed_ack = 5115; // 获取失败 + public static final int mall_monthlyCard_order_req = 5116; // 购买月卡商城商品 + public static final int mall_monthlyCard_order_succeed_ack = 5117; // 下单成功 + public static final int mall_monthlyCard_order_failed_ack = 5118; // 获取失败 + public static final int mall_package_list_req = 5119; // 获取礼包商城商品列表 + public static final int mall_package_list_succeed_ack = 5120; // 商品列表 + public static final int mall_package_list_failed_ack = 5121; // 获取失败 + public static final int mall_package_order_req = 5122; // 购买礼包商城产品 + public static final int mall_package_order_succeed_ack = 5123; // 购买成功结果 + public static final int mall_package_order_failed_ack = 5124; // 购买失败 + public static final int mall_shop_list_req = 5125; // 获取星尘兑换商城商品列表 + public static final int mall_shop_list_succeed_ack = 5126; // 商品列表 + public static final int mall_shop_list_failed_ack = 5127; // 获取失败 + public static final int mall_shop_order_req = 5128; // 购买星尘兑换商店产品 + public static final int mall_shop_order_succeed_ack = 5129; // 购买成功结果 + public static final int mall_shop_order_failed_ack = 5130; // 购买失败 + public static final int gacha_spin_req = 6001; // 抽卡@传入卡池ID以及抽卡模式 + public static final int gacha_spin_succeed_ack = 6002; // 成功,返回掉落道具以及ChangeInfo + public static final int gacha_spin_failed_ack = 6003; // 错误,返回错误信息 + public static final int gacha_information_req = 6004; // 获取所有卡池数据 + public static final int gacha_information_succeed_ack = 6005; // 成功,返回所有的卡池数据 + public static final int gacha_information_failed_ack = 6006; // 错误,返回错误信息 + public static final int gacha_histories_req = 6007; // 获取抽卡的历史记录@传入存盘ID + public static final int gacha_histories_succeed_ack = 6008; // 成功,返回抽卡的历史数据 + public static final int gacha_histories_failed_ack = 6009; // 错误,返回错误 + public static final int gacha_guarantee_reward_receive_req = 6010; // 领取天井奖励@传入卡池ID + public static final int gacha_guarantee_reward_receive_succeed_ack = 6011; // 成功,返回奖励 + public static final int gacha_guarantee_reward_receive_failed_ack = 6012; // 失败,返回错误信息 + public static final int gacha_newbie_spin_req = 6013; // 新手卡池抽卡@传入卡池ID + public static final int gacha_newbie_spin_succeed_ack = 6014; // 成功,返回抽卡的结果 + public static final int gacha_newbie_spin_failed_ack = 6015; // 错误,返回错误 + public static final int gacha_newbie_save_req = 6016; // 新手卡池结果保存 + public static final int gacha_newbie_save_succeed_ack = 6017; // 成功,不返回任何内容 + public static final int gacha_newbie_save_failed_ack = 6018; // 错误,返回错误 + public static final int gacha_newbie_obtain_req = 6019; // 获取新手卡池结果 + public static final int gacha_newbie_obtain_succeed_ack = 6020; // 成功,返回道具变化 + public static final int gacha_newbie_obtain_failed_ack = 6021; // 错误,返回错误 + public static final int gacha_newbie_info_req = 6022; // 获取新手卡池信息@返回所有新手卡池信息 + public static final int gacha_newbie_info_succeed_ack = 6023; // 成功,返回道具变化 + public static final int gacha_newbie_info_failed_ack = 6024; // 错误,返回错误 + public static final int tower_book_fate_card_detail_req = 6101; // 获取已经拥有的命运卡图鉴 + public static final int tower_book_fate_card_detail_succeed_ack = 6102; // 成功,返回已经拥有的命运卡和已经领取的任务 + public static final int tower_book_fate_card_detail_failed_ack = 6103; // 错误,返回错误信息 + public static final int tower_book_fate_card_reward_receive_req = 6104; // 领取命运卡任务奖励 + public static final int tower_book_fate_card_reward_receive_succeed_ack = 6105; // 成功,返回任务奖励 + public static final int tower_book_fate_card_reward_receive_failed_ack = 6106; // 错误,返回错误信息 + public static final int joint_drill_apply_req = 6201; // 总力战申请 + public static final int joint_drill_apply_succeed_ack = 6202; // 总力战申请成功 + public static final int joint_drill_apply_failed_ack = 6203; // 总力战申请失败 + public static final int joint_drill_continue_req = 6204; // 总力战申请继续战斗 + public static final int joint_drill_continue_succeed_ack = 6205; // 总力战申请继续战斗成功 + public static final int joint_drill_continue_failed_ack = 6206; // 总力战申请继续战斗失败 + public static final int joint_drill_sync_req = 6207; // 总力战同步记录 + public static final int joint_drill_sync_succeed_ack = 6208; // 总力战同步记录成功 + public static final int joint_drill_sync_failed_ack = 6209; // 总力战同步记录失败 + public static final int joint_drill_give_up_req = 6210; // 总力战战斗放弃/失败 + public static final int joint_drill_give_up_succeed_ack = 6211; // 总力战申请小队战斗放弃/失败成功 + public static final int joint_drill_give_up_failed_ack = 6212; // 总力战申请小队战斗放弃/失败失败 + public static final int joint_drill_retreat_req = 6213; // 总力战申请小队战斗撤退 + public static final int joint_drill_retreat_succeed_ack = 6214; // 总力战申请小队战斗撤退成功 + public static final int joint_drill_retreat_failed_ack = 6215; // 总力战申请小队战斗撤退失败 + public static final int joint_drill_settle_req = 6216; // 总力战小队结算(胜利)申请 + public static final int joint_drill_settle_succeed_ack = 6217; // 总力战小队结算(胜利)申请成功 + public static final int joint_drill_settle_failed_ack = 6218; // 总力战小队结算(胜利)申请失败 + public static final int joint_drill_game_over_req = 6219; // 总力战结束挑战 + public static final int joint_drill_game_over_succeed_ack = 6220; // 总力战结束挑战成功 + public static final int joint_drill_game_over_failed_ack = 6221; // 总力战结束挑战失败 + public static final int joint_drill_sweep_req = 6222; // 请求扫荡总力战关卡 + public static final int joint_drill_sweep_succeed_ack = 6223; // 请求扫荡总力战关卡成功 + public static final int joint_drill_sweep_failed_ack = 6224; // 请求扫荡总力战关卡失败 + public static final int joint_drill_rank_req = 6225; // 请求总力战排行榜信息 + public static final int joint_drill_rank_succeed_ack = 6226; // 请求总力战排行榜信息成功 + public static final int joint_drill_rank_failed_ack = 6227; // 请求总力战排行榜信息失败 + public static final int joint_drill_quest_reward_receive_req = 6228; // 请求领取总力战任务奖励 + public static final int joint_drill_quest_reward_receive_succeed_ack = 6229; // 请求领取总力战任务奖励成功 + public static final int joint_drill_quest_reward_receive_failed_ack = 6230; // 请求领取总力战任务奖励失败 + public static final int plot_reward_receive_req = 7013; // 领取剧情奖励@传入剧情ID + public static final int plot_reward_receive_succeed_ack = 7014; // 领取成功 + public static final int plot_reward_receive_failed_ack = 7015; // 领取失败 + public static final int daily_instance_apply_req = 7016; // 日常副本申请 + public static final int daily_instance_apply_succeed_ack = 7017; // 日常副本申请成功 + public static final int daily_instance_apply_failed_ack = 7018; // 错误,返回错误信息 + public static final int daily_instance_settle_req = 7019; // 日常副本结算请求 + public static final int daily_instance_settle_succeed_ack = 7020; // 日常副本结算成功 + public static final int daily_instance_settle_failed_ack = 7021; // 错误,返回错误信息 + public static final int daily_instance_raid_req = 7022; // 日常副本扫荡请求 + public static final int daily_instance_raid_succeed_ack = 7023; // 日常副本扫荡成功 + public static final int daily_instance_raid_failed_ack = 7024; // 错误,返回错误信息 + public static final int char_gem_instance_apply_req = 7028; // 角色宝石碎片副本申请 + public static final int char_gem_instance_apply_succeed_ack = 7029; // 角色宝石碎片副本申请成功 + public static final int char_gem_instance_apply_failed_ack = 7030; // 角色宝石碎片副本申请失败 + public static final int char_gem_instance_settle_req = 7031; // 角色宝石碎片副本结算请求 + public static final int char_gem_instance_settle_succeed_ack = 7032; // 角色宝石碎片副本结算成功 + public static final int char_gem_instance_settle_failed_ack = 7033; // 错误,返回错误信息 + public static final int char_gem_instance_sweep_req = 7034; // 角色宝石碎片副本扫荡请求 + public static final int char_gem_instance_sweep_succeed_ack = 7035; // 角色宝石碎片副本扫荡成功 + public static final int char_gem_instance_sweep_failed_ack = 7036; // 错误,返回错误信息 + public static final int region_boss_level_apply_req = 7101; // 请求进入地区boss关卡 + public static final int region_boss_level_apply_succeed_ack = 7102; // 请求进入地区boss关成功 + public static final int region_boss_level_apply_failed_ack = 7103; // 请求进入地区boss关卡失败 + public static final int region_boss_level_settle_req = 7104; // 请求结算地区boss关卡 + public static final int region_boss_level_settle_succeed_ack = 7105; // 请求结算地区boss关成功 + public static final int region_boss_level_settle_failed_ack = 7106; // 请求结算地区boss关卡失败 + public static final int region_boss_level_sweep_req = 7107; // 请求扫荡地区boss关卡 + public static final int region_boss_level_sweep_succeed_ack = 7108; // 请求扫荡地区boss关成功 + public static final int region_boss_level_sweep_failed_ack = 7109; // 请求结算地区boss关卡失败 + public static final int traveler_duel_level_apply_req = 7201; // 请求进入旅人对决关卡 + public static final int traveler_duel_level_apply_succeed_ack = 7202; // 请求进入旅人对决关卡成功 + public static final int traveler_duel_level_apply_failed_ack = 7203; // 请求进入旅人对决关卡失败 + public static final int traveler_duel_level_settle_req = 7204; // 请求结算旅人对决关卡 + public static final int traveler_duel_level_settle_succeed_ack = 7205; // 请求结算旅人对决关卡成功 + public static final int traveler_duel_level_settle_failed_ack = 7206; // 请求结算旅人对决关卡失败 + public static final int traveler_duel_info_req = 7207; // 请求旅人对决信息 + public static final int traveler_duel_info_succeed_ack = 7208; // 请求旅人对决信息成功 + public static final int traveler_duel_info_failed_ack = 7209; // 请求旅人对决信息失败 + public static final int traveler_duel_quest_reward_receive_req = 7210; // 领取旅人对决任务奖励 + public static final int traveler_duel_quest_reward_receive_succeed_ack = 7211; // 获取成功 + public static final int traveler_duel_quest_reward_receive_failed_ack = 7212; // 获取失败 + public static final int traveler_duel_rank_req = 7213; // 请求旅人对决排行榜信息 + public static final int traveler_duel_rank_succeed_ack = 7214; // 请求旅人对决排行榜信息成功 + public static final int traveler_duel_rank_failed_ack = 7215; // 请求旅人对决排行信息失败 + public static final int traveler_duel_rank_upload_req = 7216; // 旅人对决信息上传@请求旅人对决上传分数、附带本次战斗统计数据 + public static final int traveler_duel_rank_upload_succeed_ack = 7217; // 请求旅人对决上传分数成功 + public static final int traveler_duel_rank_upload_failed_ack = 7218; // 请求旅人对决上传分数失败 + public static final int story_apply_req = 7301; // 关卡申请 + public static final int story_apply_succeed_ack = 7302; // 申请成功,返回 Nil + public static final int story_apply_failed_ack = 7303; // 错误,返回错误信息 + public static final int story_settle_req = 7304; // 关卡结算 + public static final int story_settle_succeed_ack = 7305; // 结算成功,发放通关奖励 + public static final int story_settle_failed_ack = 7306; // 错误,返回错误信息 + public static final int skill_instance_apply_req = 7401; // 请求进入技能素材关卡 + public static final int skill_instance_apply_succeed_ack = 7402; // 请求进入技能素材关卡成功 + public static final int skill_instance_apply_failed_ack = 7403; // 请求进入技能素材关卡失败 + public static final int skill_instance_settle_req = 7404; // 请求结算技能素材本关卡 + public static final int skill_instance_settle_succeed_ack = 7405; // 请求结算技能素材本关卡成功 + public static final int skill_instance_settle_failed_ack = 7406; // 请求结算技能素材本关卡失败 + public static final int skill_instance_sweep_req = 7407; // 请求扫荡技能素材关卡 + public static final int skill_instance_sweep_succeed_ack = 7408; // 请求扫荡技能素材关卡成功 + public static final int skill_instance_sweep_failed_ack = 7409; // 请求扫荡技能素材关卡失败 + public static final int week_boss_apply_req = 7410; // 请求进入周长boss本 + public static final int week_boss_apply_succeed_ack = 7411; // 请求进入周长boss本成功 + public static final int week_boss_apply_failed_ack = 7412; // 请求进入周长boss本失败 + public static final int week_boss_settle_req = 7413; // 请求结算周长boss本 + public static final int week_boss_settle_succeed_ack = 7414; // 请求结算周长boss本成功 + public static final int week_boss_settle_failed_ack = 7415; // 请求结算周长boss本失败 + public static final int tutorial_level_settle_req = 7501; // 教学关卡结算 + public static final int tutorial_level_settle_succeed_ack = 7502; // 教学关卡结算成功 + public static final int tutorial_level_settle_failed_ack = 7503; // 教学关卡结算失败 + public static final int tutorial_level_reward_receive_req = 7504; // 领取教学关卡奖励 + public static final int tutorial_level_reward_receive_succeed_ack = 7505; // 领取教学关卡奖励成功 + public static final int tutorial_level_reward_receive_failed_ack = 7506; // 领取教学关卡奖励失败 + public static final int story_set_info_req = 7601; // 获取故事集数据 + public static final int story_set_info_succeed_ack = 7602; // 获取故事集数据成功 + public static final int story_set_info_failed_ack = 7603; // 错误,返回错误信息 + public static final int story_set_reward_receive_req = 7604; // 领取故事集奖励 + public static final int story_set_reward_receive_succeed_ack = 7605; // 领取故事集奖励成功 + public static final int story_set_reward_receive_failed_ack = 7606; // 领取故事集奖励失败 + public static final int energy_buy_req = 8001; // 购买体力请求 + public static final int energy_buy_succeed_ack = 8002; // 购买成功,返回当日的购买次数,以及ChangeInfo + public static final int energy_buy_failed_ack = 8003; // 购买失败,返回错误信息 + public static final int energy_extract_req = 8004; // 提取体力请求 + public static final int energy_extract_succeed_ack = 8005; // 提取成功,返回 changeInfo + public static final int energy_extract_failed_ack = 8006; // 提取失败,返回错误信息 + public static final int client_event_report_req = 8101; // 客户端事件上报 + public static final int client_event_report_succeed_ack = 8102; // 客户端事件上报成功 + public static final int client_event_report_failed_ack = 8103; // 客户端事件上报失败 + public static final int vampire_survivor_apply_req = 8201; // 灾变防线副本申请 + public static final int vampire_survivor_apply_succeed_ack = 8202; // 灾变防线副本申请成功 + public static final int vampire_survivor_apply_failed_ack = 8203; // 灾变防线副本申请失败 + public static final int vampire_survivor_area_change_req = 8204; // 灾变防线阶段转化 + public static final int vampire_survivor_area_change_succeed_ack = 8205; // 灾变防线副本申请成功 + public static final int vampire_survivor_area_change_failed_ack = 8206; // 灾变防线副本申请失败 + public static final int vampire_survivor_settle_req = 8207; // 灾变防线副本成功/失败结算申请 + public static final int vampire_survivor_settle_succeed_ack = 8208; // 灾变防线副本结算申请成功 + public static final int vampire_survivor_settle_failed_ack = 8209; // 灾变防线副本结算申请失败 + public static final int vampire_survivor_reward_select_req = 8210; // 灾变防线副本升级申请 + public static final int vampire_survivor_reward_select_succeed_ack = 8211; // 灾变防线副本升级申请成功 + public static final int vampire_survivor_reward_select_failed_ack = 8212; // 灾变防线副本升级申请失败 + public static final int vampire_survivor_reward_chest_req = 8213; // 灾变防线开宝箱申请 + public static final int vampire_survivor_reward_chest_succeed_ack = 8214; // 灾变防线开宝箱申请成功 + public static final int vampire_survivor_reward_chest_failed_ack = 8215; // 灾变防线开宝箱申请失败 + public static final int vampire_survivor_quest_reward_receive_req = 8216; // 灾变防线领取任务奖励申请 + public static final int vampire_survivor_quest_reward_receive_succeed_ack = 8217; // 灾变防线领取任务奖励成功 + public static final int vampire_survivor_quest_reward_receive_failed_ack = 8218; // 灾变防线领取任务奖励失败 + public static final int vampire_survivor_extra_reward_select_req = 8222; // 灾变防线副本额外奖励领取 + public static final int vampire_survivor_extra_reward_select_succeed_ack = 8223; // 灾变防线副本额外奖励领取成功 + public static final int vampire_survivor_extra_reward_select_failed_ack = 8224; // 灾变防线副本额外奖励领取失败 + public static final int vampire_survivor_restart_req = 8225; // 灾变防线第二阶段重开 + public static final int vampire_survivor_restart_succeed_ack = 8226; // 灾变防线第二阶段重开成功 + public static final int vampire_survivor_restart_failed_ack = 8227; // 灾变防线第二阶段重开失败 + public static final int vampire_talent_detail_req = 8301; // 获取吸血鬼天赋信息 + public static final int vampire_talent_detail_succeed_ack = 8302; // 获取节点信息成功 + public static final int vampire_talent_detail_failed_ack = 8303; // 获取失败,返回错误信息 + public static final int vampire_talent_reset_req = 8304; // 重置吸血鬼所有的天赋 + public static final int vampire_talent_reset_succeed_ack = 8305; // 重置成功,不返回任何数据 + public static final int vampire_talent_reset_failed_ack = 8306; // 重置失败,返回错误信息 + public static final int vampire_talent_unlock_req = 8307; // 吸血鬼天赋解锁@传入节点ID,解锁对应的养成节点 + public static final int vampire_talent_unlock_succeed_ack = 8308; // 解锁成功 + public static final int vampire_talent_unlock_failed_ack = 8309; // 解锁失败,返回错误信息 + public static final int vampire_talent_show_req = 8310; // 吸血鬼天赋点数展示 + public static final int vampire_talent_show_succeed_ack = 8311; // 成功无任何返回 + public static final int vampire_talent_show_failed_ack = 8312; // 失败返回错误 + public static final int mail_list_req = 9001; // 获取邮件列表 + public static final int mail_list_succeed_ack = 9002; // 邮件列表 + public static final int mail_list_failed_ack = 9003; // 获取失败 + public static final int mail_read_req = 9004; // 标记邮件已读 + public static final int mail_read_succeed_ack = 9005; // 返回已设置为已读的邮件ID + public static final int mail_read_failed_ack = 9006; // 设置失败 + public static final int mail_recv_req = 9007; // 领取邮件奖励@一键领取发送0,单独领取发送对应邮件ID上来 + public static final int mail_recv_succeed_ack = 9008; // 领取成功 + public static final int mail_recv_failed_ack = 9009; // 领取失败 + public static final int mail_remove_req = 9010; // 删除邮件@一键删除所有已读已领发送0,单独删除发送对应邮件ID上来 + public static final int mail_remove_succeed_ack = 9011; // 删除成功 + public static final int mail_remove_failed_ack = 9012; // 删除失败 + public static final int mail_pin_req = 9013; // 邮件星标操作 + public static final int mail_pin_succeed_ack = 9014; // 标记成功 + public static final int mail_pin_failed_ack = 9015; // 标记失败 + public static final int activity_detail_req = 9101; // 获取所有的活动数据 + public static final int activity_detail_succeed_ack = 9102; // 获取成功 + public static final int activity_detail_failed_ack = 9103; // 获取失败 + public static final int activity_periodic_reward_receive_req = 9104; // 领取周期活动奖励 + public static final int activity_periodic_reward_receive_succeed_ack = 9105; // 领取成功 + public static final int activity_periodic_reward_receive_failed_ack = 9106; // 领取失败 + public static final int activity_periodic_final_reward_receive_req = 9107; // 领取周期活动最终奖励 + public static final int activity_periodic_final_reward_receive_succeed_ack = 9108; // 领取成功 + public static final int activity_periodic_final_reward_receive_failed_ack = 9109; // 领取失败 + public static final int activity_login_reward_receive_req = 9110; // 领取登录活动奖励 + public static final int activity_login_reward_receive_succeed_ack = 9111; // 领取成功 + public static final int activity_login_reward_receive_failed_ack = 9112; // 领取失败 + public static final int activity_tower_defense_story_reward_receive_req = 9113; // 领取塔防活动剧情奖励@传入剧情ID + public static final int activity_tower_defense_story_reward_receive_succeed_ack = 9114; // 领取成功 + public static final int activity_tower_defense_story_reward_receive_failed_ack = 9115; // 领取失败 + public static final int activity_tower_defense_quest_reward_receive_req = 9116; // 领取塔防活动任务奖励 + public static final int activity_tower_defense_quest_reward_receive_succeed_ack = 9117; // 领取成功 + public static final int activity_tower_defense_quest_reward_receive_failed_ack = 9118; // 领取失败 + public static final int activity_tower_defense_level_apply_req = 9119; // 塔防活动关卡申请 + public static final int activity_tower_defense_level_apply_succeed_ack = 9120; // 申请成功 + public static final int activity_tower_defense_level_apply_failed_ack = 9121; // 申请失败 + public static final int activity_tower_defense_level_settle_req = 9122; // 塔防活动关卡结算 + public static final int activity_tower_defense_level_settle_succeed_ack = 9123; // 结算成功(首次通关会有奖励,之后没有奖励) + public static final int activity_tower_defense_level_settle_failed_ack = 9124; // 结算失败 + public static final int phone_contacts_info_req = 9201; // 获取手机所有联系人的数据 + public static final int phone_contacts_info_succeed_ack = 9202; // 获取联系人数据成功 + public static final int phone_contacts_info_failed_ack = 9203; // 获取联系人数据 + public static final int phone_contacts_report_req = 9204; // 联系人聊天上报 + public static final int phone_contacts_report_succeed_ack = 9205; // 上报成功 + public static final int phone_contacts_report_failed_ack = 9206; // 上报失败 + public static final int phone_contacts_top_req = 9207; // 联系人置顶 + public static final int phone_contacts_top_succeed_ack = 9208; // 置顶成功 + public static final int phone_contacts_top_failed_ack = 9209; // 置顶失败 + public static final int talent_unlock_req = 9301; // 天赋解锁@传入天赋ID + public static final int talent_unlock_succeed_ack = 9302; // 解锁成功 + public static final int talent_unlock_failed_ack = 9303; // 解锁失败,返回错误信息 + public static final int talent_reset_req = 9304; // 角色天赋/天赋组重置@传入角色ID + public static final int talent_reset_succeed_ack = 9305; // 重置成功 + public static final int talent_reset_failed_ack = 9306; // 重置失败,返回错误信息 + public static final int talent_node_reset_req = 9307; // 天赋重置 + public static final int talent_node_reset_succeed_ack = 9308; // 重置成功 + public static final int talent_node_reset_failed_ack = 9309; // 重置失败,返回错误信息 + public static final int talent_background_set_req = 9310; // 设置天赋背景@传入节点组 + public static final int talent_background_set_succeed_ack = 9311; // 设置成功 + public static final int talent_background_set_failed_ack = 9312; // 设置失败,返回错误信息 + public static final int talent_group_unlock_req = 9313; // 天赋组解锁 + public static final int talent_group_unlock_succeed_ack = 9314; // 解锁成功 + public static final int talent_group_unlock_failed_ack = 9315; // 解锁失败,返回错误信息 + public static final int activity_trial_reward_receive_req = 9401; // 传入试玩角色组id领取奖励 + public static final int activity_trial_reward_receive_succeed_ack = 9402; // 领取成功 + public static final int activity_trial_reward_receive_failed_ack = 9403; // 领取失败 + public static final int activity_cg_read_req = 9501; // 活动CG已读@传入活动ID + public static final int activity_cg_read_succeed_ack = 9502; // 操作成功 + public static final int activity_cg_read_failed_ack = 9503; // 操作失败 + public static final int activity_levels_apply_req = 9601; // 申请进入活动关卡 + public static final int activity_levels_apply_succeed_ack = 9602; // 进入成功 + public static final int activity_levels_apply_failed_ack = 9603; // 进入失败 + public static final int activity_levels_settle_req = 9604; // 活动关卡结算 + public static final int activity_levels_settle_succeed_ack = 9605; // 结算成功 + public static final int activity_levels_settle_failed_ack = 9606; // 结算失败 + public static final int activity_levels_sweep_req = 9607; // 活动关卡扫荡 + public static final int activity_levels_sweep_succeed_ack = 9608; // 扫荡成功 + public static final int activity_levels_sweep_failed_ack = 9609; // 领取失败 + public static final int activity_avg_reward_receive_req = 9701; // 领取AVG活动关卡奖励 + public static final int activity_avg_reward_receive_succeed_ack = 9702; // 领取成功 + public static final int activity_avg_reward_receive_failed_ack = 9703; // 领取失败 + public static final int activity_shop_purchase_req = 9751; // 请求活动商店购买物品 + public static final int activity_shop_purchase_succeed_ack = 9752; // 请求活动商店购买物品成功 + public static final int activity_shop_purchase_failed_ack = 9753; // 请求活动商店购买物品失败 + public static final int battle_pass_info_req = 9801; // 获取当前战令信息 + public static final int battle_pass_info_succeed_ack = 9802; // 战令信息 + public static final int battle_pass_info_failed_ack = 9803; // 获取失败 + public static final int battle_pass_reward_receive_req = 9804; // 领取战令奖励@传入战令等级和版本,全部领等级取传0 + public static final int battle_pass_reward_receive_succeed_ack = 9805; // 领取战令奖励成功 + public static final int battle_pass_reward_receive_failed_ack = 9806; // 领取战令奖励失败 + public static final int battle_pass_level_buy_req = 9807; // 战令等级购买@传入需要购买的级数和版本 + public static final int battle_pass_level_buy_succeed_ack = 9808; // 购买成功 + public static final int battle_pass_level_buy_failed_ack = 9809; // 购买成功 + public static final int battle_pass_order_req = 9810; // 战令进阶下单 + public static final int battle_pass_order_succeed_ack = 9811; // 战令进阶下单成功 + public static final int battle_pass_order_failed_ack = 9812; // 领取失败 + public static final int battle_pass_order_collect_req = 9813; // 战令进阶订单收取 + public static final int battle_pass_order_collect_succeed_ack = 9814; // 返回成功,请根据具体状态处理 + public static final int battle_pass_order_collect_failed_ack = 9815; // 战令进阶失败 + public static final int battle_pass_quest_reward_receive_req = 9816; // 战令任务一键领取@value表示任务ID,0表示一键领取 + public static final int battle_pass_quest_reward_receive_succeed_ack = 9817; // 获取成功 + public static final int battle_pass_quest_reward_receive_failed_ack = 9818; // 获取失败 + public static final int redeem_code_req = 9901; // 兑换码兑换 + public static final int redeem_code_succeed_ack = 9902; // 兑换成功,返回兑换后德道具以及ChangeInfo + public static final int redeem_code_failed_ack = 9903; // 兑换失败,返回错误信息 + public static final int system_failed_ack = 10000; // 系统级失败,主要用于http模式下,强制失败返回 + public static final int player_new_notify = 10001; // 新用户 + public static final int mail_state_notify = 10002; // 邮件状态变更 + public static final int player_relogin_notify = 10003; // 在其他地方登录 + public static final int token_expire_notify = 10004; // token过期 + public static final int player_ban_notify = 10005; // 用户被ban + public static final int quest_change_notify = 10006; // 任务进度变更 + public static final int week_boss_refresh_ticket_notify = 10007; // 周长副本门票刷新通知 + public static final int agent_new_notify = 10008; // 每周刷新新委托ID列表 + public static final int world_class_change_notify = 10009; // 世界等级变化 + public static final int friend_energy_state_notify = 10010; // 好友赠送体力状态变更 + public static final int signin_reward_change_notify = 10011; // 登陆奖励更新 + public static final int friend_state_notify = 10012; // 好友状态变更 + public static final int order_paid_notify = 10013; // 订单已完成支付通知,可以发起领取 + public static final int order_revoke_notify = 10014; // 订单道具被撤回,主要用于恶意退款 + public static final int star_tower_book_potential_notify = 10015; // 星塔潜能图鉴状态变更 + public static final int star_tower_book_event_notify = 10016; // 星塔潜能图鉴状态变更 + public static final int battle_pass_state_notify = 10017; // 战令状态变更 + public static final int world_class_reward_state_notify = 10018; // 世界等级奖励状态变更 + public static final int char_advance_reward_state_notify = 10019; // 角色进阶奖励状态变更 + public static final int achievement_change_notify = 10020; // 成就进度变更 + public static final int achievement_state_notify = 10021; // 成就待领取红点提示 + public static final int character_skin_gain_notify = 10022; // 角色获得新皮肤,如果是重复获取,将发送转换数据 + public static final int character_skin_change_notify = 10023; // 角色装备的皮肤发生改变 + public static final int handbook_change_notify = 10024; // 图鉴数据发生变化 + public static final int monthly_card_rewards_notify = 10025; // 月卡奖励通知 + public static final int quest_state_notify = 10026; // 任务红点奖励notify + public static final int mall_package_state_notify = 10027; // 礼包商城免费商品红点notify + public static final int dictionary_change_notify = 10028; // 字典数据变更 + public static final int activity_change_notify = 10029; // 活动数据变化 + public static final int activity_quest_change_notify = 10030; // 活动任务数据变化 + public static final int char_affinity_reward_state_notify = 10031; // 角色好感度奖励最终值 + public static final int mail_overflow_notify = 10032; // 道具超发进邮件 + public static final int infinity_tower_rewards_state_notify = 10033; // 无尽塔是否有奖励可领最终值 + public static final int phone_chat_change_notify = 10034; // 手机新聊天变化 + public static final int character_fragments_overflow_change_notify = 10035; // 角色碎片溢出 + public static final int activity_login_rewards_notify = 10036; // 七日登录活动通知 + public static final int tower_book_fate_card_collect_notify = 10037; // 新获得的命运卡数据 + public static final int tower_book_fate_card_reward_notify = 10038; // 命运卡图鉴奖励变化 + public static final int region_boss_level_challenge_ticket_notify = 10039; // 区域boss挑战模式门票变更通知最终值 + public static final int honor_change_notify = 10040; // 荣誉称号变更通知(最终值,多个Notify以最后一个为准) + public static final int activity_mining_daily_reward_notify = 10041; // 挖格子每日奖励发放通知 + public static final int activity_mining_supplement_reward_notify = 10042; // 挖格子活动开启后登录,补发每日奖励通知 + public static final int activity_mining_energy_convert_notify = 10043; // 挖格子活动消耗体力转换道具通知 + public static final int notice_change_notify = 10044; // 跑马灯公告变更通知 + public static final int activity_state_change_notify = 10045; // 活动状态变化通知 + public static final int activity_joint_drill_refresh_ticket_notify = 10046; // 总力战门票刷新通知 + public static final int force_update_notify = 10047; // 强制更新通知,当版本号小于此通知版本时,择期进行弹窗更新,注意,此消息可能重复发送 + public static final int player_head_icon_change_notify = 10048; // 当玩家切换性别且设置的头像为主角头像时,改通知会下发 + public static final int activity_mining_enter_layer_notify = 10049; // 挖格子活动跳层/刷新本层数据 + public static final int story_set_state_notify = 10050; // 故事集活动红点 + public static final int vampire_survivor_new_season_notify = 10051; // 吸血鬼新赛季开启通知 + public static final int order_collected_notify = 10052; // 离线期间的订单已发放到账 + public static final int activity_mining_apply_req = 11001; // 申请进入挖格子活动 + public static final int activity_mining_apply_succeed_ack = 11002; // 申请进入挖格子活动成功 + public static final int activity_mining_apply_failed_ack = 11003; // 申请进入挖格子活动失败 + public static final int activity_mining_dig_req = 11004; // 挖格子 + public static final int activity_mining_dig_succeed_ack = 11005; // 挖格子成功 + public static final int activity_mining_dig_failed_ack = 11006; // 挖格子失败 + public static final int activity_mining_move_to_next_layer_req = 11007; // 挖格子进入下一层 + public static final int activity_mining_move_to_next_layer_succeed_ack = 11008; // 挖格子进入下一层成功 + public static final int activity_mining_move_to_next_layer_failed_ack = 11009; // 挖格子进入下一层失败 + public static final int activity_mining_story_reward_receive_req = 11010; // 请求领取挖格子活动剧情奖励 + public static final int activity_mining_story_reward_receive_succeed_ack = 11011; // 求领取挖格子活动剧情奖励成功 + public static final int activity_mining_story_reward_receive_failed_ack = 11012; // 求领取挖格子活动剧情奖励失败 + public static final int activity_mining_quest_reward_receive_req = 11013; // 挖格子领取任务奖励 + public static final int activity_mining_quest_reward_receive_succeed_ack = 11014; // 挖格子领取任务奖励成功 + public static final int activity_mining_quest_reward_receive_failed_ack = 11015; // 求挖格子领取任务奖励失败 + public static final int score_boss_apply_req = 11101; // 请求挑战积分boss + public static final int score_boss_apply_succeed_ack = 11102; // 请求挑战积分boss成功 + public static final int score_boss_apply_failed_ack = 11103; // 请求挑战积分boss失败 + public static final int score_boss_settle_req = 11104; // 挑战积分boss结算 + public static final int score_boss_settle_succeed_ack = 11105; // 挑战积分boss结算成功 + public static final int score_boss_settle_failed_ack = 11106; // 挑战积分boss结算失败 + public static final int score_boss_rank_req = 11107; // 请求积分boss排行榜 + public static final int score_boss_rank_succeed_ack = 11108; // 请求积分boss排行榜成功 + public static final int score_boss_rank_failed_ack = 11109; // 请求积分boss失败 + public static final int score_boss_star_reward_receive_req = 11110; // 挑战积分boss结算 + public static final int score_boss_star_reward_receive_succeed_ack = 11111; // 挑战积分boss结算成功 + public static final int score_boss_star_reward_receive_failed_ack = 11112; // 挑战积分boss结算失败 + public static final int score_boss_info_req = 11113; // 请求积分挑战boss信息 + public static final int score_boss_info_succeed_ack = 11114; // 请求积分挑战boss信息成功 + public static final int score_boss_info_failed_ack = 11115; // 请求积分挑战boss信息失败 + public static final int activity_cookie_settle_req = 11201; // 曲奇工坊结算请求 + public static final int activity_cookie_settle_succeed_ack = 11202; // 曲奇工坊结算成功; 如果是首通返回首通奖励 + public static final int activity_cookie_settle_failed_ack = 11203; // 曲奇工坊结算失败 + public static final int activity_cookie_quest_reward_receive_req = 11204; // 曲奇工坊领取任务奖励 + public static final int activity_cookie_quest_reward_receive_succeed_ack = 11205; // 曲奇工坊领取任务奖励成功 + public static final int activity_cookie_quest_reward_receive_failed_ack = 11206; // 求曲奇工坊领取任务奖励失败 +} diff --git a/src/main/java/emu/nebula/net/NetMsgIdUtils.java b/src/main/java/emu/nebula/net/NetMsgIdUtils.java new file mode 100644 index 0000000..2fc6d12 --- /dev/null +++ b/src/main/java/emu/nebula/net/NetMsgIdUtils.java @@ -0,0 +1,55 @@ +package emu.nebula.net; + +import java.io.FileWriter; +import java.io.IOException; +import java.lang.reflect.Field; +import java.util.Map; +import java.util.TreeMap; +import java.util.stream.Collectors; + +import emu.nebula.GameConstants; +import emu.nebula.Nebula; +import emu.nebula.util.JsonUtils; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; + +public class NetMsgIdUtils { + + private static Int2ObjectMap<String> msgIdMap; + + static { + msgIdMap = new Int2ObjectOpenHashMap<>(); + + Field[] fields = NetMsgId.class.getFields(); + + for (Field f : fields) { + if (f.getType().equals(int.class)) { + try { + msgIdMap.put(f.getInt(null), f.getName()); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + } + + public static String getMsgIdName(int msgId) { + if (msgId <= 0) return "UNKNOWN"; + return msgIdMap.getOrDefault(msgId, "UNKNOWN"); + } + + @SuppressWarnings("unused") + public static void dumpPacketIds() { + try (FileWriter writer = new FileWriter("./MsgIds_" + GameConstants.VERSION + ".json")) { + // Create sorted tree map + Map<Integer, String> packetIds = msgIdMap.int2ObjectEntrySet().stream() + .filter(e -> e.getIntKey() > 0) + .collect(Collectors.toMap(Int2ObjectMap.Entry::getIntKey, Int2ObjectMap.Entry::getValue, (k, v) -> v, TreeMap::new)); + // Write to file + writer.write(JsonUtils.encode(packetIds)); + Nebula.getLogger().info("Dumped packet ids."); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/emu/nebula/server/HttpServer.java b/src/main/java/emu/nebula/server/HttpServer.java new file mode 100644 index 0000000..2d4677c --- /dev/null +++ b/src/main/java/emu/nebula/server/HttpServer.java @@ -0,0 +1,122 @@ +package emu.nebula.server; + +import org.eclipse.jetty.server.HttpConfiguration; +import org.eclipse.jetty.server.HttpConnectionFactory; +import org.eclipse.jetty.server.SecureRequestCustomizer; +import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.util.ssl.SslContextFactory; + +import emu.nebula.Config.HttpServerConfig; +import emu.nebula.Nebula; +import emu.nebula.Nebula.ServerType; +import emu.nebula.server.routes.*; +import io.javalin.Javalin; +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import lombok.Getter; + +@Getter +public class HttpServer { + private final Javalin app; + private ServerType type; + private boolean started; + + public HttpServer(ServerType type) { + this.app = Javalin.create(); + this.type = type; + + this.addRoutes(); + } + + public HttpServerConfig getServerConfig() { + return Nebula.getConfig().getHttpServer(); + } + + private HttpConnectionFactory getHttpFactory() { + HttpConfiguration httpsConfig = new HttpConfiguration(); + SecureRequestCustomizer src = new SecureRequestCustomizer(); + src.setSniHostCheck(false); + httpsConfig.addCustomizer(src); + return new HttpConnectionFactory(httpsConfig); + } + + private SslContextFactory.Server getSSLContextFactory() { + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); + sslContextFactory.setKeyStorePath(Nebula.getConfig().getKeystore().getPath()); + sslContextFactory.setKeyStorePassword(Nebula.getConfig().getKeystore().getPassword()); + sslContextFactory.setSniRequired(false); + sslContextFactory.setRenegotiationAllowed(false); + return sslContextFactory; + } + + // Start server + + public void start() { + if (this.started) return; + this.started = true; + + // Http server + if (getServerConfig().isUseSSL()) { + ServerConnector sslConnector = new ServerConnector(getApp().jettyServer().server(), getSSLContextFactory(), getHttpFactory()); + sslConnector.setHost(getServerConfig().getBindAddress()); + sslConnector.setPort(getServerConfig().getBindPort()); + getApp().jettyServer().server().addConnector(sslConnector); + + getApp().start(); + } else { + getApp().start(getServerConfig().getBindAddress(), getServerConfig().getBindPort()); + } + + // Done + Nebula.getLogger().info("Http Server started on " + getServerConfig().getBindPort()); + } + + // Server endpoints + + private void addRoutes() { + // Add routes + if (this.getType().runLogin()) { + this.addLoginServerRoutes(); + } + + if (this.getType().runGame()) { + this.addGameServerRoutes(); + } + + // Exception handler + getApp().exception(Exception.class, (e, _) -> { + e.printStackTrace(); + }); + + // Fallback handler + getApp().error(404, this::notFoundHandler); + } + + private void addLoginServerRoutes() { + // https://en-sdk-api.yostarplat.com/ + getApp().post("/common/config", new CommonConfigHandler(this)); + getApp().post("/common/version", new HttpJsonResponse("{\"Code\":200,\"Data\":{\"Agreement\":[{\"Version\":\"0.1\",\"Type\":\"user_agreement\",\"Title\":\"用户协议\",\"Content\":\"\",\"Lang\":\"en\"},{\"Version\":\"0.1\",\"Type\":\"privacy_agreement\",\"Title\":\"隐私政策\",\"Content\":\"\",\"Lang\":\"en\"}],\"ErrorCode\":\"4.4\"},\"Msg\":\"OK\"}")); + + getApp().post("/user/detail", new UserLoginHandler()); + getApp().post("/user/set", new UserSetDataHandler()); + getApp().post("/user/login", new UserLoginHandler()); + getApp().post("/user/quick-login", new UserLoginHandler()); + + getApp().post("/yostar/get-auth", new GetAuthHandler()); + getApp().post("/yostar/send-code", new HttpJsonResponse("{\"Code\":200,\"Data\":{},\"Msg\":\"OK\"}")); // Dummy handler + + // https://nova-static.stellasora.global/ + getApp().get("/meta/serverlist.html", new MetaServerlistHandler(this)); + getApp().get("/meta/win.html", new MetaWinHandler()); + } + + private void addGameServerRoutes() { + getApp().post("/agent-zone-1/", new AgentZoneHandler()); + } + + private void notFoundHandler(Context ctx) { + ctx.status(404); + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result("{}"); + } +} diff --git a/src/main/java/emu/nebula/server/handlers/Handler.java b/src/main/java/emu/nebula/server/handlers/Handler.java new file mode 100644 index 0000000..3421f99 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/Handler.java @@ -0,0 +1,17 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.none) +public class Handler extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Template + return null; + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerAchievementInfoReq.java b/src/main/java/emu/nebula/server/handlers/HandlerAchievementInfoReq.java new file mode 100644 index 0000000..c7c28d1 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerAchievementInfoReq.java @@ -0,0 +1,19 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.Public.Achievements; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.achievement_info_req) +public class HandlerAchievementInfoReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = Achievements.newInstance(); + + return this.encodeMsg(NetMsgId.achievement_info_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerActivityDetailReq.java b/src/main/java/emu/nebula/server/handlers/HandlerActivityDetailReq.java new file mode 100644 index 0000000..1c087fe --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerActivityDetailReq.java @@ -0,0 +1,27 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.ActivityDetail.ActivityMsg; +import emu.nebula.proto.ActivityDetail.ActivityResp; +import emu.nebula.proto.Public.ActivityTrial; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.activity_detail_req) +public class HandlerActivityDetailReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = ActivityResp.newInstance(); + + var activity = ActivityMsg.newInstance() + .setId(700101) + .setTrial(ActivityTrial.newInstance()); + + rsp.addList(activity); + + return this.encodeMsg(NetMsgId.activity_detail_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerAgentApplyReq.java b/src/main/java/emu/nebula/server/handlers/HandlerAgentApplyReq.java new file mode 100644 index 0000000..9f9ae72 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerAgentApplyReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.agent_apply_req) +public class HandlerAgentApplyReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.agent_apply_failed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerBattlePassInfoReq.java b/src/main/java/emu/nebula/server/handlers/HandlerBattlePassInfoReq.java new file mode 100644 index 0000000..75974e4 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerBattlePassInfoReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.battle_pass_info_req) +public class HandlerBattlePassInfoReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.battle_pass_info_failed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerCharAdvanceReq.java b/src/main/java/emu/nebula/server/handlers/HandlerCharAdvanceReq.java new file mode 100644 index 0000000..9bb7bfe --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerCharAdvanceReq.java @@ -0,0 +1,33 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.Public.UI32; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.char_advance_req) +public class HandlerCharAdvanceReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var req = UI32.parseFrom(message); + + // Get character + var character = session.getPlayer().getCharacters().getCharacterById(req.getValue()); + + if (character == null) { + return this.encodeMsg(NetMsgId.char_advance_failed_ack); + } + + // Advance character + var change = character.advance(); + + if (change == null) { + return this.encodeMsg(NetMsgId.char_advance_failed_ack); + } + + return this.encodeMsg(NetMsgId.char_advance_succeed_ack, change.toProto()); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerCharSkillUpgradeReq.java b/src/main/java/emu/nebula/server/handlers/HandlerCharSkillUpgradeReq.java new file mode 100644 index 0000000..5b9ae55 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerCharSkillUpgradeReq.java @@ -0,0 +1,34 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.CharSkillUpgrade.CharSkillUpgradeReq; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.char_skill_upgrade_req) +public class HandlerCharSkillUpgradeReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var req = CharSkillUpgradeReq.parseFrom(message); + + // Get character + var character = session.getPlayer().getCharacters().getCharacterById(req.getCharId()); + + if (character == null) { + return this.encodeMsg(NetMsgId.char_skill_upgrade_failed_ack); + } + + // Advance character + int index = req.getIndex() - 1; // Lua indexes start at 1 + var change = character.upgradeSkill(index); + + if (change == null) { + return this.encodeMsg(NetMsgId.char_skill_upgrade_failed_ack); + } + + return this.encodeMsg(NetMsgId.char_skill_upgrade_succeed_ack, change.toProto()); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerCharUpgradeReq.java b/src/main/java/emu/nebula/server/handlers/HandlerCharUpgradeReq.java new file mode 100644 index 0000000..4678f62 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerCharUpgradeReq.java @@ -0,0 +1,43 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.CharUpgrade.CharUpgradeReq; +import emu.nebula.proto.CharUpgrade.CharUpgradeResp; +import emu.nebula.net.HandlerId; +import emu.nebula.game.inventory.ItemParamMap; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.char_upgrade_req) +public class HandlerCharUpgradeReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = CharUpgradeReq.parseFrom(message); + + // Get character + var character = session.getPlayer().getCharacters().getCharacterById(req.getCharId()); + + if (character == null) { + return this.encodeMsg(NetMsgId.char_upgrade_failed_ack); + } + + // Upgrade character + var params = ItemParamMap.fromTemplates(req.getItems()); + var change = character.upgrade(params); + + if (change == null) { + return this.encodeMsg(NetMsgId.char_upgrade_failed_ack); + } + + // Create response + var rsp = CharUpgradeResp.newInstance() + .setChange(change.toProto()) + .setLevel(character.getLevel()) + .setExp(character.getExp()); + + return this.encodeMsg(NetMsgId.char_upgrade_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerClientEventReportReq.java b/src/main/java/emu/nebula/server/handlers/HandlerClientEventReportReq.java new file mode 100644 index 0000000..8d07e63 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerClientEventReportReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.client_event_report_req) +public class HandlerClientEventReportReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.client_event_report_succeed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerDiscPromoteReq.java b/src/main/java/emu/nebula/server/handlers/HandlerDiscPromoteReq.java new file mode 100644 index 0000000..c65dd4b --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerDiscPromoteReq.java @@ -0,0 +1,40 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.DiscPromote.DiscPromoteReq; +import emu.nebula.proto.DiscPromote.DiscPromoteResp; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.disc_promote_req) +public class HandlerDiscPromoteReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = DiscPromoteReq.parseFrom(message); + + // Get character + var disc = session.getPlayer().getCharacters().getDiscById(req.getId()); + + if (disc == null) { + return this.encodeMsg(NetMsgId.disc_promote_failed_ack); + } + + // Advance character + var change = disc.promote(); + + if (change == null) { + return this.encodeMsg(NetMsgId.disc_promote_failed_ack); + } + + // Build request + var rsp = DiscPromoteResp.newInstance() + .setPhase(disc.getPhase()) + .setChange(change.toProto()); + + return this.encodeMsg(NetMsgId.disc_promote_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerDiscReadRewardReceiveReq.java b/src/main/java/emu/nebula/server/handlers/HandlerDiscReadRewardReceiveReq.java new file mode 100644 index 0000000..36de79f --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerDiscReadRewardReceiveReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.disc_read_reward_receive_req) +public class HandlerDiscReadRewardReceiveReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.disc_read_reward_receive_failed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerDiscStrengthenReq.java b/src/main/java/emu/nebula/server/handlers/HandlerDiscStrengthenReq.java new file mode 100644 index 0000000..ef67cdc --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerDiscStrengthenReq.java @@ -0,0 +1,43 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.DiscStrengthen.DiscStrengthenReq; +import emu.nebula.proto.DiscStrengthen.DiscStrengthenResp; +import emu.nebula.net.HandlerId; +import emu.nebula.game.inventory.ItemParamMap; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.disc_strengthen_req) +public class HandlerDiscStrengthenReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = DiscStrengthenReq.parseFrom(message); + + // Get character + var disc = session.getPlayer().getCharacters().getDiscById(req.getId()); + + if (disc == null) { + return this.encodeMsg(NetMsgId.disc_strengthen_failed_ack); + } + + // Upgrade character + var params = ItemParamMap.fromItemInfos(req.getItems()); + var change = disc.upgrade(params); + + if (change == null) { + return this.encodeMsg(NetMsgId.disc_strengthen_failed_ack); + } + + // Create response + var rsp = DiscStrengthenResp.newInstance() + .setChange(change.toProto()) + .setLevel(disc.getLevel()) + .setExp(disc.getExp()); + + return this.encodeMsg(NetMsgId.disc_strengthen_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerFriendListGetReq.java b/src/main/java/emu/nebula/server/handlers/HandlerFriendListGetReq.java new file mode 100644 index 0000000..8c3d86e --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerFriendListGetReq.java @@ -0,0 +1,19 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.FriendListGet.FriendListGetResp; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.friend_list_get_req) +public class HandlerFriendListGetReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = FriendListGetResp.newInstance(); + + return this.encodeMsg(NetMsgId.friend_list_get_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerGachaInformationReq.java b/src/main/java/emu/nebula/server/handlers/HandlerGachaInformationReq.java new file mode 100644 index 0000000..6948260 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerGachaInformationReq.java @@ -0,0 +1,21 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.GachaInformation.GachaInformationResp; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.gacha_information_req) +public class HandlerGachaInformationReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = GachaInformationResp.newInstance(); + + // TODO + + return this.encodeMsg(NetMsgId.gacha_information_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieInfoReq.java b/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieInfoReq.java new file mode 100644 index 0000000..758fe3f --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieInfoReq.java @@ -0,0 +1,19 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.GachaInformation.GachaInformationResp; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.gacha_newbie_info_req) +public class HandlerGachaNewbieInfoReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = GachaInformationResp.newInstance(); + + return this.encodeMsg(NetMsgId.gacha_newbie_info_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieObtainReq.java b/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieObtainReq.java new file mode 100644 index 0000000..7057a5c --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieObtainReq.java @@ -0,0 +1,21 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.GachaNewbieObtain.GachaNewbieObtainReq; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.gacha_newbie_obtain_req) +public class HandlerGachaNewbieObtainReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + @SuppressWarnings("unused") + var req = GachaNewbieObtainReq.parseFrom(message); + + // TODO + return this.encodeMsg(NetMsgId.gacha_newbie_obtain_failed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieSpinReq.java b/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieSpinReq.java new file mode 100644 index 0000000..6252a0b --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerGachaNewbieSpinReq.java @@ -0,0 +1,41 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.GachaNewbieSpin.GachaNewbieSpinResp; +import emu.nebula.proto.GachaSpin.GachaSpinReq; +import emu.nebula.util.Utils; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import emu.nebula.net.HandlerId; +import emu.nebula.data.GameData; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.gacha_newbie_spin_req) +public class HandlerGachaNewbieSpinReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + @SuppressWarnings("unused") + var req = GachaSpinReq.parseFrom(message); + + // Temp + var list = new IntArrayList(); + + for (var d : GameData.getCharacterDataTable()) { + if (d.getGrade() == 1) { + list.add(d.getId()); + } + } + + // + var rsp = GachaNewbieSpinResp.newInstance(); + + for (int i = 0; i < 10; i++) { + int id = Utils.randomElement(list); + rsp.addCards(id); + } + + return this.encodeMsg(NetMsgId.gacha_newbie_spin_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerGachaSpinReq.java b/src/main/java/emu/nebula/server/handlers/HandlerGachaSpinReq.java new file mode 100644 index 0000000..13efb73 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerGachaSpinReq.java @@ -0,0 +1,52 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.GachaSpin.GachaCard; +import emu.nebula.proto.GachaSpin.GachaSpinReq; +import emu.nebula.proto.GachaSpin.GachaSpinResp; +import emu.nebula.proto.Public.ItemTpl; +import emu.nebula.util.Utils; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import emu.nebula.net.HandlerId; +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.gacha_spin_req) +public class HandlerGachaSpinReq extends NetHandler { + + @SuppressWarnings("unused") + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var req = GachaSpinReq.parseFrom(message); + + // Temp + var list = new IntArrayList(); + + for (var def : GameData.getCharacterDataTable()) { + if (def.getGrade() == 1 && def.isAvailable()) { + list.add(def.getId()); + } + } + + // Build response + var rsp = GachaSpinResp.newInstance() + .setTime(Nebula.getCurrentTime()); + + rsp.getMutableChange(); + rsp.getMutableNextPackage(); + + for (int i = 0; i < 10; i++) { + int id = Utils.randomElement(list); + + var card = GachaCard.newInstance() + .setCard(ItemTpl.newInstance().setTid(id).setQty(1)); + + rsp.addCards(card); + } + + return this.encodeMsg(NetMsgId.gacha_spin_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerIkeReq.java b/src/main/java/emu/nebula/server/handlers/HandlerIkeReq.java new file mode 100644 index 0000000..706d845 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerIkeReq.java @@ -0,0 +1,61 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.Ike.IKEReq; +import emu.nebula.proto.Ike.IKEResp; +import emu.nebula.util.Utils; +import emu.nebula.net.HandlerId; +import emu.nebula.Nebula; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.ike_req) +public class HandlerIkeReq extends NetHandler { + + @Override + public boolean requireSession() { + return false; + } + + @Override + public boolean requirePlayer() { + return false; + } + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Make sure we dont already have a session + if (session != null) { + return this.encodeMsg(NetMsgId.ike_failed_ack); + } + + // Parse + var req = IKEReq.parseFrom(message); + + // Create session + session = new GameSession(); + session.setClientKey(req.getPubKey()); + session.generateServerKey(); + session.calculateKey(); + + // Register session to game context + Nebula.getGameContext().generateSessionToken(session); + + // Create response + var rsp = IKEResp.newInstance() + .setToken(session.getToken()) + .setCipher(1) // 0 = gcm, 1 = chacha20 + .setServerTs(Nebula.getCurrentTime()) + .setPubKey(session.getServerPublicKey()); + + // Debug + Nebula.getLogger().info("Client Public: " + Utils.base64Encode(session.getClientPublicKey())); + Nebula.getLogger().info("Server Public: " + Utils.base64Encode(session.getServerPublicKey())); + Nebula.getLogger().info("Server Private: " + Utils.base64Encode(session.getServerPrivateKey())); + Nebula.getLogger().info("Key: " + Utils.base64Encode(session.getKey())); + + // Encode and send to client + return this.encodeMsg(NetMsgId.ike_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMailListReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMailListReq.java new file mode 100644 index 0000000..d43f0c7 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMailListReq.java @@ -0,0 +1,24 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.Public.Mails; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mail_list_req) +public class HandlerMailListReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Build mail list proto + var rsp = Mails.newInstance(); + + for (var mail : session.getPlayer().getMailbox()) { + rsp.addList(mail.toProto()); + } + + return this.encodeMsg(NetMsgId.mail_list_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMailPinReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMailPinReq.java new file mode 100644 index 0000000..ce0339c --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMailPinReq.java @@ -0,0 +1,35 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.MailPin.MailPinRequest; +import emu.nebula.net.HandlerId; +import emu.nebula.game.mail.GameMail; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mail_pin_req) +public class HandlerMailPinReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = MailPinRequest.parseFrom(message); + + // Pin mail + GameMail mail = session.getPlayer().getMailbox().pinMail(req.getId(), req.getFlag(), req.hasPin()); + + // Sanity check + if (mail == null) { + return this.encodeMsg(NetMsgId.mail_pin_failed_ack); + } + + // Build response + var rsp = MailPinRequest.newInstance() + .setId(mail.getId()) + .setFlag(mail.getFlag()) + .setPin(mail.isPin()); + + return this.encodeMsg(NetMsgId.mail_pin_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMailReadReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMailReadReq.java new file mode 100644 index 0000000..1f29ee7 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMailReadReq.java @@ -0,0 +1,26 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.Public.MailRequest; +import emu.nebula.proto.Public.UI32; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mail_read_req) +public class HandlerMailReadReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var req = MailRequest.parseFrom(message); + + boolean result = session.getPlayer().getMailbox().readMail(req.getId(), req.getFlag()); + + if (!result) { + return this.encodeMsg(NetMsgId.mail_read_failed_ack); + } + + return this.encodeMsg(NetMsgId.mail_read_succeed_ack, UI32.newInstance().setValue(req.getId())); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMailRecvReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMailRecvReq.java new file mode 100644 index 0000000..42f673d --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMailRecvReq.java @@ -0,0 +1,36 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.MailRecv.MailRecvResp; +import emu.nebula.proto.Public.MailRequest; +import it.unimi.dsi.fastutil.ints.IntList; +import emu.nebula.net.HandlerId; +import emu.nebula.game.player.PlayerChangeInfo; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mail_recv_req) +public class HandlerMailRecvReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = MailRequest.parseFrom(message); + + // Claim mail + PlayerChangeInfo changes = session.getPlayer().getMailbox().recvMail(session.getPlayer(), req.getId()); + + // Build response + var rsp = MailRecvResp.newInstance() + .setItems(changes.toProto()); + + var recvList = (IntList) changes.getExtraData(); + + for (int id : recvList) { + rsp.addIds(id); + } + + return this.encodeMsg(NetMsgId.mail_recv_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMailRemoveReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMailRemoveReq.java new file mode 100644 index 0000000..9ce0578 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMailRemoveReq.java @@ -0,0 +1,32 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.MailRemove.MailRemoveResp; +import emu.nebula.proto.Public.MailRequest; +import it.unimi.dsi.fastutil.ints.IntList; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mail_remove_req) +public class HandlerMailRemoveReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = MailRequest.parseFrom(message); + + // Claim mail + IntList removed = session.getPlayer().getMailbox().removeMail(session.getPlayer(), req.getId()); + + // Build response + var rsp = MailRemoveResp.newInstance(); + + for (int id : removed) { + rsp.addIds(id); + } + + return this.encodeMsg(NetMsgId.mail_remove_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMallGemListReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMallGemListReq.java new file mode 100644 index 0000000..a35efb9 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMallGemListReq.java @@ -0,0 +1,29 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.MallGemListOuterClass.GemInfo; +import emu.nebula.proto.MallGemListOuterClass.MallGemList; +import emu.nebula.net.HandlerId; +import emu.nebula.data.GameData; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mall_gem_list_req) +public class HandlerMallGemListReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = MallGemList.newInstance(); + + for (var data : GameData.getMallGemDataTable()) { + var info = GemInfo.newInstance() + .setId(data.getIdString()) + .setMaiden(true); + + rsp.addList(info); + } + + return this.encodeMsg(NetMsgId.mall_gem_list_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMallMonthlyCardListReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMallMonthlyCardListReq.java new file mode 100644 index 0000000..bf38c46 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMallMonthlyCardListReq.java @@ -0,0 +1,29 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.MallMonthlycardList.MallMonthlyCardList; +import emu.nebula.proto.MallMonthlycardList.MonthlyCardInfo; +import emu.nebula.net.HandlerId; +import emu.nebula.data.GameData; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mall_monthlyCard_list_req) +public class HandlerMallMonthlyCardListReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = MallMonthlyCardList.newInstance(); + + for (var data : GameData.getMallMonthlyCardDataTable()) { + var info = MonthlyCardInfo.newInstance() + .setId(data.getIdString()) + .setRemaining(9); + + rsp.addList(info); + } + + return this.encodeMsg(NetMsgId.mall_monthlyCard_list_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMallPackageListReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMallPackageListReq.java new file mode 100644 index 0000000..da84b7c --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMallPackageListReq.java @@ -0,0 +1,29 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.MallPackageListOuterClass.MallPackageList; +import emu.nebula.proto.MallPackageListOuterClass.PackageInfo; +import emu.nebula.net.HandlerId; +import emu.nebula.data.GameData; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mall_package_list_req) +public class HandlerMallPackageListReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = MallPackageList.newInstance(); + + for (var data : GameData.getMallPackageDataTable()) { + var info = PackageInfo.newInstance() + .setId(data.getIdString()) + .setStock(data.getStock()); + + rsp.addList(info); + } + + return this.encodeMsg(NetMsgId.mall_package_list_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerMallShopListReq.java b/src/main/java/emu/nebula/server/handlers/HandlerMallShopListReq.java new file mode 100644 index 0000000..8b980ab --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerMallShopListReq.java @@ -0,0 +1,40 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.MallShopList.MallShopProductList; +import emu.nebula.proto.MallShopList.ProductInfo; +import emu.nebula.net.HandlerId; + +import java.util.concurrent.TimeUnit; + +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.mall_shop_list_req) +public class HandlerMallShopListReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = MallShopProductList.newInstance(); + + long refreshTime = Nebula.getCurrentTime() + TimeUnit.DAYS.toSeconds(30); + + for (var data : GameData.getMallShopDataTable()) { + if (data.getStock() <= 0) { + continue; + } + + var info = ProductInfo.newInstance() + .setId(data.getIdString()) + .setStock(data.getStock()) + .setRefreshTime(refreshTime); + + rsp.addList(info); + } + + return this.encodeMsg(NetMsgId.mall_shop_list_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPhoneContactsInfoReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPhoneContactsInfoReq.java new file mode 100644 index 0000000..3212eea --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPhoneContactsInfoReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.phone_contacts_info_req) +public class HandlerPhoneContactsInfoReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.phone_contacts_info_succeed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerDataReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerDataReq.java new file mode 100644 index 0000000..8836a36 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerDataReq.java @@ -0,0 +1,26 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_data_req) +public class HandlerPlayerDataReq extends NetHandler { + + public boolean requirePlayer() { + return false; + } + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Check if player has been created yet + if (session.getPlayer() == null) { + return this.encodeMsg(NetMsgId.player_new_notify); + } + + // Encode player data + return this.encodeMsg(NetMsgId.player_data_succeed_ack, session.getPlayer().toProto()); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerFormationReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerFormationReq.java new file mode 100644 index 0000000..e07f05a --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerFormationReq.java @@ -0,0 +1,21 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.PlayerFormation.PlayerFormationReq; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_formation_req) +public class HandlerPlayerFormationReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var req = PlayerFormationReq.parseFrom(message); + + boolean success = session.getPlayer().getFormations().updateFormation(req.getFormation()); + + return this.encodeMsg(success ? NetMsgId.player_formation_succeed_ack : NetMsgId.player_formation_failed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerGenderEditReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerGenderEditReq.java new file mode 100644 index 0000000..b6a921e --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerGenderEditReq.java @@ -0,0 +1,18 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_gender_edit_req) +public class HandlerPlayerGenderEditReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + session.getPlayer().editGender(); + + return this.encodeMsg(NetMsgId.player_gender_edit_succeed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerHeadIconInfoReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerHeadIconInfoReq.java new file mode 100644 index 0000000..9a5045b --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerHeadIconInfoReq.java @@ -0,0 +1,19 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.PlayerHeadInfo.PlayerHeadIconInfoResp; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_head_icon_info_req) +public class HandlerPlayerHeadIconInfoReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = PlayerHeadIconInfoResp.newInstance(); + + return this.encodeMsg(NetMsgId.player_head_icon_info_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerLearnReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerLearnReq.java new file mode 100644 index 0000000..4aefe9a --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerLearnReq.java @@ -0,0 +1,22 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.Public.NewbieInfo; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_learn_req) +public class HandlerPlayerLearnReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var req = NewbieInfo.parseFrom(message); + + // TODO set newbie info + session.getPlayer().setNewbieInfo(req.getGroupId(), req.getStepId()); + + return this.encodeMsg(NetMsgId.player_learn_succeed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerLoginReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerLoginReq.java new file mode 100644 index 0000000..bd9bb0d --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerLoginReq.java @@ -0,0 +1,42 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.PlayerLogin.LoginReq; +import emu.nebula.proto.PlayerLogin.LoginResp; +import emu.nebula.net.HandlerId; +import emu.nebula.Nebula; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_login_req) +public class HandlerPlayerLoginReq extends NetHandler { + + public boolean requirePlayer() { + return false; + } + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = LoginReq.parseFrom(message); + var loginToken = req.getOfficialOverseas().getToken(); + + // Login + boolean result = session.login(loginToken); + + if (!result) { + return this.encodeMsg(NetMsgId.player_login_failed_ack); + } + + // Regenerate session token because we are switching encrpytion method + Nebula.getGameContext().generateSessionToken(session); + + // Create rsp + var rsp = LoginResp.newInstance() + .setToken(session.getToken()); + + // Encode and send to client + return this.encodeMsg(NetMsgId.player_login_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerMusicSetReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerMusicSetReq.java new file mode 100644 index 0000000..972d401 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerMusicSetReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_music_set_req) +public class HandlerPlayerMusicSetReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.player_music_set_failed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerNameEditReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerNameEditReq.java new file mode 100644 index 0000000..0dbd31f --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerNameEditReq.java @@ -0,0 +1,21 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.PlayerNameEdit.PlayerNameEditReq; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_name_edit_req) +public class HandlerPlayerNameEditReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var req = PlayerNameEditReq.parseFrom(message); + + boolean success = session.getPlayer().editName(req.getName()); + + return this.encodeMsg(success ? NetMsgId.player_name_edit_succeed_ack : NetMsgId.player_name_edit_failed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerPingReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerPingReq.java new file mode 100644 index 0000000..2e94d1a --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerPingReq.java @@ -0,0 +1,21 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.PlayerPing.Pong; +import emu.nebula.net.HandlerId; +import emu.nebula.Nebula; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_ping_req) +public class HandlerPlayerPingReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + var rsp = Pong.newInstance() + .setServerTs(Nebula.getCurrentTime()); + + return this.encodeMsg(NetMsgId.player_ping_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerPlayerRegReq.java b/src/main/java/emu/nebula/server/handlers/HandlerPlayerRegReq.java new file mode 100644 index 0000000..fa6cbb3 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerPlayerRegReq.java @@ -0,0 +1,39 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.PlayerRegOuterClass.PlayerReg; +import emu.nebula.net.HandlerId; +import emu.nebula.Nebula; +import emu.nebula.game.player.Player; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.player_reg_req) +public class HandlerPlayerRegReq extends NetHandler { + + public boolean requirePlayer() { + return false; + } + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse request + var req = PlayerReg.parseFrom(message); + + // Sanity + if (req.getNickname() == null || req.getNickname().isEmpty()) { + return this.encodeMsg(NetMsgId.player_reg_failed_ack); + } + + // Create player + Player player = Nebula.getGameContext().getPlayerModule().createPlayer(session, req.getNickname(), req.getGender()); + + if (player == null) { + return this.encodeMsg(NetMsgId.player_reg_failed_ack); + } + + // Encode player data + return this.encodeMsg(NetMsgId.player_data_succeed_ack, session.getPlayer().toProto()); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerStarTowerApplyReq.java b/src/main/java/emu/nebula/server/handlers/HandlerStarTowerApplyReq.java new file mode 100644 index 0000000..3c2151e --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerStarTowerApplyReq.java @@ -0,0 +1,35 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.StarTowerApply.StarTowerApplyReq; +import emu.nebula.proto.StarTowerApply.StarTowerApplyResp; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.star_tower_apply_req) +public class HandlerStarTowerApplyReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Parse req + var req = StarTowerApplyReq.parseFrom(message); + + // Apply to create a star tower instance + var instance = session.getPlayer().getStarTowerManager().apply(req); + + if (instance == null) { + return this.encodeMsg(NetMsgId.star_tower_apply_failed_ack); + } + + // Create response + var rsp = StarTowerApplyResp.newInstance() + .setLastId(req.getId()) + .setInfo(instance.toProto()); + + rsp.getMutableChange(); + + return this.encodeMsg(NetMsgId.star_tower_apply_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerStarTowerBuildBriefListGetReq.java b/src/main/java/emu/nebula/server/handlers/HandlerStarTowerBuildBriefListGetReq.java new file mode 100644 index 0000000..5d39a78 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerStarTowerBuildBriefListGetReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.star_tower_build_brief_list_get_req) +public class HandlerStarTowerBuildBriefListGetReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.star_tower_build_brief_list_get_succeed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerStarTowerInteractReq.java b/src/main/java/emu/nebula/server/handlers/HandlerStarTowerInteractReq.java new file mode 100644 index 0000000..fa2cd69 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerStarTowerInteractReq.java @@ -0,0 +1,31 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.proto.StarTowerInteract.StarTowerInteractReq; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.star_tower_interact_req) +public class HandlerStarTowerInteractReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + // Get star tower instance + var instance = session.getPlayer().getStarTowerManager().getInstance(); + + if (instance == null) { + return this.encodeMsg(NetMsgId.star_tower_interact_failed_ack); + } + + // Parse request + var req = StarTowerInteractReq.parseFrom(message); + + // Handle interaction + var rsp = instance.handleInteract(req); + + // Template + return this.encodeMsg(NetMsgId.star_tower_interact_succeed_ack, rsp); + } + +} diff --git a/src/main/java/emu/nebula/server/handlers/HandlerTowerGrowthDetailReq.java b/src/main/java/emu/nebula/server/handlers/HandlerTowerGrowthDetailReq.java new file mode 100644 index 0000000..4cefc23 --- /dev/null +++ b/src/main/java/emu/nebula/server/handlers/HandlerTowerGrowthDetailReq.java @@ -0,0 +1,16 @@ +package emu.nebula.server.handlers; + +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgId; +import emu.nebula.net.HandlerId; +import emu.nebula.net.GameSession; + +@HandlerId(NetMsgId.tower_growth_detail_req) +public class HandlerTowerGrowthDetailReq extends NetHandler { + + @Override + public byte[] handle(GameSession session, byte[] message) throws Exception { + return this.encodeMsg(NetMsgId.tower_growth_detail_succeed_ack); + } + +} diff --git a/src/main/java/emu/nebula/server/routes/AgentZoneHandler.java b/src/main/java/emu/nebula/server/routes/AgentZoneHandler.java new file mode 100644 index 0000000..b39a8ce --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/AgentZoneHandler.java @@ -0,0 +1,212 @@ +package emu.nebula.server.routes; + +import java.util.Set; + +import org.reflections.Reflections; + +import emu.nebula.Nebula; +import emu.nebula.game.GameContext; +import emu.nebula.net.NetHandler; +import emu.nebula.net.NetMsgIdUtils; +import emu.nebula.net.GameSession; +import emu.nebula.net.HandlerId; +import emu.nebula.util.AeadHelper; +import emu.nebula.util.Utils; +import io.javalin.http.Context; +import io.javalin.http.Handler; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import lombok.Getter; + +@Getter +public class AgentZoneHandler implements Handler { + private final Int2ObjectMap<NetHandler> handlers; + private final static byte[] EMPTY_BYTES = new byte[0]; + + public AgentZoneHandler() { + this.handlers = new Int2ObjectOpenHashMap<>(); + this.registerHandlers(); + } + + protected GameContext getGameContext() { + return Nebula.getGameContext(); + } + + @Override + public void handle(Context ctx) throws Exception { + // Setup session + GameSession session = null; + + byte[] sessionKey = AeadHelper.serverGarbleKey; + boolean hasKey3 = false; + + // Get token + String token = ctx.header("X-Token"); + + // Set headers + ctx.res().setHeader("Server", "agent"); + + // Check if we have a token + if (token != null) { + // Get session + session = getGameContext().getSessionByToken(token); + + // Uh oh - session not found + if (session == null || session.getKey() == null) { + ctx.status(500); + ctx.result(""); + return; + } + + // Set key + sessionKey = session.getKey(); + hasKey3 = true; + } + + // Parse request + byte[] data = null; + int msgId = 0; + + try { + // Get message + byte[] message = ctx.bodyAsBytes(); + int offset = 0; + + // Sanity for malformed packets + if (message.length <= 12) { + ctx.status(500); + ctx.result(""); + return; + } + + // Decrypt message + if (hasKey3) { + message = AeadHelper.decryptChaCha(message, sessionKey); + offset = 10; + } else { + message = AeadHelper.decryptBasic(message, sessionKey); + message = AeadHelper.decryptGCM(message, sessionKey); + } + + // Get message id + msgId = (message[offset++] << 8) | (message[offset++] & 0xff); + + // Set data + data = new byte[message.length - offset]; + System.arraycopy(message, offset, data, 0, data.length); + + // Log + if (Nebula.getConfig().getLogOptions().packets) { + this.logRecv(msgId, data); + } + } catch (Exception e) { + // Decrypt error + e.printStackTrace(); + ctx.status(500); + ctx.result(""); + return; + } + + // Update last active time for session + if (session != null) { + session.updateLastActiveTime(); + } + + // Handle packet + NetHandler handler = this.handlers.get(msgId); + byte[] result = null; + + try { + if (handler == null) { + Nebula.getLogger().warn("Unhandled request: " + msgId); + return; + } + + // Check handler requirements + if (session == null) { + if (handler.requireSession()) { + return; + } + } else if (session.getPlayer() == null && handler.requirePlayer()) { + return; + } + + // Handle data + result = handler.handle(session, data); + } catch (Exception e) { + // Handler error + e.printStackTrace(); + } finally { + // Send result + if (result == null) { + ctx.status(500); + ctx.result(EMPTY_BYTES); + return; + } + + // Log + if (Nebula.getConfig().getLogOptions().packets) { + this.logSend(result); + } + + // Encrypt + if (hasKey3) { + result = AeadHelper.encryptChaCha(result, sessionKey); + } else { + result = AeadHelper.encryptGCM(result, sessionKey); + result = AeadHelper.encryptBasic(result, sessionKey); + } + + // Send to client + ctx.status(200); + ctx.result(result); + + ctx.res().setHeader("Content-Type", null); + } + } + + // Loggers + + private void logRecv(int msgId, byte[] data) { + Nebula.getLogger().info("RECV: " + NetMsgIdUtils.getMsgIdName(msgId) + " (" + msgId + ")"); + System.out.println(Utils.bytesToHex(data)); + } + + private void logSend(byte[] data) { + int sendMsgId = (data[0] << 8) | (data[1] & 0xff); + Nebula.getLogger().info("SEND: " + NetMsgIdUtils.getMsgIdName(sendMsgId) + " (" + sendMsgId + ")"); + System.out.println(Utils.bytesToHex(data, 2)); + } + + // Register handlers + + private void registerHandlers() { + // Setup handlers + Reflections reflections = new Reflections(Nebula.class.getPackageName()); + Set<Class<?>> handlers = reflections.getTypesAnnotatedWith(HandlerId.class); + + for (Class<?> cls : handlers) { + // Make sure class is a handler + if (!NetHandler.class.isAssignableFrom(cls)) { + continue; + } + + try { + NetHandler handler = (NetHandler) cls.getConstructor().newInstance(); + HandlerId def = cls.getAnnotation(HandlerId.class); + + int opcode = def.value(); + if (opcode != 0) { + // Put in handler map + this.handlers.put(opcode, handler); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + // Log registration + Nebula.getLogger().info("Registered " + handlers.size() + " handlers"); + } +} + diff --git a/src/main/java/emu/nebula/server/routes/CommonConfigHandler.java b/src/main/java/emu/nebula/server/routes/CommonConfigHandler.java new file mode 100644 index 0000000..f9ba8d5 --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/CommonConfigHandler.java @@ -0,0 +1,30 @@ +package emu.nebula.server.routes; + +import org.jetbrains.annotations.NotNull; + +import emu.nebula.server.HttpServer; +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import io.javalin.http.Handler; +import lombok.Getter; + +@Getter +public class CommonConfigHandler implements Handler { + private HttpServer server; + private String json; + + public CommonConfigHandler(HttpServer server) { + this.server = server; + this.json = "{\"Code\":200,\"Data\":{\"AppConfig\":{\"ACCOUNT_RETRIEVAL\":{\"FIRST_LOGIN_POPUP\":false,\"LOGIN_POPUP\":false,\"PAGE_URL\":\"\"},\"AGREEMENT_POPUP_TYPE\":\"Browser\",\"APPLE_CURRENCY_BLOCK_LIST\":null,\"APPLE_TYPE_KEY\":\"apple_hk\",\"APP_CLIENT_LANG\":[\"en\"],\"APP_DEBUG\":0,\"APP_GL\":\"en\",\"BIND_METHOD\":[\"google\",\"apple_hk\",\"facebook\"],\"CAPTCHA_ENABLED\":false,\"CLIENT_LOG_REPORTING\":{\"ENABLE\":true},\"CREDIT_INVESTIGATION\":\"0.0\",\"DESTROY_USER_DAYS\":15,\"DESTROY_USER_ENABLE\":1,\"DETECTION_ADDRESS\":{\"AUTO\":{\"DNS\":[\"${url}\",\"${url}\",\"${url}/meta/serverlist.html\"],\"HTTP\":[\"${url}\",\"${url}\",\"${url}\"],\"MTR\":[\"${url}\",\"${url}\",\"${url}/meta/serverlist.html\"],\"PING\":[\"${url}\",\"${url}\",\"${url}/meta/serverlist.html\"],\"TCP\":[\"${url}\",\"${url}\",\"${url}/meta/serverlist.html\"]},\"ENABLE\":true,\"ENABLE_MANUAL\":true,\"INTERNET\":\"https://www.google.com\",\"INTERNET_ADDRESS\":\"https://www.google.com\",\"NETWORK_ENDPORINT\":\"\",\"NETWORK_PROJECT\":\"\",\"NETWORK_SECRET_KEY\":\"\"},\"ENABLE_AGREEMENT\":true,\"ENABLE_MULTI_LANG_AGREEMENT\":false,\"ENABLE_TEXT_REVIEW\":true,\"ERROR_CODE\":\"4.4\",\"FILE_DOMAIN\":\"\",\"GEETEST_ENABLE\":false,\"GEETEST_ID\":\"\",\"GOOGLE_ANALYTICS_MEASUREMENT_ID\":\"\",\"MIGRATE_POPUP\":true,\"NICKNAME_REG\":\"^[A-Za-z0-9]{2,20}$\",\"POPUP\":{\"Data\":[{\"Lang\":\"ja\",\"Text\":\"YostarIDを作成\"},{\"Lang\":\"en\",\"Text\":\"CreateaYostaraccount\"},{\"Lang\":\"kr\",\"Text\":\"YOSTAR계정가입하기\"},{\"Lang\":\"fr\",\"Text\":\"CréezvotrecompteYostar\"},{\"Lang\":\"de\",\"Text\":\"EinenYostar-Accounterstellen\"}],\"Enable\":true},\"PRIVACY_AGREEMENT\":\"0.1\",\"RECHARGE_LIMIT\":{\"Enable\":false,\"IsOneLimit\":false,\"Items\":[],\"OneLimitAmount\":0},\"SHARE\":{\"CaptureScreen\":{\"AutoCloseDelay\":0,\"Enabled\":false},\"Facebook\":{\"AppID\":\"\",\"Enabled\":false},\"Instagram\":{\"Enabled\":false},\"Kakao\":{\"AppKey\":\"\",\"Enabled\":false},\"Naver\":{\"Enabled\":false},\"Twitter\":{\"Enabled\":false}},\"SLS\":{\"ACCESS_KEY_ID\":\"7b5d0ffd0943f26704fc547a871c68b1b5d56b5c9caeb354205b81f445d7af59\",\"ACCESS_KEY_SECRET\":\"4a5e9cc8a50819290c9bfa1fedc79da7c50e85189a05eb462a3d28a7688eabb0\",\"ENABLE\":false},\"SURVEY_POPUP_TYPE\":\"Browser\",\"UDATA\":{\"Enable\":false,\"URL\":\"${url}\"},\"USER_AGREEMENT\":\"0.1\",\"YOSTAR_PREFIX\":\"yoyo\"},\"EuropeUnion\":false,\"StoreConfig\":{\"ADJUST_APPID\":\"\",\"ADJUST_CHARGEEVENTTOKEN\":\"\",\"ADJUST_ENABLED\":0,\"ADJUST_EVENTTOKENS\":null,\"ADJUST_ISDEBUG\":0,\"AIRWALLEX_ENABLED\":false,\"AI_HELP\":{\"AihelpAppID\":\"yostar1_platform_2db52a57068b1ee3fe3652c8b53d581b\",\"AihelpAppKey\":\"YOSTAR1_app_bc226f4419a7447c9de95711f8a2d3d9\",\"AihelpDomain\":\"yostar1.aihelp.net\",\"CustomerServiceURL\":\"\",\"CustomerWay\":1,\"DisplayType\":\"Browser\",\"Enable\":1,\"Mode\":\"robot\"},\"APPLEID\":\"\",\"CODA_ENABLED\":false,\"ENABLED_PAY\":{\"AIRWALLEX_ENABLED\":false,\"CODA_ENABLED\":false,\"GMOAlipay\":false,\"GMOAu\":false,\"GMOCreditcard\":false,\"GMOCvs\":false,\"GMODocomo\":false,\"GMOPaypal\":false,\"GMOPaypay\":false,\"GMOSoftbank\":false,\"MYCARD_ENABLED\":false,\"PAYPAL_ENABLED\":true,\"RAZER_ENABLED\":false,\"STEAM_ENABLED\":false,\"STRIPE_ENABLED\":true,\"TOSS_ENABLED\":false,\"WEBMONEY_ENABLED\":false},\"FACEBOOK_APPID\":\"\",\"FACEBOOK_CLIENT_TOKEN\":\"\",\"FACEBOOK_SECRET\":\"\",\"FIREBASE_ENABLED\":0,\"GMO_CC_JS\":\"https://\",\"GMO_CC_KEY\":\"\",\"GMO_CC_SHOPID\":\"\",\"GMO_PAY_CHANNEL\":{\"GMOAlipay\":false,\"GMOAu\":false,\"GMOCreditcard\":false,\"GMOCvs\":false,\"GMODocomo\":false,\"GMOPaypal\":false,\"GMOPaypay\":false,\"GMOSoftbank\":false},\"GMO_PAY_ENABLED\":false,\"GOOGLE_CLIENT_ID\":\"\",\"GOOGLE_CLIENT_SECRET\":\"\",\"GUEST_CREATE_METHOD\":0,\"GUIDE_POPUP\":{\"DATA\":null,\"ENABLE\":0},\"LOGIN\":{\"DEFAULT\":\"yostar\",\"ICON_SIZE\":\"big\",\"SORT\":[\"google\",\"apple\",\"device\"]},\"MYCARD_ENABLED\":false,\"ONE_STORE_LICENSE_KEY\":\"\",\"PAYPAL_ENABLED\":false,\"RAZER_ENABLED\":false,\"REMOTE_CONFIG\":[],\"SAMSUNG_SANDBOX_MODE\":false,\"STEAM_APPID\":\"\",\"STEAM_ENABLED\":false,\"STEAM_PAY_APPID\":\"\",\"STRIPE_ENABLED\":false,\"TOSS_ENABLED\":false,\"TWITTER_KEY\":\"\",\"TWITTER_SECRET\":\"\",\"WEBMONEY_ENABLED\":false}},\"Msg\":\"OK\"}"; + + String address = server.getServerConfig().getDisplayAddress(); + this.json = this.json.replaceAll("\\$\\{url}", address); + } + + @Override + public void handle(@NotNull Context ctx) throws Exception { + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result(this.json); + } + +} diff --git a/src/main/java/emu/nebula/server/routes/GetAuthHandler.java b/src/main/java/emu/nebula/server/routes/GetAuthHandler.java new file mode 100644 index 0000000..68897ee --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/GetAuthHandler.java @@ -0,0 +1,83 @@ +package emu.nebula.server.routes; + +import org.jetbrains.annotations.NotNull; + +import emu.nebula.Nebula; +import emu.nebula.game.account.Account; +import emu.nebula.game.account.AccountHelper; +import emu.nebula.util.JsonUtils; +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import io.javalin.http.Handler; +import lombok.Getter; + +@Getter +public class GetAuthHandler implements Handler { + + @Override + public void handle(@NotNull Context ctx) throws Exception { + // Parse request + var req = JsonUtils.decode(ctx.body(), GetAuthRequestJson.class); + + if (req == null || req.Account == null || req.Account.isEmpty() || req.Code == null) { + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result("{\"Code\":100600,\"Data\":{},\"Msg\":\"Error\"}"); // PARAM_IS_EMPTY + return; + } + + // Get account + Account account = AccountHelper.getAccountByEmail(req.Account); + + if (account == null) { + // Create an account if were allowed to + if (Nebula.getConfig().getServerOptions().isAutoCreateAccount()) { + account = AccountHelper.createAccount(req.Account, null, 0); + } + } else { + // Check passcode sent by email + if (!account.verifyCode(req.Code)) { + account = null; + } + } + + // Sanity + if (account == null) { + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result("{\"Code\":100403,\"Data\":{},\"Msg\":\"Error\"}"); // TOKEN_AUTH_FAILED + return; + } + + // Build request + var response = new GetAuthResponseJson(); + + response.Code = 200; + response.Msg = "OK"; + response.Data = new GetAuthResponseJson.GetAuthDataJson(); + response.Data.UID = account.getEmail(); + response.Data.Token = account.generateLoginToken(); + response.Data.Account = account.getEmail(); + + // Result + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result(JsonUtils.encode(response)); + } + + private static class GetAuthRequestJson { + public String Account; + public String Code; + } + + @SuppressWarnings("unused") + private static class GetAuthResponseJson { + public int Code; + public GetAuthDataJson Data; + public String Msg; + + private static class GetAuthDataJson { + public String UID; + public String Token; + public String Account; + } + } + +} diff --git a/src/main/java/emu/nebula/server/routes/HttpJsonResponse.java b/src/main/java/emu/nebula/server/routes/HttpJsonResponse.java new file mode 100644 index 0000000..e5f24f1 --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/HttpJsonResponse.java @@ -0,0 +1,22 @@ +package emu.nebula.server.routes; + +import org.jetbrains.annotations.NotNull; + +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import io.javalin.http.Handler; + +public class HttpJsonResponse implements Handler { + private final String json; + + public HttpJsonResponse(String jsonString) { + this.json = jsonString; + } + + @Override + public void handle(@NotNull Context ctx) throws Exception { + ctx.status(200); + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result(json); + } +} diff --git a/src/main/java/emu/nebula/server/routes/MetaServerlistHandler.java b/src/main/java/emu/nebula/server/routes/MetaServerlistHandler.java new file mode 100644 index 0000000..eccf00d --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/MetaServerlistHandler.java @@ -0,0 +1,60 @@ +package emu.nebula.server.routes; + +import org.jetbrains.annotations.NotNull; + +import emu.nebula.proto.Pb.ServerAgent; +import emu.nebula.proto.Pb.ServerListMeta; +import emu.nebula.server.HttpServer; +import emu.nebula.util.AeadHelper; +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import io.javalin.http.Handler; +import lombok.AccessLevel; +import lombok.Getter; + +@Getter(AccessLevel.PRIVATE) +public class MetaServerlistHandler implements Handler { + private HttpServer server; + private ServerListMeta list; + private byte[] proto; + + public MetaServerlistHandler(HttpServer server) { + this.server = server; + + // Create server list + this.list = ServerListMeta.newInstance() + .setVersion(22) + .setReportEndpoint(server.getServerConfig().getDisplayAddress() + "/report"); + + var agent = ServerAgent.newInstance() + .setName("Nebula") // TODO allow change in config + .setAddr(server.getServerConfig().getDisplayAddress() + "/agent-zone-1/") + .setStatus(1) + .setZone(1); + + this.list.addAgent(agent); + + var agent2 = ServerAgent.newInstance() + .setName("Test") // TODO allow change in config + .setAddr(server.getServerConfig().getDisplayAddress() + "/agent-zone-1/") + .setStatus(1) + .setZone(1); + + this.list.addAgent(agent2); + + // Cache proto + this.proto = list.toByteArray(); + } + + @Override + public void handle(@NotNull Context ctx) throws Exception { + // Result + try { + ctx.contentType(ContentType.APPLICATION_OCTET_STREAM); + ctx.result(AeadHelper.encryptCBC(this.getProto())); + } catch (Exception e) { + e.printStackTrace(); + } + } + +} diff --git a/src/main/java/emu/nebula/server/routes/MetaWinHandler.java b/src/main/java/emu/nebula/server/routes/MetaWinHandler.java new file mode 100644 index 0000000..68c9b03 --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/MetaWinHandler.java @@ -0,0 +1,35 @@ +package emu.nebula.server.routes; + +import org.jetbrains.annotations.NotNull; + +import emu.nebula.proto.Pb.ClientDiff; +import emu.nebula.util.AeadHelper; +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import io.javalin.http.Handler; +import lombok.AccessLevel; +import lombok.Getter; + +@Getter(AccessLevel.PRIVATE) +public class MetaWinHandler implements Handler { + private ClientDiff list; + private byte[] proto; + + public MetaWinHandler() { + // Create client diff + this.list = ClientDiff.newInstance(); + + // TODO load from json or something + + // Cache proto + this.proto = list.toByteArray(); + } + + @Override + public void handle(@NotNull Context ctx) throws Exception { + // Result + ctx.contentType(ContentType.APPLICATION_OCTET_STREAM); + ctx.result(AeadHelper.encryptCBC(this.getProto())); + } + +} diff --git a/src/main/java/emu/nebula/server/routes/UserLoginEntity.java b/src/main/java/emu/nebula/server/routes/UserLoginEntity.java new file mode 100644 index 0000000..d3e264f --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/UserLoginEntity.java @@ -0,0 +1,51 @@ +package emu.nebula.server.routes; + +import java.util.List; + +public class UserLoginEntity { + public int Code; + public UserDetailJson Data; + public String Msg; + + public static class UserDetailJson { + public long AgeVerifyMethod; + public Object Destroy; + public boolean IsTestAccount; + public List<UserKeyJson> Keys; + public long ServerNowAt; + public UserInfoJson UserInfo; + public LoginYostarJson Yostar; + public Object YostarDestroy; + } + + public static class UserKeyJson { + public String ID; + public String Type; + public String Key; + public String NickName; + public long CreatedAt; + } + + public static class UserInfoJson { + public String ID; + public int UID2; + public String PID; + public String Token; + public String Birthday; + public String RegChannel; + public String TransCode; + public int State; + public String DeviceID; + public long CreatedAt; + } + + public static class LoginYostarJson { + public String ID; + public String Country; + public String Nickname; + public String Picture; + public int State; + public int AgreeAd; + public long CreatedAt; + } +} diff --git a/src/main/java/emu/nebula/server/routes/UserLoginHandler.java b/src/main/java/emu/nebula/server/routes/UserLoginHandler.java new file mode 100644 index 0000000..d7fba3b --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/UserLoginHandler.java @@ -0,0 +1,127 @@ +package emu.nebula.server.routes; + +import java.util.ArrayList; + +import org.jetbrains.annotations.NotNull; + +import emu.nebula.game.account.Account; +import emu.nebula.game.account.AccountHelper; +import emu.nebula.server.routes.UserLoginEntity.LoginYostarJson; +import emu.nebula.server.routes.UserLoginEntity.UserDetailJson; +import emu.nebula.server.routes.UserLoginEntity.UserInfoJson; +import emu.nebula.server.routes.UserLoginEntity.UserKeyJson; +import emu.nebula.util.JsonUtils; +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import io.javalin.http.Handler; +import lombok.Getter; + +@Getter +public class UserLoginHandler implements Handler { + + @Override + public void handle(@NotNull Context ctx) throws Exception { + // Get account from header first + Account account = this.getAccountFromHeader(ctx); + + // Check req body for account details + if (account == null) { + account = this.getAccountFromBody(ctx); + } + + // Check + if (account == null) { + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result("{\"Code\":100403,\"Data\":{},\"Msg\":\"Error\"}"); // TOKEN_AUTH_FAILED + return; + } + + // Create response + var response = new UserLoginEntity(); + + response.Code = 200; + response.Msg = "OK"; + response.Data = new UserDetailJson(); + response.Data.Keys = new ArrayList<>(); + response.Data.UserInfo = new UserInfoJson(); + response.Data.Yostar = new LoginYostarJson(); + + response.Data.UserInfo.ID = account.getUid(); + response.Data.UserInfo.UID2 = 0; + response.Data.UserInfo.PID = "NEBULA"; + response.Data.UserInfo.Token = account.getLoginToken(); + response.Data.UserInfo.Birthday = ""; + response.Data.UserInfo.RegChannel = "pc"; + response.Data.UserInfo.TransCode = ""; + response.Data.UserInfo.State = 1; + response.Data.UserInfo.DeviceID = ""; + response.Data.UserInfo.CreatedAt = account.getCreatedAt(); + + response.Data.Yostar.ID = account.getUid(); + response.Data.Yostar.Country = "US"; + response.Data.Yostar.Nickname = account.getNickname(); + response.Data.Yostar.Picture = account.getPicture(); + response.Data.Yostar.State = 1; + response.Data.Yostar.AgreeAd = 0; + response.Data.Yostar.CreatedAt = account.getCreatedAt(); + + var key = new UserKeyJson(); + key.ID = account.getUid(); + key.Type = "yostar"; + key.Key = account.getEmail(); + key.NickName = account.getEmail(); + key.CreatedAt = account.getCreatedAt(); + + response.Data.Keys.add(key); + + // Result + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result(JsonUtils.encode(response, true)); + } + + protected Account getAccountFromBody(Context ctx) { + // Parse request + var req = JsonUtils.decode(ctx.body(), UserLoginRequestJson.class); + + if (req == null || req.OpenID == null || req.Token == null) { + return null; + } + + // Get account + return AccountHelper.getAccountByLoginToken(req.Token); + } + + protected Account getAccountFromHeader(Context ctx) { + // Parse request + var req = JsonUtils.decode(ctx.header("Authorization"), UserAuthDataJson.class); + + if (req == null || req.Head == null || req.Head.Token == null) { + return null; + } + + // Get account + return AccountHelper.getAccountByLoginToken(req.Head.Token); + } + + @SuppressWarnings("unused") + private static class UserLoginRequestJson { + public String OpenID; + public String Token; + public String Type; + public String UserName; + public String Secret; + public int CheckAccount; + } + + @SuppressWarnings("unused") + private static class UserAuthDataJson { + public UserAuthHeadJson Head; + public String Sign; + + protected static class UserAuthHeadJson { + public String UID; + public String Token; + } + } + +} diff --git a/src/main/java/emu/nebula/server/routes/UserSetDataHandler.java b/src/main/java/emu/nebula/server/routes/UserSetDataHandler.java new file mode 100644 index 0000000..85bbb49 --- /dev/null +++ b/src/main/java/emu/nebula/server/routes/UserSetDataHandler.java @@ -0,0 +1,51 @@ +package emu.nebula.server.routes; + +import org.jetbrains.annotations.NotNull; + +import emu.nebula.game.account.Account; +import emu.nebula.util.JsonUtils; +import io.javalin.http.ContentType; +import io.javalin.http.Context; +import lombok.Getter; + +@Getter +public class UserSetDataHandler extends UserLoginHandler { + + @Override + public void handle(@NotNull Context ctx) throws Exception { + // Get account from header first + Account account = this.getAccountFromHeader(ctx); + + // Check + if (account == null) { + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result("{\"Code\":100403,\"Data\":{},\"Msg\":\"Error\"}"); // TOKEN_AUTH_FAILED + return; + } + + // Parse request + var req = JsonUtils.decode(ctx.body(), UserSetDataReqJson.class); + + if (req.Key == null || req.Value == null) { + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result("{\"Code\":100110,\"Data\":{},\"Msg\":\"Error\"}"); // VALID_FAIL + return; + } + + if (req.Key.equals("Nickname")) { + account.setNickname(req.Value); + account.save(); + } + + // Result + ctx.contentType(ContentType.APPLICATION_JSON); + ctx.result("{\"Code\":200,\"Data\":{},\"Msg\":\"OK\"}"); + } + + @SuppressWarnings("unused") + private static class UserSetDataReqJson { + public String Key; + public String Value; + } + +} diff --git a/src/main/java/emu/nebula/util/AeadHelper.java b/src/main/java/emu/nebula/util/AeadHelper.java new file mode 100644 index 0000000..ef663eb --- /dev/null +++ b/src/main/java/emu/nebula/util/AeadHelper.java @@ -0,0 +1,284 @@ +package emu.nebula.util; + +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; + +import javax.crypto.Cipher; +import javax.crypto.spec.GCMParameterSpec; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; + +import org.bouncycastle.asn1.nist.NISTNamedCurves; +import org.bouncycastle.asn1.sec.SECNamedCurves; +import org.bouncycastle.crypto.AsymmetricCipherKeyPair; +import org.bouncycastle.crypto.agreement.ECDHBasicAgreement; +import org.bouncycastle.crypto.digests.SHA256Digest; +import org.bouncycastle.crypto.generators.ECKeyPairGenerator; +import org.bouncycastle.crypto.generators.HKDFBytesGenerator; +import org.bouncycastle.crypto.params.*; + +// Official Name: AeadTool +public class AeadHelper { + private static final ThreadLocal<SecureRandom> random = new ThreadLocal<>() { + @Override + protected SecureRandom initialValue() { + return new SecureRandom(); + } + }; + + public static final byte[] serverGarbleKey = "xNdVF^XTa6T3HCUATMQ@sKMLzAw&%L!3".getBytes(StandardCharsets.US_ASCII); // Global + public static final byte[] serverMetaKey = "ma5Dn2FhC*Xhxy%c".getBytes(StandardCharsets.US_ASCII); // Global + + public static byte[] generateBytes(int size) { + byte[] iv = new byte[size]; + random.get().nextBytes(iv); + return iv; + } + + // AES CBC + + public static byte[] encryptCBC(byte[] messageData) throws Exception { + byte[] iv = generateBytes(16); + + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + + cipher.init( + Cipher.ENCRYPT_MODE, + new SecretKeySpec(serverMetaKey, "AES"), + new IvParameterSpec(iv) + ); + + byte[] encrypted = cipher.doFinal(messageData); + byte[] data = new byte[encrypted.length + iv.length]; + + System.arraycopy(iv, 0, data, 0, iv.length); + System.arraycopy(encrypted, 0, data, iv.length, encrypted.length); + + return data; + } + + public static byte[] decryptCBC(byte[] messageData) throws Exception { + byte[] iv = new byte[16]; + byte[] data = new byte[messageData.length - iv.length]; + + System.arraycopy(messageData, 0, iv, 0, iv.length); + System.arraycopy(messageData, iv.length, data, 0, data.length); + + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + + cipher.init( + Cipher.DECRYPT_MODE, + new SecretKeySpec(serverMetaKey, "AES"), + new IvParameterSpec(iv) + ); + + return cipher.doFinal(data); + } + + // AES GCM + + public static byte[] encryptGCM(byte[] messageData, byte[] key) throws Exception { + byte[] iv = generateBytes(12); + + Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); + + cipher.init( + Cipher.ENCRYPT_MODE, + new SecretKeySpec(key, "AES"), + new GCMParameterSpec(128, iv) + ); + cipher.updateAAD(iv); + + byte[] encrypted = cipher.doFinal(messageData); + byte[] data = new byte[encrypted.length + iv.length]; + + System.arraycopy(iv, 0, data, 0, iv.length); + System.arraycopy(encrypted, 0, data, iv.length, encrypted.length); + + return data; + } + + public static byte[] decryptGCM(byte[] messageData, byte[] key) throws Exception { + byte[] iv = new byte[12]; + byte[] data = new byte[messageData.length - iv.length]; + System.arraycopy(messageData, 0, iv, 0, iv.length); + System.arraycopy(messageData, iv.length, data, 0, data.length); + + Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); + + cipher.init( + Cipher.DECRYPT_MODE, + new SecretKeySpec(key, "AES"), + new GCMParameterSpec(128, iv) + ); + cipher.updateAAD(iv); + + return cipher.doFinal(data); + } + + // Chacha20 + + public static byte[] encryptChaCha(byte[] messageData, byte[] key) throws Exception { + byte[] iv = generateBytes(12); + + Cipher cipher = Cipher.getInstance("ChaCha20-Poly1305/None/NoPadding"); + + cipher.init( + Cipher.ENCRYPT_MODE, + new SecretKeySpec(key, "ChaCha20"), + new IvParameterSpec(iv) + ); + cipher.updateAAD(iv); + + byte[] encrypted = cipher.doFinal(messageData); + byte[] data = new byte[encrypted.length + iv.length]; + + System.arraycopy(iv, 0, data, 0, iv.length); + System.arraycopy(encrypted, 0, data, iv.length, encrypted.length); + + return data; + } + + public static byte[] decryptChaCha(byte[] messageData, byte[] key) throws Exception { + byte[] iv = new byte[12]; + byte[] data = new byte[messageData.length - iv.length]; + System.arraycopy(messageData, 0, iv, 0, iv.length); + System.arraycopy(messageData, iv.length, data, 0, data.length); + + Cipher cipher = Cipher.getInstance("ChaCha20-Poly1305/None/NoPadding"); + + cipher.init( + Cipher.DECRYPT_MODE, + new SecretKeySpec(key, "ChaCha20"), + new IvParameterSpec(iv) + ); + cipher.updateAAD(iv); + + return cipher.doFinal(data); + } + + // XOR + + public static byte[] encryptBasic(byte[] messageData, byte[] key3) { + byte[] data = new byte[messageData.length]; + System.arraycopy(messageData, 0, data, 0, data.length); + + for (int i = 0; i < data.length; i++) { + data[i] ^= key3[i % key3.length]; + + int b = data[i]; + + byte v7 = (byte) (b << 1); + byte v1 = (byte) ((b >> 7) & 0b00000001); + + data[i] = (byte) (v1 | v7); + + data[i] ^= data.length; + } + + return data; + } + + public static byte[] decryptBasic(byte[] messageData, byte[] key3) { + byte[] data = new byte[messageData.length]; + System.arraycopy(messageData, 0, data, 0, data.length); + + for (int i = 0; i < data.length; i++) { + data[i] ^= data.length; + + int b = data[i]; + + byte v1 = (byte) (b << 7); + byte v7 = (byte) ((b >> 1) & 0b01111111); + + data[i] = (byte) (v7 | v1); + + data[i] ^= key3[i % key3.length]; + } + + return data; + } + + // ECDH + + public static AsymmetricCipherKeyPair generateECDHKEyPair() { + var generator = new ECKeyPairGenerator(); + + var p = NISTNamedCurves.getByName("P-256"); + var domainParams = new ECDomainParameters(p.getCurve(), p.getG(), p.getN(), p.getH()); + var genParams = new ECKeyGenerationParameters(domainParams, random.get()); + + generator.init(genParams); + return generator.generateKeyPair(); + } + + public static byte[] generateKey(byte[] clientPublic, byte[] serverPublic, byte[] serverPrivate) { + // Setup + byte[] ikm = new byte[32]; + byte[] salt = serverPublic; + byte[] info = new byte[serverPublic.length]; + + // Create info + for (int i = 0; i < info.length; i++) { + int c = clientPublic[i] & 0xff; + int s = serverPublic[i] & 0xff; + if (c > s) { + s = (s << 1); + } else { + s = ((s >> 1) & 0b01111111); + } + info[i] = (byte) (s ^ c); + } + + var sharedKey = calcECDHSharedKey(clientPublic, serverPrivate); + int count = Math.min(sharedKey.length, 32); + System.arraycopy(sharedKey, 0, ikm, 32 - count, count); + + // Generator + var generator = new HKDFBytesGenerator(new SHA256Digest()); + var genParams = new HKDFParameters(ikm, salt, info); + + byte[] output = new byte[32]; + + generator.init(genParams); + generator.generateBytes(output, 0, output.length); + + return output; + } + + public static byte[] calcECDHSharedKey(byte[] clientPublic, byte[] serverPrivate) { + var p = SECNamedCurves.getByName("secp256r1"); + var domainParams = new ECDomainParameters(p.getCurve(), p.getG(), p.getN(), p.getH(), p.getSeed()); + + var clientPoint = p.getCurve().decodePoint(clientPublic); + var clientParams = new ECPublicKeyParameters(clientPoint, domainParams); + + var serverInteger = new BigInteger(serverPrivate); + var serverParams = new ECPrivateKeyParameters(serverInteger, domainParams); + + var agreement = new ECDHBasicAgreement(); + agreement.init(serverParams); + + var result = agreement.calculateAgreement(clientParams); + + return getUnsignedByteArray(result); + } + + public static byte[] getUnsignedByteArray(BigInteger b) { + byte[] signedByteArray = b.toByteArray(); + byte[] unsignedByteArray; + + if (signedByteArray[0] == 0 && signedByteArray.length > 1) { + // Remove the leading zero byte + unsignedByteArray = new byte[signedByteArray.length - 1]; + System.arraycopy(signedByteArray, 1, unsignedByteArray, 0, unsignedByteArray.length); + } else { + // No leading zero byte to remove, or it's a negative number + // which is not directly representable as an unsigned byte array without special handling + unsignedByteArray = signedByteArray; + } + + return unsignedByteArray; + } +} diff --git a/src/main/java/emu/nebula/util/FileUtils.java b/src/main/java/emu/nebula/util/FileUtils.java new file mode 100644 index 0000000..0b52f9b --- /dev/null +++ b/src/main/java/emu/nebula/util/FileUtils.java @@ -0,0 +1,39 @@ +package emu.nebula.util; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import emu.nebula.Nebula; + +public class FileUtils { + public static void write(String dest, byte[] bytes) { + Path path = Paths.get(dest); + + try { + Files.write(path, bytes); + } catch (IOException e) { + Nebula.getLogger().warn("Failed to write file: " + dest); + } + } + + public static byte[] read(String dest) { + return read(Paths.get(dest)); + } + + public static byte[] read(Path path) { + try { + return Files.readAllBytes(path); + } catch (IOException e) { + Nebula.getLogger().warn("Failed to read file: " + path); + } + + return new byte[0]; + } + + public static byte[] read(File file) { + return read(file.getPath()); + } +} diff --git a/src/main/java/emu/nebula/util/Handbook.java b/src/main/java/emu/nebula/util/Handbook.java new file mode 100644 index 0000000..fa3c459 --- /dev/null +++ b/src/main/java/emu/nebula/util/Handbook.java @@ -0,0 +1,94 @@ +package emu.nebula.util; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.nio.charset.StandardCharsets; +import java.time.Instant; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Map; + +import emu.nebula.GameConstants; +import emu.nebula.Nebula; +import emu.nebula.data.GameData; +import emu.nebula.data.ResourceType; +import emu.nebula.data.resources.CharacterDef; +import emu.nebula.data.resources.ItemDef; + +public class Handbook { + + public static void generate() { + // Temp vars + Map<String, String> languageKey = null; + List<Integer> list = null; + + // Save to file + String file = "./Nebula Handbook.txt"; + + try (PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8), true)) { + // Format date for header + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); + var time = Instant.ofEpochMilli(System.currentTimeMillis()).atZone(ZoneId.systemDefault()).format(dtf); + + // Header + writer.println("# Nebula " + GameConstants.VERSION + " Handbook"); + writer.println("# Created " + time); + + // Dump characters + writer.println(System.lineSeparator()); + writer.println("# Characters"); + list = GameData.getCharacterDataTable().keySet().intStream().sorted().boxed().toList(); + languageKey = loadLanguageKey(CharacterDef.class); + for (int id : list) { + CharacterDef data = GameData.getCharacterDataTable().get(id); + writer.print(data.getId()); + writer.print(" : "); + writer.println(languageKey.getOrDefault(data.getName(), data.getName())); + } + + // Dump characters + writer.println(System.lineSeparator()); + writer.println("# Items"); + list = GameData.getItemDataTable().keySet().intStream().sorted().boxed().toList(); + languageKey = loadLanguageKey(ItemDef.class); + for (int id : list) { + ItemDef data = GameData.getItemDataTable().get(id); + writer.print(data.getId()); + writer.print(" : "); + writer.print(languageKey.getOrDefault(data.getTitle(), data.getTitle())); + + writer.print(" ["); + writer.print(data.getItemType()); + writer.println("]"); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + private static Map<String, String> loadLanguageKey(Class<?> resourceClass) { + // Get type + ResourceType type = resourceClass.getAnnotation(ResourceType.class); + if (type == null) { + return Map.of(); + } + + // Load + Map<String, String> map = null; + + try { + map = JsonUtils.loadToMap(Nebula.getConfig().getResourceDir() + "/language/en_US/" + type.name(), String.class, String.class); + } catch (Exception e) { + e.printStackTrace(); + } + + if (map == null) { + return Map.of(); + } + + return map; + } +} diff --git a/src/main/java/emu/nebula/util/JsonUtils.java b/src/main/java/emu/nebula/util/JsonUtils.java new file mode 100644 index 0000000..f9c1309 --- /dev/null +++ b/src/main/java/emu/nebula/util/JsonUtils.java @@ -0,0 +1,112 @@ +package emu.nebula.util; + +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.reflect.TypeToken; + +import emu.nebula.Nebula; + +public class JsonUtils { + private static final Gson gson = new GsonBuilder().setDateFormat("dd-MM-yyyy hh:mm:ss").setPrettyPrinting().create(); + private static final Gson gsonCompact = new GsonBuilder().create(); + + public static Gson getGsonFactory() { + return gson; + } + + /** + * Encode an object to a JSON string + */ + public static String encode(Object object) { + return gson.toJson(object); + } + + /** + * Encode an object to a JSON string + * @param object + * @param compact + * @return + */ + public static String encode(Object object, boolean compact) { + return compact ? gsonCompact.toJson(object) : gson.toJson(object); + } + + public static JsonElement encodeToElement(Object object) { + return gson.toJsonTree(object); + } + + /** + * Safely JSON decodes a given string. + * @param jsonData The JSON-encoded data. + * @return JSON decoded data, or null if an exception occurred. + */ + public static <T> T decode(String jsonData, Class<T> classType) { + if (jsonData == null) { + return null; + } + + try { + return gson.fromJson(jsonData, classType); + } catch (Exception ignored) { + return null; + } + } + + public static <T> List<T> decodeList(String jsonData, Class<T> classType) { + if (jsonData == null) return null; + try { + return gson.fromJson(jsonData, TypeToken.getParameterized(List.class, classType).getType()); + } catch (Exception ignored) { + return null; + } + } + + public static <T> Set<T> decodeSet(String jsonData, Class<T> classType) { + if (jsonData == null) return null; + try { + return gson.fromJson(jsonData, TypeToken.getParameterized(Set.class, classType).getType()); + } catch (Exception ignored) { + return null; + } + } + + public static <T> T loadToClass(InputStreamReader fileReader, Class<T> classType) throws IOException { + return gson.fromJson(fileReader, classType); + } + + public static <T> T loadToClass(File file, Class<T> classType) throws IOException { + try (InputStreamReader fileReader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)) { + return loadToClass(fileReader, classType); + } + } + + public static <T> List<T> loadToList(InputStreamReader fileReader, Class<T> classType) throws IOException { + return gson.fromJson(fileReader, TypeToken.getParameterized(List.class, classType).getType()); + } + + public static <T> List<T> loadToList(String filename, Class<T> classType) throws IOException { + try (InputStreamReader fileReader = new InputStreamReader(new FileInputStream(Utils.toFilePath(filename)), StandardCharsets.UTF_8)) { + return loadToList(fileReader, classType); + } + } + + public static <T1, T2> Map<T1, T2> loadToMap(InputStreamReader fileReader, Class<T1> keyType, Class<T2> valueType) throws IOException { + return gson.fromJson(fileReader, TypeToken.getParameterized(Map.class, keyType, valueType).getType()); + } + + public static <T1, T2> Map<T1, T2> loadToMap(String filename, Class<T1> keyType, Class<T2> valueType) throws IOException { + try (InputStreamReader fileReader = new InputStreamReader(new FileInputStream(Utils.toFilePath(filename)), StandardCharsets.UTF_8)) { + return loadToMap(fileReader, keyType, valueType); + } catch (FileNotFoundException ignored) { + Nebula.getLogger().error("File not found: {}.", filename); + return null; + } + } +} diff --git a/src/main/java/emu/nebula/util/Snowflake.java b/src/main/java/emu/nebula/util/Snowflake.java new file mode 100644 index 0000000..14ae896 --- /dev/null +++ b/src/main/java/emu/nebula/util/Snowflake.java @@ -0,0 +1,24 @@ +package emu.nebula.util; + +public class Snowflake { + private static final long EPOCH = 1735689600000L; // Wednesday, January 1, 2025 12:00:00 AM (GMT) + private static int cachedTimestamp; + private static byte sequence; + + public synchronized static int newUid() { + int timestamp = (int) ((System.currentTimeMillis() - EPOCH) / 1000); + + if (cachedTimestamp != timestamp) { + sequence = 0; + cachedTimestamp = timestamp; + } else { + sequence++; + } + + return (cachedTimestamp << 4) + sequence; + } + + public synchronized static int toTimestamp(int snowflake) { + return (snowflake >> 4) + (int) (EPOCH / 1000); + } +} diff --git a/src/main/java/emu/nebula/util/Utils.java b/src/main/java/emu/nebula/util/Utils.java new file mode 100644 index 0000000..8b06e59 --- /dev/null +++ b/src/main/java/emu/nebula/util/Utils.java @@ -0,0 +1,265 @@ +package emu.nebula.util; + +import java.io.File; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.util.Base64; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; + +import it.unimi.dsi.fastutil.ints.IntList; + +public class Utils { + private static final char[] HEX_ARRAY = "0123456789abcdef".toCharArray(); + + public static final Object EMPTY_OBJECT = new Object(); + public static final int[] EMPTY_INT_ARRAY = new int[0]; + public static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + + public static String bytesToHex(byte[] bytes) { + return bytesToHex(bytes, 0); + } + + public static String bytesToHex(byte[] bytes, int offset) { + if (bytes == null || (bytes.length - offset) <= 0) return ""; + char[] hexChars = new char[(bytes.length - offset) * 2]; + for (int j = offset; j < bytes.length; j++) { + int v = bytes[j] & 0xFF; + int h = j - offset; + hexChars[h * 2] = HEX_ARRAY[v >>> 4]; + hexChars[h * 2 + 1] = HEX_ARRAY[v & 0x0F]; + } + return new String(hexChars); + } + + public static byte[] hexToBytes(String s) { + int len = s.length(); + byte[] data = new byte[len / 2]; + for (int i = 0; i < len; i += 2) { + data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + + Character.digit(s.charAt(i+1), 16)); + } + return data; + } + + public static String capitalize(String s) { + StringBuilder sb = new StringBuilder(s); + sb.setCharAt(0, Character.toUpperCase(sb.charAt(0))); + return sb.toString(); + } + + public static String lowerCaseFirstChar(String s) { + StringBuilder sb = new StringBuilder(s); + sb.setCharAt(0, Character.toLowerCase(sb.charAt(0))); + return sb.toString(); + } + + /** + * Creates a string with the path to a file. + * @param path The path to the file. + * @return A path using the operating system's file separator. + */ + public static String toFilePath(String path) { + return path.replace("/", File.separator); + } + + /** + * Checks if a file exists on the file system. + * @param path The path to the file. + * @return True if the file exists, false otherwise. + */ + public static boolean fileExists(String path) { + return new File(path).exists(); + } + + /** + * Creates a folder on the file system. + * @param path The path to the folder. + * @return True if the folder was created, false otherwise. + */ + public static boolean createFolder(String path) { + return new File(path).mkdirs(); + } + + public static long getCurrentSeconds() { + return Math.floorDiv(System.currentTimeMillis(), 1000); + } + + public static int getMinPromotionForLevel(int level) { + return Math.max(Math.min((int) ((level - 11) / 10D), 6), 0); + } + + /** + * Parses the string argument as a signed decimal integer. Returns a 0 if the string argument is not an integer. + */ + public static int parseSafeInt(String s) { + if (s == null) { + return 0; + } + + int i = 0; + + try { + i = Integer.parseInt(s); + } catch (Exception e) { + i = 0; + } + + return i; + } + + /** + * Parses the string argument as a signed decimal long. Returns a 0 if the string argument is not a long. + */ + public static long parseSafeLong(String s) { + if (s == null) { + return 0; + } + + long i = 0; + + try { + i = Long.parseLong(s); + } catch (Exception e) { + i = 0; + } + + return i; + } + + /** + * Add 2 integers without overflowing + */ + public static int safeAdd(int a, int b) { + return safeAdd(a, b, Integer.MAX_VALUE, 0); + } + + public static int safeAdd(int a, int b, long max, long min) { + long sum = (long) a + (long) b; + + if (sum > max) { + return (int) max; + } else if (sum < min) { + return (int) min; + } + + return (int) sum; + } + + /** + * Subtract 2 integers without overflowing + */ + public static int safeSubtract(int a, int b) { + return safeSubtract(a, b, Integer.MAX_VALUE, Integer.MIN_VALUE); + } + + public static int safeSubtract(int a, int b, long max, long min) { + long sum = (long) a - (long) b; + + if (sum > max) { + return (int) max; + } else if (sum < min) { + return (int) min; + } + + return (int) sum; + } + + public static double generateRandomDouble() { + return ThreadLocalRandom.current().nextDouble(); + } + + public static int randomRange(int min, int max) { + return ThreadLocalRandom.current().nextInt(min, max + 1); + } + + public static int randomElement(int[] array) { + return array[ThreadLocalRandom.current().nextInt(0, array.length)]; + } + + public static <T> T randomElement(List<T> list) { + return list.get(ThreadLocalRandom.current().nextInt(0, list.size())); + } + + public static int randomElement(IntList list) { + return list.getInt(ThreadLocalRandom.current().nextInt(0, list.size())); + } + + /** + * Checks if an integer array contains a value + * @param array + * @param value The value to check for + */ + public static boolean arrayContains(int[] array, int value) { + for (int i = 0; i < array.length; i++) { + if (array[i] == value) return true; + } + return false; + } + + public static boolean arrayContains(Integer[] array, int value) { + for (Integer element : array) { + if (element != null && element.equals(value)) { + return true; + } + } + return false; + } + + public static boolean arrayContains(List<Integer> list, int value) { + for (Integer element : list) { + if (element.equals(value)) { + return true; + } + } + return false; + } + + public static int[] convertListToIntArray(List<Integer> list) { + // Create an int array with the same size as the list + int[] intArray = new int[list.size()]; + + // Iterate over the list and populate the int array + for (int i = 0; i < list.size(); i++) { + intArray[i] = list.get(i); + } + + return intArray; + } + + /** + * Base64 encodes a given byte array. + * @param toEncode An array of bytes. + * @return A base64 encoded string. + */ + public static String base64Encode(byte[] toEncode) { + return Base64.getEncoder().encodeToString(toEncode); + } + + /** + * Base64 decodes a given string. + * @param toDecode A base64 encoded string. + * @return An array of bytes. + */ + public static byte[] base64Decode(String toDecode) { + return Base64.getDecoder().decode(toDecode); + } + + /** + * Checks if a port is open on a given host. + * + * @param host The host to check. + * @param port The port to check. + * @return True if the port is open, false otherwise. + */ + public static boolean isPortOpen(String host, int port) { + try (var serverSocket = new ServerSocket()) { + serverSocket.setReuseAddress(false); + serverSocket.bind(new InetSocketAddress(InetAddress.getByName(host), port), 1); + return true; + } catch (Exception ex) { + return false; + } + } +} diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..8f42963 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,14 @@ +<Configuration> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>[%d{HH:mm:ss}] [%level] %msg%n</pattern> + </encoder> + </appender> + <logger name="org.reflections" level="OFF"/> + <logger name="org.eclipse.jetty" level="OFF" /> + <logger name="de.bwaldvogel" level="ERROR" /> + <logger name="io.javalin" level="ERROR" /> + <root level="INFO"> + <appender-ref ref="STDOUT" /> + </root> +</Configuration> \ No newline at end of file